Extended Advertising - reception and data size

Hi,

I recently started with nRF52840-DK, Zephyr and nRF Connect SDK (v. 1.9.1). I want to test extended advertising. Since there is no example of "pure" extended advertising (i.e. no periodic), I modified the periodic_adv example. Modification is quite easy: In prj.conf setting CONFIG_BT_PER_ADV=n, in main.c skipping bt_le_per_adv_set_param() and bt_le_per_adv_start(), usage of bt_le_ext_adv_set_data() instead of bt_le_per_adv_set_data(). Now extended advertising runs well. With a Sodera sniffer, I can see three ADV_EXT_IND frames in channels 37/38/39, followed by an AUX_ADV_IND frame in one of the data channels. The AUX_ADV_IND frame contains two AD elements: One with the data I want to transmit and one with the complete local name as set in prj.conf.

For reception, I use the periodic_sync example, which should support extended advertising without the periodic functionality too.

Now the questions:

My receiver calls the scan_recv function, but always I see only one of the AD elements. The buffer contains only the AD element with the local name, which is the last one in the frame (according to the sniffer raw data). There is no indication of the reception of my data in the second AD element. What have I to do to receive both (or even more) AD elements? What is the intention here - to have several calls of scan_recv for every AD element or to have a list of buffers or something else?

Parents
  • Okay, can you show me the config file of your child image on the receiver side as I think that would be where the buffer length is set.

    "This leads to the fact that I catch roughly only every second transmitted data set". If it's not every second advertising packet, are you seeing specific advertisements not being received, or what?

    Best regards,

    Simon

  • Hi Simonr,

    I have another additional question: Occasionally, i.e. maybe once in 30 advertisements, it happens that there are the three ADV_EXT_IND frames, showing in the AUX Pointer in the field "Calculated Offset" 1110µs/810µs/510µs as usual, but there is no AUX_ADV_IND frame at all. The next advertising cycle starts normally roughly a second later with three ADV_EXT_IND frames and the following AUX_ADV_IND frame correctly, also the cycle before was completely ok. Due to the fact that between the first ADV_EXT_IND frame and the AUX_ADV_IND frame time is little more than 1.1ms, my sleeptime of k_sleep(K_MSEC(22)) in the main_advertiser (30 in my current test) seems well sufficient to not stop the advertising before transmission. Do you have any idea what happens there?

    Best regards

    Axel

Reply
  • Hi Simonr,

    I have another additional question: Occasionally, i.e. maybe once in 30 advertisements, it happens that there are the three ADV_EXT_IND frames, showing in the AUX Pointer in the field "Calculated Offset" 1110µs/810µs/510µs as usual, but there is no AUX_ADV_IND frame at all. The next advertising cycle starts normally roughly a second later with three ADV_EXT_IND frames and the following AUX_ADV_IND frame correctly, also the cycle before was completely ok. Due to the fact that between the first ADV_EXT_IND frame and the AUX_ADV_IND frame time is little more than 1.1ms, my sleeptime of k_sleep(K_MSEC(22)) in the main_advertiser (30 in my current test) seems well sufficient to not stop the advertising before transmission. Do you have any idea what happens there?

    Best regards

    Axel

Children
No Data
Related