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

    1. The bt_le_ext_adv_get_index() does exactly that, and returns the array index of an advertising set. This however is not possible for individual advertisement packets.

    2. Seems like you've set the bt_le_adv_update_data() params for bt_data and size are set to NULL and 0 respectively, which would be my guess to what this invalid argument error is caused by. I can't say I understand what you're trying to do here though, and in general I don't think counting the advertisement index will be possible.

    3. That is a good question actually. I assumed the MPSL timeslots handled this, but I can't see any mention of this in the sample project, so I have asked the developers now to get a straight forward answer on this.

    Best regards,

    Simon

  • Thank you very much for your answer.

    I tried bt_le_adv_update_data() again, and it seemed to work only for single AD updates, not AD set updates.

    Also, about the use of the bt_le_ext_adv_get_index() function. For example, if I have three connectable ads in my AD set with 20ms, 50ms, and 100ms periods, can I use this function to know which AD I am sending before each AD is sent (or at some other time)? How to use it?

    Best regards,

    qianjunwang

Reply
  • Thank you very much for your answer.

    I tried bt_le_adv_update_data() again, and it seemed to work only for single AD updates, not AD set updates.

    Also, about the use of the bt_le_ext_adv_get_index() function. For example, if I have three connectable ads in my AD set with 20ms, 50ms, and 100ms periods, can I use this function to know which AD I am sending before each AD is sent (or at some other time)? How to use it?

    Best regards,

    qianjunwang

Children
No Data
Related