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 Reply Children
  • Hi Simonr,

    thanks for the explanation. But it doesn't help to understand what happens. I'm able to send up to 249 data bytes in extended advertising (one AD element containing the data), I can monitor these bytes in the AUX_ADV_IND frame with the sniffer. Why I can't receive them? Currently, I can receive 227 data bytes only. The whole frame in BB is only 244 bytes long in that case, which is less than I would expect as maximum size from the BT specs. How can I extend the data size in reception to the 249 bytes I can send? Why there is a difference between the TX and RX?

    Best regards

    Axel

  • Hi Simonr,

    now I compared the sniffer data of extended advertising and periodic advertising. I found that the difference

    d_length1 = LE_BB packet length - LE_ADV PDU length = 11

    in both cases, means that at least from size point of view these cases are identical.

    For periodic advertising, the extended header is 0 byte, that's why

    d_length2 = PDU length - AD Data length = 2

    which are the two size values itself.

    For extended advertising, the extended header is 3 bytes long, that's why d_length2 = 5.

    Question: Ok, there is a difference in possible size of 3 byte (extended header length). But the difference in what I'm able to receive is 249 - 227 = 22 byte. Why?

Related