Re: advertising data

Johan Hedberg


On Tue, Jun 26, 2018, Luiz Augusto von Dentz wrote:
On Tue, Jun 26, 2018 at 3:55 AM, Tamra <tamrako@...> wrote:
I'm looking at the central_hr example. I was wondering what information is
packed into the net_buf_simple *ad? The function and output is below.

static void device_found(const bt_addr_le_t *addr, s8_t rssi, u8_t type,
struct net_buf_simple *ad)

[DEVICE]: 34:3c:99:ab:65:6d (random), AD evt type 3, AD data len 31, RSSI
-83 data: 2818606536
The type you will be able to find in the assigned number for GAP:

AD payload format for each type is described in the CSS, for instance
type 3 is <<Complete List of 16-bit Service UUIDs>> which consists in
a list of 16-bit Service UUIDs.
Actually the event type is no the AD type, sorry about that, so 0x03
I'd like to add here that we've just merged a new helper API for parsing
the advertising data:

This pull request also included updating the central_hr sample, so you
might want to take a second look at that code.


Join to automatically receive all group messages.