This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ANT+ FEC page 51 scanning from external device

I am trying to “spy on” two ANT+ devices talking to each other:

  • The first device is a bike trainer running the ANT+ FEC profile
  • The second device is a computer (running Zwift and sending commands to the trainer)

My goal is to receive the ANT+ messages coming from the computer on a nRF52832 (and especially page 51 of the FEC profile).

I managed so far only to receive the bike trainer ANT+ messages, but not the messages sent from the computer.

What should I change in my configuration ?

(The bike sends pages 16 and 25 – speed and power- , and the computer should be sending acknowledged data page 51 – simulated slope -).

I am using a continuous scanner to listen from the nRF5232 configured as follows:

ant_channel_config_t channel_config =
    {
        .channel_number    = 0x00,
        .channel_type      = CHANNEL_TYPE_SLAVE,
        .ext_assign        = 0x00,
        .rf_freq           = 0x39,
        .transmission_type = WILDCARD_TRANSMISSION_TYPE,
        .device_type       = FEC_DEVICE_TYPE,
        .device_number     = 0x00,          // Wildcard
        .channel_period    = 0x00,          // Not used, since this is going to be scanning
        .network_number    = ANTPLUS_NETWORK_NUMBER,
    };

  • I don't have any other suggestion than to look at the profile description of the fitness equipment (control) profile:
    https://www.thisisant.com/developer/resources/downloads/#documents_tab 

  • Hi,

    An update on the issue:

    I now manage to see the packets using AntWare II when I use in the advanced tab "Open in scan mode". (Data that starts with 00-33-... )

    Opened in scan mode
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-19-CA-00-00-00-00-60-20-80-1E-0B-11-05
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-10-19-00-00-00-00-FF-24-80-1E-0B-11-05
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-19-CB-00-00-00-00-60-20-80-1E-0B-11-05
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-10-19-00-00-00-00-FF-24-80-1E-0B-11-05
    Received ACKNOWLEDGED_DATA_0x4F
      :: 4f, 00-33-FF-FF-FF-FF-72-51-00-80-1E-0B-11-05
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-F0-00-00-00-00-00-00-00-80-1E-0B-11-05

    What is the equivalent channel configuration for th nRF52 ?

  • The problem is now solved, by the use of the function sd_ant_rx_scan_mode_start instead of sd_ant_channel_open.

    The code to activate scanning of both masters and slaves is the following:

    /**@brief initialize application
     */
    static void continuous_scan_init()
    {
        uint32_t err_code;
    
        // Set library config to report RSSI and Device ID
        err_code = sd_ant_lib_config_set(
            ANT_LIB_CONFIG_MESG_OUT_INC_RSSI | ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID);
        APP_ERROR_CHECK(err_code);
    
        // Configure channel 0 for scanning mode
        ant_channel_config_t channel_config =
        {
            .channel_number    = CT_CHANNEL_NUMBER,
            .channel_type      = CHANNEL_TYPE_SLAVE,
            .ext_assign        = 0x00,
            .rf_freq           = FEC_ANTPLUS_RF_FREQ,
            .transmission_type = 0x05u,
            .device_type       = FEC_DEVICE_TYPE,
            .device_number     = TACX_DEVICE_NUMBER,
            .channel_period    = FEC_MSG_PERIOD,          // Not used, since this is going to be scanning
            .network_number    = ANTPLUS_NETWORK_NUMBER,
        };
    
        err_code = ant_channel_init(&channel_config);
        APP_ERROR_CHECK(err_code);
    
        // Activate message reception from the slave as well
        // This function starts receive scanning mode feature. Channel 0 must be assigned.  All other channels must be closed.
        err_code = sd_ant_rx_scan_mode_start(0);
        APP_ERROR_CHECK(err_code);
    
    }
    

Related