Skip to content

Commit 27525a3

Browse files
committed
btstack: prepare for packet logs
1 parent 82fd266 commit 27525a3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pico_w/bt/picow_bt_example_common.c

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include "pico/cyw43_arch.h"
1313
#include "pico/stdlib.h"
1414
#include "btstack.h"
15+
#include "hci_dump.h"
16+
#include "hci_dump_embedded_stdout.h"
1517

1618
#if defined(WIFI_SSID) && defined(WIFI_PASSWORD)
1719
#define TEST_BTWIFI 1
@@ -87,6 +89,12 @@ int picow_bt_example_init(void) {
8789
void picow_bt_example_main(void) {
8890

8991
btstack_main(0, NULL);
92+
93+
// if WANT_HCI_DUMP=1, enable debug output as well as packet logger
94+
#if WANT_HCI_DUMP
95+
hci_dump_init(hci_dump_embedded_stdout_get_instance());
96+
hci_dump_enable_packet_log(true);
97+
#endif
9098

9199
#if TEST_BTWIFI
92100
uint32_t start_ms = to_ms_since_boot(get_absolute_time());

0 commit comments

Comments
 (0)