Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adding ANT to BLE application

Hello,

I have a gateway project where I need to receive data from BLE and send on ANT network. As a first step, I took the NUS or ble_app_uart and changed the softdevice from S140 to S340. The application is working correctly and NUS works fine with S340. For next step, I started adding ANT files (like ant_channel_config.c etc) looking at the multiprotocol example in the folder (with HRM functionality). The project seems to compile well except the following error codes, I cannot understand what can go wrong. I added all ANT related preprocessor defines from sdk_config.h of multiple protocol example into this project. There seems to be a linker issue but I am not sure what and where to change these linker settings.

Output/ble_app_uart_pca10056_s140 Release/Obj/nrf_sdh_ant.o:E:\xx\yy\nRF5_SDK_16.0\components\softdevice\common/nrf_sdh_ant.c:68: undefined reference to `__start_sdh_ant_observers'

Output/ble_app_uart_pca10056_s140 Release/Obj/nrf_sdh_ant.o:(.rodata.sdh_ant_observers+0x4): undefined reference to `__stop_sdh_ant_observers'

Parents Reply
  • The only thing I can think of is that you have not made sure that the 'channel_number' is different between the ANT channels you configure, e.g:

    For TX make sure that sd_ant_channel_assign(0,....); sd_ant_channel_id_set(0,....); and so on
    For RX make sure that sd_ant_channel_assign(1,....); sd_ant_channel_id_set(1,....); and so on

    This 'channel_number' parameter is only a local handle and does not affect the on-air data. If you have more than 2 channels then increment the 'channel_number' further for each channel you configure (e.g. 2, 3, 4, 5, 6....).

Children
No Data
Related