Re: BLE Advertising raw data via scan response - bt_le_adv_start

Johan Hedberg

Hi Frank,

On 31 Jan 2019, at 13.08, frv <> wrote:
struct bt_data bd1[0];
That’s a zero-length array, i.e. it’s not allocating any memory for the variable. Consequently, trying to read or write bd1[0] will cause unexpected behaviour. Other than that I didn’t see anything wrong with your code. Note that using BT_LE_ADV_CONN_NAME (instead of e.g. BT_LE_ADV_CONN) will cause the stack to try to insert the device name in the scan response data, so you won’t get exactly what you’re asking for but something extra as well.


Join to automatically receive all group messages.