Periodic advertising data

Hi,

I am trying to understand periodic advertising and some basic questions:

I am using periodic_adv example from the NCS.

  1. I see teo ADV data defined in the file as shown below. How will this data be used ? 

When I used wireshark I can see "TEST PERIODIC ADVERTISING" in AUX_ADV_IND packet, but should not the ADV data be in the AUX_SYNC_IND packets ? 

The AUX_SYNC_IND packets shows ADV_DATA but I cannot match the data given in the code.


     2. The periodic adv example keeps changing the ble address. How can I keep the address static-random which will not change ?

     3. On wireshark, when I select the device, then I can only see the AUX_SYNC_IND packets. Why is this so ?



Parents
  • Hi, 

    1. The periodic_adv example starts Extended Advertising with the device name package, so it comes with the AUX_ADV_IND. See this line. Then BT_DATA_MANUFACTURER_DATA is set to the periodic advertising data with this line, so it comes with the AUX_SYNC_SUBEVENT_IND. 

    2. You can replace BT_LE_EXT_ADV_NCONN with BT_LE_EXT_ADV_NCONN_IDENTITY.

    diff --git a/samples/bluetooth/periodic_adv/src/main.c b/samples/bluetooth/periodic_adv/src/main.c
    index a927c82e16c..425eccdbae3 100644
    --- a/samples/bluetooth/periodic_adv/src/main.c
    +++ b/samples/bluetooth/periodic_adv/src/main.c
    @@ -31,7 +31,8 @@ int main(void)
            }
    
            /* Create a non-connectable advertising set */
    -       err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN, NULL, &adv);
    +
    +       err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN_IDENTITY, NULL, &adv);
            if (err) {
                    printk("Failed to create advertising set (err %d)\n", err);
                    return 0;

    3. When you select a device in Wireshark, you're essentially synchronizing with its periodic advertising train. The sniffer follows the periodic advertising and subscribes to the subevent, which is why you're seeing the AUX_SYNC_IND packets nRF Sniffer for Bluetooth LE guide.

    Regards,
    Amanda H.

Reply
  • Hi, 

    1. The periodic_adv example starts Extended Advertising with the device name package, so it comes with the AUX_ADV_IND. See this line. Then BT_DATA_MANUFACTURER_DATA is set to the periodic advertising data with this line, so it comes with the AUX_SYNC_SUBEVENT_IND. 

    2. You can replace BT_LE_EXT_ADV_NCONN with BT_LE_EXT_ADV_NCONN_IDENTITY.

    diff --git a/samples/bluetooth/periodic_adv/src/main.c b/samples/bluetooth/periodic_adv/src/main.c
    index a927c82e16c..425eccdbae3 100644
    --- a/samples/bluetooth/periodic_adv/src/main.c
    +++ b/samples/bluetooth/periodic_adv/src/main.c
    @@ -31,7 +31,8 @@ int main(void)
            }
    
            /* Create a non-connectable advertising set */
    -       err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN, NULL, &adv);
    +
    +       err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN_IDENTITY, NULL, &adv);
            if (err) {
                    printk("Failed to create advertising set (err %d)\n", err);
                    return 0;

    3. When you select a device in Wireshark, you're essentially synchronizing with its periodic advertising train. The sniffer follows the periodic advertising and subscribes to the subevent, which is why you're seeing the AUX_SYNC_IND packets nRF Sniffer for Bluetooth LE guide.

    Regards,
    Amanda H.

Children
Related