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) as mentioned, both files (main_advertiser.c and main_receiver.c) contain right after the includes the prj.conf settings as a comment. And yes, I think this is where the buffer length should be set. But I don't know which parameter will do a modification of the length of the receive buffer (CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX obviously does not).

    ii) "not every second" simply means that I receive roughly half of the transmitted frames as an average. It means  n o t  good/bad/good/bad/good/bad..., but maybe good/bad/good/good/good/bad/bad/good/bad/bad/bad/good...  My assumption is that due to the heavy work load (50..80 frames per second) the stack can't manage the reception of every frame. That's why I would like to have an indication, how long the stack will need for processing of a received frame up to the call of the call-back function, i.e. which "frame frequency" might be a maximum to ensure the correct reception of every frame. In my example I don't do much in the call-back, which means in that case I should come quite close to this max. frame frequency. When doing more in the call-back, having a single-core processor I clearly reduce this frequency, but in this case I'll be the one who has to optimise the work flow. But the starting point, i.e. the max. frame frequency, comes with the stack.

    Best regards

    Axel

Reply
  • Hi Simonr,

    i) as mentioned, both files (main_advertiser.c and main_receiver.c) contain right after the includes the prj.conf settings as a comment. And yes, I think this is where the buffer length should be set. But I don't know which parameter will do a modification of the length of the receive buffer (CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX obviously does not).

    ii) "not every second" simply means that I receive roughly half of the transmitted frames as an average. It means  n o t  good/bad/good/bad/good/bad..., but maybe good/bad/good/good/good/bad/bad/good/bad/bad/bad/good...  My assumption is that due to the heavy work load (50..80 frames per second) the stack can't manage the reception of every frame. That's why I would like to have an indication, how long the stack will need for processing of a received frame up to the call of the call-back function, i.e. which "frame frequency" might be a maximum to ensure the correct reception of every frame. In my example I don't do much in the call-back, which means in that case I should come quite close to this max. frame frequency. When doing more in the call-back, having a single-core processor I clearly reduce this frequency, but in this case I'll be the one who has to optimise the work flow. But the starting point, i.e. the max. frame frequency, comes with the stack.

    Best regards

    Axel

Children
No Data
Related