raspberrypi / pico-examples

BSD 3-Clause "New" or "Revised" License
2.62k stars 779 forks source link

BTstack prepare for packet logs #425

Open mringwal opened 9 months ago

mringwal commented 9 months ago

When users have problems, the most efficient way is to analyze the packet logs. This PR makes it easier to enable the packet logger.

peterharperuk commented 9 months ago

I'll switch this to develop if you don't mind.

mringwal commented 9 months ago

Sorry, both should have been for 'develop'

peterharperuk commented 9 months ago

We do some of this in the sdk https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/pico_cyw43_driver/btstack_cyw43.c#L54 where we also check ENABLE_SEGGER_RTT. Maybe we should call hci_dump_enable_packet_log in there as well?

mringwal commented 9 months ago

I see. In this case, we can close this PR. The logger is on by default, so that's fine, too.

The point is, how would people (incl. me) find this?

peterharperuk commented 9 months ago

Maybe I should add a README for the bluetooth examples? The macro is commented out here https://github.com/raspberrypi/pico-examples/blob/master/pico_w/bt/CMakeLists.txt#L53

mringwal commented 9 months ago

A README would be great!

peterharperuk commented 9 months ago

Is this any good? https://github.com/raspberrypi/pico-examples/pull/427