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

[nRF51422] Continuous scanning mode and transmission data

Hello.

I try to build small network: 1 central device (CD), several relay devices (RD), several broadcast devices (ED). CD and RD have to receive commands all the time, but additionally have to be able to send some data.I think the best way will be use continuous scanning and asynchronous transmitting data.

My (CD) and (RD) configuration:

Channel0:

 sd_ant_channel_assign(CHANNEL_0, CHANNEL_TYPE_SLAVE, NETWORK_0, 0);
 sd_ant_channel_id_set(CHANNEL_0, 0, 10, 1);					//only device_type=10	
 sd_ant_channel_radio_freq_set(CHANNEL_0, NET_FREQ);
 sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID);
 sd_ant_rx_scan_mode_start(TRUE);

Channel1:

 sd_ant_channel_assign(CHANNEL_1, CHANNEL_TYPE_MASTER, NETWORK_0, EXT_PARAM_ASYNC_TX_MODE);
 sd_ant_channel_id_set(CHANNEL_0, DEVICE_NUMBER, 10, 1);
 sd_ant_channel_radio_freq_set(CHANNEL_0, NET_FREQ);
 sd_ant_lib_config_set(ANT_LIB_CONFIG_MESG_OUT_INC_DEVICE_ID);

Transmitting (RTC, period: 1sec ):

sd_ant_broadcast_message_tx(CHANNEL_1, BUFFER_SIZE, tx_frame);

I assumed that I can send message from CD to RD at any point in time (e.g. after switch pressed or periodically, using a timer). I configured one device as above and I used ANTWare in Scan Mode. Unfortunately I didn't receive any frames.
So I'm not sure how this mode works. Could anyone check the config and explained me the way of this mode work?

Best regards, PW

Parents
  • What's the value of BUFFER_SIZE? Is it set to 8? If you debug the application, is it running as you expect it to be or is it held up before it's actually getting to the send routine? Which version of the chip, S210 Softdevice and SDK are you using?

    You might want to try and set the different channel_id values to 0 on ANTWare to make sure you set them to wild card and that ANTWare is searching for any channel id values.

    If you have an oscilloscope available I would check the the VDD_PA pin on the nRF51422. This pins should go up to 1.8 V during the actual TX event, so you should see a repeating pulse on the pin of the example is running as expected.

Reply
  • What's the value of BUFFER_SIZE? Is it set to 8? If you debug the application, is it running as you expect it to be or is it held up before it's actually getting to the send routine? Which version of the chip, S210 Softdevice and SDK are you using?

    You might want to try and set the different channel_id values to 0 on ANTWare to make sure you set them to wild card and that ANTWare is searching for any channel id values.

    If you have an oscilloscope available I would check the the VDD_PA pin on the nRF51422. This pins should go up to 1.8 V during the actual TX event, so you should see a repeating pulse on the pin of the example is running as expected.

Children
No Data
Related