This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Advertising 1650 bytes of Host advertising data in an Auxiliary segment using Advertising Extensions

The BLE core specification states that using advertising extensions, the total host advertising data that can be advertised is 1650 bytes. This is achieved through fragmentation of data in multiple PDUs and chaining them together as one Auxiliary segment. 

I implemented extended advertising on nRF52832, and advertised custom data using the Manufacturer Specific Data field. But the maximum buffer size that I could provide for my advertising data was equal to BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED, which has the value 255 bytes. The advertisements were non-connectable and non-scannable undirected, and this 255 bytes of data used one AUX_ADV_IND PDU and one AUX_CHAIN_PDU. Thus I'm only able to send a maximum of 255 bytes of advertising data in one extended advertising event.

But I actually wanted my application to use more ADV_CHAIN_IND PDUs and fragment 1650 bytes of data as the specification says. Does your SoftDevice support sending 1650 bytes of data in a single extended advertising event? 

  • Hi Sukriti, 
    After the discussion with the R&D team, it's turned out that the issue was with the length definition of bt_data:  

    struct bt_data {
        uint8_t type;
        uint8_t data_len;
        const uint8_t *data;
    };
    Max length is uint8_t meaning the cap is 255. 

    To be able to advertise more than 255 bytes you would need to define multiple ad structure. 

    For example this one worked for me: 
    static const struct bt_data ad[] = {
        BT_DATA(BT_DATA_MANUFACTURER_DATA, mfg_data, 200),
        BT_DATA(BT_DATA_MANUFACTURER_DATA, mfg_data, 200),
        BT_DATA(BT_DATA_MANUFACTURER_DATA, mfg_data, 200),
        BT_DATA(BT_DATA_MANUFACTURER_DATA, mfg_data, 200),

    };
    I can see 800 bytes advertising in 4 chained adv packet. 
Related