advertising data
Tamra <tamrako@...>
Hi all, 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 Thank you, Tamra
|
|
Luiz Augusto von Dentz
Hi Tamra,
On Tue, Jun 26, 2018 at 3:55 AM, Tamra <tamrako@...> wrote: Hi all,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. Thank you, -- Luiz Augusto von Dentz
|
|
Luiz Augusto von Dentz
Hi Tamra,
On Tue, Jun 26, 2018 at 11:35 AM, Luiz Augusto von Dentz <luiz.dentz@...> wrote: Hi Tamra,Actually the event type is no the AD type, sorry about that, so 0x03 refers to BT_LE_ADV_NONCONN_IND. Thank you, -- Luiz Augusto von Dentz
|
|
Hi,
On Tue, Jun 26, 2018, Luiz Augusto von Dentz wrote: I'd like to add here that we've just merged a new helper API for parsingOn Tue, Jun 26, 2018 at 3:55 AM, Tamra <tamrako@...> wrote:Actually the event type is no the AD type, sorry about that, so 0x03I'm looking at the central_hr example. I was wondering what information isThe type you will be able to find in the assigned number for GAP: the advertising data: https://github.com/zephyrproject-rtos/zephyr/pull/8560 This pull request also included updating the central_hr sample, so you might want to take a second look at that code. Johan
|
|
Tamra <tamrako@...>
Hi all, 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? Thanks, Tamra
On Tue, Jun 26, 2018 at 6:37 AM, Johan Hedberg <johan.hedberg@...> wrote: Hi,
|
|
Zou, Jun Qing
You might also want to try Nordic’s “nRF Connect” on Android. It could show you all the details of hex received in advertising and scan response packet, in raw and parsed mode.
BR, zou
From: devel@... [mailto:devel@...]
On Behalf Of Tamra
Hi all,
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?
Thanks, Tamra
On Tue, Jun 26, 2018 at 6:37 AM, Johan Hedberg <johan.hedberg@...> wrote:
|
|
Hi Tamra,
toggle quoted messageShow quoted text
The format of the data (behind ad->data with length ad->len) is specified in the Bluetooth Core Specification (5.0) Volume 3, Part C, section 11 (page 2086 in the pdf). In practice it's just a sequence of <1 byte length><1 byte type><N byte payload> elements, and you can use the recently added bt_data_parse() API to help parse these. You'll find defines for the various data types in include/bluetooth/hci.h with the prefix BT_DATA_*. The actual formats and meanings of the different types are defined in the Core Specification Supplement document. Both the Core Specification and the Supplement can be found here: https://www.bluetooth.com/specifications/bluetooth-core-specification Johan
On Tue, Jun 26, 2018, Tamra Oyama wrote:
Hi all,
|
|