NCS mutiple_adv_sets get adv index

Hello,

When I use the sample mutiple_adv_sets in NCS v2.5.0,

I am wondering if there is a way to print the index of each AD after it has been started, so as to distinguish between different ads when they are sent (such as bt_le_ext_adv_get_index(),

but I don't know where to call it after each AD has started).

ps. Instead of unpacking packets at the receiver to distinguish between different advertising packets, they are immediately differentiated when they are sent.

Thank you

Parents
  • Hi

    I think you might be mixing up advertising sets and advertisements here, and the multiple_adv_sets sample does not seem to be relevant to this question really. It seems like you want to get the index for every single advertisement packet, which is not possible I'm afraid. 

    If you do in fact want to differentiate the advertising sets, you can do so with extended advertising and the bt_le_ext_adv sets, which is used when setting up and starting the advertisement set, and also used with the get index function you mentioned. 

    Best regards,

    Simon

  • Hello

    Thank you for your answer.

    I did confuse the concept of an AD set with an AD.

    1.About adv set

    Whether there is a sample for using the  bt_le_ext_adv_get_index()  to distinguish between AD sets

    2.About adv packet index

    For the Counting ads package, before NCS v2.5.3 there was a function called radio notification,

    (link: https://docs.nordicsemi.com/bundle/ncs-2.5.3/page/nrfxlib/mpsl/doc/radio_notification.html).

    I was wondering if I could count the AD packages in the callback function and write the index information to the AD packages via bt_le_adv_update_data().

    I tried counting and updating in that callback.

    By combining the (link: academy.nordicsemi.com/.../) Exercise 2 and (link: https://devzone.nordicsemi.com/f/nordic-q-a/75374/radio-notification-in-ncs) a sample called 6013. The peripheral_limited_adv. Zip

    the result:

    It looks like I used bt_le_adv_update_data incorrectly.

    -22 mean  EINVAL

    Is this solution theoretically sound, and how can I fix it?

    3.About multiple_adv_sets sample

    It can send two ads on the same device, and if at some point these two ads collide, what will the RF do?

    Thank you

Reply Children
No Data
Related