This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Slave displaying device can't close BSC channel by calling lib sd_ant_channel_close()

Hi all,

Our project base on platform nRF5_sdk11.0.0_89a8197 and use softdevice ANT_s332_nrf52_0.9.1.alpha.hex and refer to demo on path \nRF5_SDK_11.0.0_89a8197\examples\ant\ant_plus\ant_bsc\bsc_rx\combined\pca10040. Our device is slave displaying device and connect to Bike Speed and Cadence sensor that is ok. We need to close the channel to disconnect the sensor. We call lib code as below:

err_code = sd_ant_channel_close(m_ant_bsc.channel_number); APP_ERROR_CHECK(err_code);

returning err_code is success also .but after calling it, Our device still receive data from Bike Speed and Cadence sensor.it seems not to disconnect the sensor. if we call ant_bsc_disp_open(&m_ant_bsc) again, it will return error with value 0x4015. the error indicate NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE.

if Our device connect to Speed and distance sensor. We call the same lib function to close the channel that is ok. and reopen the channel to reconnect to the sensor that is ok also. the code as below: err_code = sd_ant_channel_close(m_ant_sdm.channel_number); APP_ERROR_CHECK(err_code);

My question is :

How to close the channel to disconnect Bike Speed and Cadence sensor.Thanks.

Related