How large can an advertising package in BLE be?
How large can an advertising package in BLE be?
An advertising packet can be up to 31 bytes of data. Each field (i.e. appearance, name, service UUID or similar) have a header of 2 bytes (length and type), meaning that the maximum user payload is 29 bytes.
When you reach this limit, the ble_advdata_set() method of the SDK will start returning an error, NRF_ERROR_DATA_SIZE (0x0C).
Remember that if you need to transfer additional data before establishing a connection, you can add a scan response, which can contain an additional 31 bytes. A scan response packet can be set by passing a pointer to an addtional ble_advdata_t as the second parameter of ble_advdata_set().
hi ole, sry for commenting on an old post, but whats the best way to send an additional custom flag like "hey phones, please connect, i've a new information for you"? Thanks!
hi ole, sry for commenting on an old post, but whats the best way to send an additional custom flag like "hey phones, please connect, i've a new information for you"? Thanks!