toggle quoted messageShow quoted text
Thanks for the help. From what I can tell "ad" from "struct net_buf_simple *ad"
is the payload, and so I'm wondering what format is the payload in.
(i.e if i convert it to binary where in the Bluetooth spec can I find
what these values mean?
On Tue, Jun 26, 2018 at 6:37 AM, Johan Hedberg <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:
> > https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile
> > 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
> refers to BT_LE_ADV_NONCONN_IND.
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.