Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

How do you set up background scanning?

Rank

Total Posts: 16

Joined 2012-11-28

PM

Below is the raw communication to an ANT stick. I'm trying to set up background scanning.
My goal is to use channel 0 of this stick to listen for ANT sensors when they start communicating.
The number in the left column is milliseconds.

7 tx: a4 01 4a 00 ef ANT_SYSTEM_RESET
359 rx: a4 01 6f 20 ea (OK)

1110 tx: a4 09 46 00 -- -- -- -- -- -- -- -- -- ANT_SET_NETWORK
1409 rx: a4 03 40 00 46 00 a1 (OK)

2010 tx: a4 02 4d 00 54 bf ANT_REQ_MESSAGE, (capabilities)
2459 rx: a4 06 54 08 03 00 ba 36 00 71
Standard Options:
Advanced Options:
CAPABILITIES_NETWORK_ENABLED
CAPABILITIES_SERIAL_NUMBER_ENABLED
CAPABILITIES_PER_CHANNEL_TX_POWER_ENABLED
CAPABILITIES_LOW_PRIORITY_SEARCH_ENABLED
CAPABILITIES_SEARCH_LIST_ENABLED
Advanced 2 Options:
CAPABILITIES_EXT_MESSAGE_ENABLED
CAPABILITIES_SCAN_MODE_ENABLED
CAPABILITIES_PROX_SEARCH_ENABLED
CAPABILITIES_EXT_ASSIGN_ENABLED

2560 tx: a4 04 42 00 40 00 01 a3 ANT_ASSIGN_CHANNEL
2809 rx: a4 03 40 00 42 00 a5 (OK)

2914 tx: a4 02 66 00 01 c1 ANT_ENABLE_EXT_MSGS
3159 rx: a4 03 40 00 66 00 81 (OK)

3264 tx: a4 02 63 00 ff 3a ANT_LP_SEARCH_TIMEOUT
3859 rx: a4 03 40 00 63 00 84 (OK)

3962 tx: a4 01 4b 00 ee ANT_OPEN_CHANNEL
4559 rx: a4 03 40 00 4b 00 ac (OK)

Is this sequence correct? I've tried to activate a sensor after this setup but I'm not getting any data.

thanks


     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

If you are trying to listen for any ANT+ sensors, you also need to wildcard the Device ID (0, 0, 0), and set the RF Channel to 57.

Cheers

P.S. I edited out the ANT+ network key from your post as it's not technically allowed for public posting raspberry      
Rank

Total Posts: 16

Joined 2012-11-28

PM

Sorry about the key.

after assign channel:
2554 tx: a4 04 42 00 40 00 01 a3 ANT_ASSIGN_CHANNEL
2803 rx: a4 03 40 00 42 00 a5 (OK)

I sent
2908 tx: a4 05 51 00 00 00 00 00 f0 ANT_CHANNEL_ID
3153 rx: a4 03 40 00 51 00 b6 (OK)
channel number = 0x00
device number = 0x0000
device type = 0x00
trans. type = 0x00

What is the command to set the channel to 57 (0x39?)? I thought that I was trying to use channel 0
for this? Do you mean device type?


     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

On page 68 of the ANT Message Protocol and Usage document, the "Channel RF Frequency" command (0x45) lets you set the channel frequency. ANT channels are 1 MHz wide with respect to the 2.4GHz ISM RF band.