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 ?

Parents Reply Children
  • What is the Channel Status if you call sd_ant_channel_status_get()?

    Ans. STATUS_SEARCHING_CHANNEL((uint8_t)0x02) ///< Indicates channel is active and in searching state.


    What have you set ucTotalNumberOfChannels when calling sd_ant_enable()?

    Ans. NRF_SDH_ANT_TOTAL_CHANNELS_ALLOCATED = 7

    #define ANT_HRMRX_ANT_CHANNEL        0       /**< Default ANT Channel. */
    #define ANT_HRMRX_DEVICE_NUMBER    0      /**< Device Number. */
    #define ANT_HRMRX_TRANS_TYPE           0      /**< Transmission Type. */
    #define ANTPLUS_NETWORK_NUMBER     0     /**< Network number. */

    #define ANT_BPWRRX_ANT_CHANNEL      1     /**< Default ANT Channel. */
    #define ANT_BPWRRX_DEVICE_NUMBER 0     /**< Device Number. */
    #define ANT_BPWRRX_TRANS_TYPE         0    /**< Transmission Type. */

    #define ANT_BSCRX_ANT_CHANNEL          2    /**< Default ANT Channel. */
    #define ANT_BSCRX_DEVICE_NUMBER     0    /**< Device Number. */
    #define ANT_BSCRX_TRANS_TYPE            0    /**< Transmission Type. */

  • It seems you are trying to open a channel that is already open and searching.

    Sorry to ask, but have you double checked that the log info show that there are different channels here? For instance for HRM:

    <info> ant_hrm: ANT HRM channel 0 init
    <info> ant_hrm: ANT HRM channel 0 open

    But for next channel:

    <info> ant_bsc: ANT BSC channel 1 init
    <info> ant_bsc: ANT BSC channel 1 open

    And so on.

  • Thank a lot.

    The question is solved.

    Because i called that ant_hrm_disp_open(&m_ant_hrm) once and ant_hrm_disp_open(&m_ant_hrm)  in ant_evt_handler, it caused that open a channel that is already open and searching.

Related