diff --git a/README.md b/README.md index 1b693554a..ff0507e59 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,8 @@ default being *background*. This can be changed by passing `-DBTSTACK_EXAMPLE_TY examples can be built (which may be slow) by passing `-DBTSTACK_EXAMPLE_TYPE=all` Freertos versions can only be built if `FREERTOS_KERNEL_PATH` is defined. +Some of the bluetooth examples require code in [pico-extras](git@github.com:raspberrypi/pico-extras.git). Pass `-DPICO_EXTRAS_PATH=${HOME}/pico-extras` on the cmake command line or define `PICO_EXTRAS_PATH=${HOME}/pico-extras` in your environment and re-run cmake to include them. + App|Description ---|--- [picow_bt_example_a2dp_sink_demo](https://github.com/bluekitchen/btstack/tree/master/example/a2dp_sink_demo.c) | A2DP Sink - Receive Audio Stream and Control Playback. diff --git a/pico_w/bt/README.md b/pico_w/bt/README.md new file mode 100644 index 000000000..158f3a810 --- /dev/null +++ b/pico_w/bt/README.md @@ -0,0 +1,18 @@ +# Pico W Bluetooth Examples + +The source for most of the Bluetooth examples is stored in pico-sdk/lib/btstack/example. +There's a standalone example in `pico-examples/pico_w/bt/standalone`. + +## Debugging + +To debug bluetooth issues you can enable btstack debug output which also enables packet logging. +Define `WANT_HCI_DUMP=1` in your CMakeLists.txt file. Uncomment this line to enable debug in the btstack examples. + + target_compile_definitions(picow_bt_example_common INTERFACE + #WANT_HCI_DUMP=1 # This enables btstack debug + ) + +## Packet logging + +To view packet logs, save the output from the debug port (e.g. the uart) to a file and run `pico-sdk/btstack/tools/create_packet_log.py `. +This will generate a file with the same name except for a `pklg` extension. This can be opened in the Wireshark application to analyze communications activity.