Hello, we are trying to receive BLE extended advertisement pakcets from Thingy53 using a nRF52840DK as a HCI controller with a Raspberry Pi 5. I am using a nrf52840dk as a scanner using the zephyr sample hci_usb. Below is my prj.conf
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_HCI=y
CONFIG_BT_LL_SOFTDEVICE=n
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_PHY_CODED=y
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PID=0x000B
CONFIG_USB_DEVICE_BLUETOOTH=y
CONFIG_USB_DEVICE_BLUETOOTH_VS_H4=n
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
# We dont want any console or CDC ACM that may cause BlueZ to not detect hci_usb
CONFIG_SERIAL=n
We then use a nrf5340DK as a advertiser running the sample zephyr/samples/bluetooth/extended_adv/advertiser with minor modifications on the advertising data as shown below
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Copyright (c) 2024 Croxel, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gap.h>
static struct bt_conn *default_conn;
enum bt_sample_adv_evt {
BT_SAMPLE_EVT_CONNECTED,
BT_SAMPLE_EVT_DISCONNECTED,
BT_SAMPLE_EVT_MAX,
};
enum bt_sample_adv_st {
BT_SAMPLE_ST_ADV,
BT_SAMPLE_ST_CONNECTED,
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
> HCI Event: LE Meta Event (0x3e) plen 57 #467 14.708869
LE Extended Advertising Report (0x0d)
Num reports: 1
Entry 0
Event type: 0x0001
Props: 0x0001
Connectable
Data status: Complete
Address type: Random (0x01)
Address: FC:49:49:27:11:81 (Static)
Primary PHY: LE 1M
Secondary PHY: LE 2M
SID: 0x00
TX power: 127 dBm
RSSI: -62 dBm (0xc2)
Periodic advertising interval: 0.00 msec (0x0000)
Direct address type: Public (0x00)
Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
Data length: 0x1f
0d 09 74 65 73 74 5f 65 78 74 5f 61 64 76 10 ff ..test_ext_adv..
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............