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

ANT send data while in scanning mode

Hello everybody,

I tried to send data while in scanning mode (RX 100%).

I don't get any error when sending but data seems not to be sent (not shown in ANTWARE).

Is what I want to do possible ? Or do I need to close scanning mode before trying to send something ?

Init)

// Set TX ANT channel ready
ant_channel_config_t tx_channel_config = {
.channel_number = ANT_TX_CHANNEL_NUMBER,
.channel_type = CHANNEL_TYPE_MASTER,
.ext_assign = EXT_PARAM_ASYNC_TX_MODE | EXT_PARAM_FAST_INITIATION_MODE,
.rf_freq = ANT_RF_FREQUENCY,
.transmission_type = ANT_TRANSMISSION_TYPE,
.device_type = ANT_DEVICE_TYPE,
.device_number = ANT_DEVICE_ID,
.channel_period = ANT_CHANNEL_PERIOD,
.network_number = ANT_NETWORK_NUMBER
};
err_code += ant_channel_init(&tx_channel_config);

// Set RX ant channel ready
ant_channel_config_t rx_channel_config = {
.channel_number = ANT_RX_CHANNEL_NUMBER,
.channel_type = CHANNEL_TYPE_SLAVE,
.ext_assign = 0,
.rf_freq = ANT_RF_FREQUENCY,
.transmission_type = ANT_TRANSMISSION_TYPE,
.device_type = ANT_DEVICE_TYPE,
.device_number = 0, // Listen to all devices
.channel_period = 0, // Not used (because it's scanning mode)
.network_number = ANT_NETWORK_NUM
};
err_code += ant_channel_init(&rx_channel_config);

Send)

// Start to listen
err_code += sd_ant_rx_scan_mode_start(ANT_RX_CHANNEL_NUMBER);

// Test sending while in scaning mode
uint8_t buffer[] = {0, 1, 2, 3, 4, 5, 6, 7};
err_code += sd_ant_broadcast_message_tx(ANT_TX_CHANNEL_NUMBER, ANT_STANDARD_DATA_PAYLOAD_SIZE, buffer);

ANTWARE)

Thanks everybody for your help.

Related