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

Return error code that 0x4015.

I used SDK nRF5_SDK_14.1.0_1dda907.

I added cycling speed and cadence service of BLE and bicycle speed and cadence of ANT+ in ble_ant_app_hrm example of multiprotocol.

If i opened ant hrm disp channel, i did not send bsc packet.
Then success.

But, if i opened ant  bsc disp channel, i did not send bsc packet.
Then return error code that 0x4015.

How to solve it ?

  • Hi,

    I suggest you try to set some breakpoints or debug output in your code to find exactly which softdevice api call that return error code 0x4015 (NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE).

    It may be that you are trying to assign or open a channel that is already configured. In specific I suggest to check that each channel you setup have it's own unique: 
    @param[in] ucChannel is an unsigned char (1 octet) denoting the channel to assign/open.

    Best regards,
    Kenneth

  • Sorry, i modified my question.

    If i opened ant hrm disp channel, i did not send bsc packet.
    Then success.

    And, if i opened ant  bsc disp channel, i send bsc packet.
    Then success.

    But, if i opened ant  bsc disp channel, i did not send bsc packet.

    A period of time later.

    Then return error code that 0x4015.

  • Have you tried to look into my question:

    In specific I suggest to check that each channel you setup (hrm and bsc) have it's own unique: 
    @param[in] ucChannel is an unsigned char (1 octet) denoting the channel to assign/open.

    If several channel use the same ucChannel, then you very likely will get 0x4015.

  • I setup (hrm and bsc) have it's own unique:
    @param[in] ucChannel is an unsigned char (1 octet) denoting the channel to assign/open.

    I used SDK13.1 successful.

    But, I used the SDK14.1 then the above error situation happened.

  • Hi, I think we are going a bit in circles here now.

    To be able to help you, I need to know exactly which softdevice api call that return error code 0x4015 (NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE). So you will need to find which of the sd_ant_channel_assign(), sd_ant_broadcast_message_tx(), sd_ant_channel_open(), sd_ant_network_address_set(), sd_ant_channel_id_set(), sd_ant_channel_radio_freq_set(), or sd_ant_channel_period_set() that is returning 0x4015.

    Once we know which api call that return NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE, then next step is to find what are the paramters used in the specific softdevice call, and compare with the parameters for the other channel that is configured. 

Related