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

on_ant_evt usage

Hi,

I'm communicating ANT through softdevice ant event handler as follows:

err_code = softdevice_ant_evt_handler_set(on_ant_evt);

void on_ant_evt(ant_evt_t * p_ant_evt)
{
        char data[22];
        snprintf((char *)&data,20,"%d X=%d ST=%d A%d",p_ant_evt->event,
                p_ant_evt->evt_buffer[ANT_BUFFER_INDEX_MESG_ID],
                Device_State,Ant_State);
        ble_transfer_data_r((char *)data, (uint8_t)strlen(data),NULL,0);
 }

All event received by on_ant_evt handler are EVENT_TX regardless whether ANT is connected or disconnected.

ANTware II does shows ANT events such as: channel closed, received broadcast data

Why does softdevice ANT event handler just shows EVENT_TX and no other events?

Parents
  • When you open an ANT channel as a master it will start to broadcast 00-00-00-00-00-00-00-00 until it is told otherwise. You will get the EVENT_TX event every time data is broadcasted.

    For it to get the EVENT_RX event(received broadcast data) the slave end of the channel must send something.

    To get the EVENT_CHANNEL_CLOSED you must close the channel by using sd_ant_channel_close(...).

Reply
  • When you open an ANT channel as a master it will start to broadcast 00-00-00-00-00-00-00-00 until it is told otherwise. You will get the EVENT_TX event every time data is broadcasted.

    For it to get the EVENT_RX event(received broadcast data) the slave end of the channel must send something.

    To get the EVENT_CHANNEL_CLOSED you must close the channel by using sd_ant_channel_close(...).

Children
No Data
Related