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

  • 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.

  • Hello.

    BUFFER_SIZE=8. Application is running as I expected, it's stops periodically (1sec) when sending asynchronous frame, and stops when receiving frame from ANTWare. CHIP: N51422QFAAC0, SDK:4.4.2.33551. When ANTWare is configured as Master and sends broadcast, it can receive data from my device. In this case VDD_PA is going high at 200us. When ANTWare is configured in scan mode it doesn't receive any data from my device and VDD_PA is low.

    Routine:

    sd_ant_broadcast_message_tx(CHANNEL_1, BUFFER_SIZE, tx_frame);
    

    doesn't return any error, but frames are invisible :(.

    Best regards, PW

  • If the VDD_PA pin is always low it means that it is not sending anything. So it sounds like you have a configuration on the nRF51422 side. I would compile the default ant_broadcast_tx example in the SDK and load that into your device to ensure that it actually transmits. If that example works I would start comparing the initialization and sending routine you have with the broadcast example. It must be related to starting the softdevice or enabling the device as a ant master for sending to ANTWare.

Related