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

Communication error between two devices #8

Open
bjonnh opened this issue Jan 31, 2025 · 4 comments
Open

Communication error between two devices #8

bjonnh opened this issue Jan 31, 2025 · 4 comments

Comments

@bjonnh
Copy link

bjonnh commented Jan 31, 2025

Connecting two devices, and talking to them via USB I am getting random errors when sending a midi file through
(always at different times so it is not related to the file itself):

Parse error decoding midi packet
99 87 2A 56 
Parse error decoding midi packet
9D C3 2A 56 
Parse error decoding midi packet
9F E1 2A 56 
Parse error decoding midi packet
A8 D7 26 62 2A 56 
Parse error decoding midi packet
AA F5 2A 56 
Parse error decoding midi packet
B6 8A 43 59 3C 57 8A 99 24 6B 2A 56 
Parse error decoding midi packet
BC E3 2A 56 
Parse error decoding midi packet
83 BC 2A 56 
Parse error decoding midi packet
8E D1 2A 56 
Parse error decoding midi packet
A0 BE 2A 56 

In some cases it even hangs one or the other device (but most of the time it hangs the one that receives)

If that can help I can ship you a bunch of picos and a programmer (so they are easier to work with).

@bjonnh
Copy link
Author

bjonnh commented Jan 31, 2025

And the two devices were 3cm apart from each other with no other metallic or electronic things around.

@rppicomidi
Copy link
Owner

@bjonnh Thank you for your kind offer to ship hardware. I should have what I need; I just don't have the time to set up the hardware and do point to point testing. I am currently trying to support some of my other projects. Which pico w USB interface are you using for your testing (host or device)?

I suspect, but have not had time to dig into it, that the issue you are seeing is the gross mismatch in bandwidth between UART MIDI and USB MIDI on the Pico W (slow) and Bluetooth LE (way faster, I think). There could also be multi-threading issues in the code because 2 cores and the fact that Bluetooth LE runs in the pico-sdk's custom interrupt mode execution context. Might be other issues, too.

The USB MIDI host is particularly slow due to the underlying host controller driver design. I am currently working on trying to speed up USB MIDI host by refining this pull request. I hope to push something up some time in early February.

@rppicomidi
Copy link
Owner

@bjonnh I should mention that I do not think the issue is radio related. The message you see gets printed if buffers overflow, too.

@bjonnh
Copy link
Author

bjonnh commented Jan 31, 2025

It is just my computer connected to the two picos by USB and they talk to each other over bluetooth. And I play a midi file on one of them.
I am not using USB Host.

But I have them both set so bluetooth gets to both usbmidi and to serial, so that may be taking more time.

I will try with physical on both sides see if that's just a bandwidth or timing problem.

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