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
  • The bt_le_adv_update_data() sets single advertisments, correct. To change an advertising set's adv/scan response data you can use bt_le_ext_adv_set_data().

    The bt_le_ext_adv_get_index() function gets an array index of an advertising set. The function is used to map bt_adv to an index of an array of adv sets. It returns the index of the advertising set object.

    Best regards,

    Simon

  • Hi

    bt_le_ext_adv_set_data() is really useful!

    About bt_le_ext_adv_get_index(),the function is passed a pointer(*adv)as an argument. In my example above,  I have three connectable ads in my AD set with 20ms, 50ms, and 100ms periods.

    After these ads have been sent,when and how should I get this pointer to use this function?

    Best regards,

    qianjunwang

Reply Children
No Data
Related