Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Transmitting Data in Scanning Mode

Rank

Total Posts: 3

Joined 2012-06-01

PM

I'm having trouble transmitting data in scanning mode. I'm using the NRF51422.

I am receiving data, but when I try to transmit data, nothing actually sends.

Here is the code I'm using:

/* Configure scanning channel */
sd_ant_network_address_set(ANTPLUS_NETWORK_NUMBER, (uint8_t*)m_network_key);
sd_ant_channel_assign(0, CHANNEL_TYPE_SLAVE, 0, 0);
sd_ant_channel_id_set(0, 0, DEVICE_TYPE, 0);
sd_ant_channel_radio_freq_set(0, FREQUENCY);
sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID);
sd_ant_rx_scan_mode_start(0);

/* Configure transmitting channel */
sd_ant_channel_assign(1, CHANNEL_TYPE_SLAVE, 0, 0);
sd_ant_channel_id_set(1, recieved_channel_id, DEVICE_TYPE, 0);

/* Send data */
sd_ant_acknowledge_message_tx(1, 8, broadcast_data);      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

Hi quenzerj!

Are you using extended messages to send the data? The channel ID of the destination master should be included with the data you send. The message should then be transmitted when a message is received from a master with a matching channel ID.

Kat      
Rank

Total Posts: 3

Joined 2012-06-01

PM

How do I use extended messaging to send the data? It isn't clear in anything I've ready how to do this.      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

I think you literally append the channel ID to the data bytes. I'm going to check it now in ANTware and confirm.
     
Rank

Total Posts: 3

Joined 2012-06-01

PM

Thanks for looking into it Kat.

I figured it out. I needed to change the transmission type to 1 instead of 0. I didn't need to send an extended message.

     
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

OK good news, thanks!