Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTstack prepare for packet logs #425

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mringwal
Copy link
Contributor

@mringwal mringwal commented Oct 3, 2023

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
Copy link
Contributor

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

@mringwal
Copy link
Contributor Author

mringwal commented Oct 3, 2023

Sorry, both should have been for 'develop'

@mringwal mringwal changed the title Btstack prepare for packet logs BTstack prepare for packet logs Oct 3, 2023
@peterharperuk peterharperuk changed the base branch from master to develop October 3, 2023 12:39
@peterharperuk
Copy link
Contributor

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
Copy link
Contributor Author

mringwal commented Oct 3, 2023

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
Copy link
Contributor

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
Copy link
Contributor Author

mringwal commented Oct 3, 2023

A README would be great!

@peterharperuk
Copy link
Contributor

Is this any good? #427

@@ -87,6 +89,12 @@ int picow_bt_example_init(void) {
void picow_bt_example_main(void) {

btstack_main(0, NULL);

// if EANBLE_HCI_DUMP is defined, enable debug output as well as packet logger
#if ENABLE_HCI_DUMP
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an #ifdef ENABLE_HCI_DUMP with a corresponding #define ENABLE_HCI_DUMP , or an #if WANT_HCI_DUMP.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Following the readme here 3ed9698 I've used `#if WANT_HCI_DUMP' in the PR.
Any progress with the readme? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's waiting for a review.

@mringwal mringwal force-pushed the btstack-prepare-for-packet-logs branch from 697a29b to 27525a3 Compare February 24, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants