Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

How to connect the AP2(moduler with usb stick on the pc) with a mobile phone

Rank

Total Posts: 1

Joined 2011-11-29

PM

I have successfully run the demon about the android. I test it with a stride sensor. Now I want to connect the Ap2 to the mobile phone. What I did is first set the channel ID and network ID also other parameters of Ap2 via antware_2. Then I change the value of the code according to the Ap2. (e.g. I set the device type of the stride sensor to 0x01, which is the same as the ap2). After the seting,I click the connect button,however, it fails. Is there something wrong with the procedure? And what is the general way to connect the ap2 with the mobile phone?      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hi,

Could you be more specific about what fails? Do you mean that ANTware II fails to open the channel? Or does the Mobile App fail to connect to your AP2 that is set up in ANTware II?

If it is that you fail to find the AP2 with the mobile phone, you will need to make sure that your channel parameters are correct. For example, if you are trying to set your AP2 up as a SDM sensor, you need to make sure that all of your channel parameters and the network key match what is said in the SDM Device Profile.

Cheers,

Kassandra      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Now, I set the AP2 as the SDM. The parameters show as follows:

Network key: xx-xx-xx-xx-xx-xx-xx-xx
Network #:1
Device#:33
Device Type:124
Trans. Type: 0
Channel period: 8134
Radio Fre.:57
channel assign: slave.

I did nothing on the mobile App. Then I click the auto open. However it fails, I can not open the channel. Why?      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

What error do you see when it fails? Can you provide your ANTware II log?      
Rank

Total Posts: 1

Joined 2011-11-29

PM

> Opening Channel...
EVENT_RX_SEARCH_TIMEOUT_0x01
:: 40, 00-01-01
EVENT_CHANNEL_CLOSED_0x07
:: 40, 00-01-07


This is what I saw in antware_2.      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

As you are receiving an EVENT_RX_SEARCH_TIMEOUT_0x01 and an EVENT_CHANNEL_CLOSED_0x07 message, this means your channel is in fact opening, but you have assigned the channel as a slave. I assume that you want it to be a master channel. Select Master(Transmit) in the Channel Assignment box and press the Assign button before opening your channel.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Thank you for your answer. The reason of setting the Ap2 to a slave is I try to connect the AP2 with the SPD(sensor). And it successd. Now I want to connect the AP2 with the mobile phone(I use the mobile app) again. The parameter are set as what I have described before. The only different is I change the slave to master. However, it fails, the mobile can not connect to the Ap2.
Do you know why?      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hi,

Here is what I understand from what you've said so far:

1. You have tested your Android application. It successfully receives SDM information from an ANT+ SDM.
2. You are trying to set up an ANTware II node to simulate an SDM using an AP2 module.
3. You can receive from the SDM using your ANTware II AP2 node configured as a slave.

If I am wrong in any of these assumptions, please correct me.

As I understand it, you receive from the SDM successfully from ANTware II. Then you try to 'simulate' an SDM from ANTware II so that your android app can receive from the ANTware II node.

If that is the case, you need to set your ANTware II node as a master in order to receive any data from it in the Android App. If it is set as a master, you will NOT receive EVENT_RX_SEARCH_TIMEOUT. This only happens on a slave device when the search timeout has been reached without establishing a synchronized channel with the device you are looking for. You will also need to use a non-zero transmission type if your ANTware II is the master node.

Have you tried using the ANT+ simulator to simulate an SDM device, rather than ANTware II? You can find the ANT+ Simulator here.

Please let me know if I am missing something here.

Kassandra      
Rank

Total Posts: 7

Joined 2011-10-19

PM

Hi Kassandra,

I am in a somewhat similar situation but using the iPhone, the Wahoo key and the Wahoo Demo App and I am trying to communicate with the iPhone using the AP2 as a custom sensor. It works fine when I use the Sensor simulator, selecting a standard sensor (e.g HRM), the data is sent to the iPhone; but it doesn't work when I tried transmitting with a Custom Sensor. The Wahoo Demo App has a Advanced Demo mode that is supposed to work with Custom sensors. Any ideas what I could be overlooking?

Thanks!

Julian      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hello,

If you are using the ANT+ sensor simulator in custom sensor mode, the only thing I can think of is that the Wahoo app is not configured to receive this particular type of custom sensor data. Is there any way for you to change the channel parameters on the Wahoo side?

If there is, make sure that the channel parameters in the wahoo app match up correctly with those in the custom sensor.

Kassandra      
Rank

Total Posts: 7

Joined 2011-10-19

PM

Hi Kassandra,
I use the wahoo app to set the wahoo key (AP2 module) as a wildcard (0 for all the channel parameters). RF and period are set to the same values. I assume that should work?

Cheers      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

If you're not receiving from it, it means the channel parameters aren't the same on the slave side as the master side. Are you sure the Device Type is set to a wildcard? Make absolutely sure that all of the channel parameters match (including channel period, make sure RF is 57 etc)      
Rank

Total Posts: 7

Joined 2011-10-19

PM

hi, managed to make it work finally. made a mistake on the config message so the channel parameters were wrong. thanks!