Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Ant connection status

Rank

Total Posts: 9

Joined 0

PM


Hello,

I have merged some ant tx and bt tx code and have both working using the s310 softdevice. I am trying to check the status of the ant connection, so I am trying to use sd_ant_channel_status_get(). I always get 0x13 for the channel status once I have started transmitting. It does not matter if I have a device receiving the data or not. I was able to get 0x00 if I had not assigned the channel yet. I placed the function after the broadcast data function.

uint32_t err_code = sd_ant_broadcast_message_tx(HRMTX_ANT_CHANNEL,
sizeof(m_tx_buffer),
m_tx_buffer);
APP_ERROR_CHECK(err_code);

uint8_t statusCh;

err_code = sd_ant_channel_status_get(HRMTX_ANT_CHANNEL, &statusCh;);
APP_ERROR_CHECK(err_code);

Am I not using the function correctly? I thought I should get a 0x02 when the device is searching and a 0x03 when the device is tracking.

Thanks,
Glenn
     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

A master device in ANT always transmits, regardless of when there there is a slave device present or not, and changes state directly to TRACKING when the channel is open. A slave device has to search for the master, so initially is SEARCHING after opening the channel, and TRACKING once it starts tracking the transmissions of the master.