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

Issue in the bluetooth stack ? #2

Open
matbuk21 opened this issue Dec 11, 2024 · 3 comments
Open

Issue in the bluetooth stack ? #2

matbuk21 opened this issue Dec 11, 2024 · 3 comments

Comments

@matbuk21
Copy link

First, thanks for such a great project. I'm using it to make my Novation Launchpad X wireless and plan to do some filtering on the midi messages. It seems to run for a little while but then crashes with 'assertion "hci_stack->hci_packet_buffer_reserved" failed' in sdk/2.1.0/lib/btstack/src/hci.c line 4349. Seems to suggest an issue with the BT buffer.

@rppicomidi
Copy link
Owner

@matbuk21 Thank you very much for taking the time to report this issue. Do you have to be pressing buttons on the Launchpad X or does the issue happen when the system is just sitting there? Is there any pattern to this? For example, after a lot of buttons pressed, after a long interval between button presses, or something else?

@matbuk21
Copy link
Author

matbuk21 commented Dec 14, 2024

I've not really seen any pattern to it. I've tried pressing pads at random, holding multiple notes at a time and varying the pressure. Sometimes it will work for a minute or so but other times I'd be lucky to get more than a few seconds. I've also left it for a few minutes without pressing a note, but did not get any issues.

I've tried running the launchpad in programmer mode and standard live mode but both exhibit the same issue.

I'm using the Koala Sampler app on my iPad which shows the incoming data and I don't see any spurious midi messages coming in.

I did have the cable_num to 1 in tut_midi_rx_cb for this project to work with the launchpad.

Here's the error from the serial monitor

[0:] USBH Device Attach MIDI opening Interface 1 (addr = 1) MIDI opening Interface 1 (addr = 1) MIDI descriptor parsed successfully ble-midi2usbhost: MIDI device address = 1, IN endpoint 1 has 2 cables, OUT endpoint 1 has 2 cables assertion "hci_stack->hci_packet_buffer_reserved" failed: file "/Users/matthewbarnett/.pico-sdk/sdk/2.1.0/lib/btstack/src/hci.c", line 4349, function: event_handler

@rppicomidi
Copy link
Owner

@matbuk21 OK. I will look into this as soon as I am able. Might be a week or two, though. from your description, I suspect it is a conflict in the async_context somewhere. Likely something I need to lock before access that I am not doing, but I will have to make the error happen myself to see what is going on. If you find the error before I do, please feel free to post a pull request.

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

No branches or pull requests

2 participants