rppicomidi / midi2usbhost

Make a Raspberry Pi Pico a USB Host to bridge modern USB MIDI to old school MIDI IN and MIDI OUT
MIT License
134 stars 22 forks source link

Problems with devices with multiple virtual cables #7

Closed DatanoiseTV closed 1 year ago

DatanoiseTV commented 2 years ago

When using a Novation 24SL MKII for example, which presents itself as a 4 virtual cable device, the device will not work and report:

WARN: starting new transfer on already active ep 0 in
WARN: startassertion "!(buf_ctrl & USB_BUF_CTRL_FULL)" failed: file "/home/xxx/dev/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.c", line 219, function: sync_ep_buffer
rppicomidi commented 2 years ago

@DatanoiseTV do you see the same issue if you try the midi2usbhub project? The same hardware should work, except now you have to use the CLI to route MIDI. It uses the latest MIDI host stack. I was able to use an Arturia Keylab Essential 88 with it; it has 2 virtual cables.

DatanoiseTV commented 2 years ago

@rppicomidi I didn't check that yet. What are the major differences between the USB MIDI Host implementation? I can give it a go tomorrow (and also send you some debug logs with increased verbosity, if that helps).

rppicomidi commented 2 years ago

@DatanoiseTV The major differences between the USB MIDI Host implementations are

Also, I just pushed up some code I have been testing on my local machine. It handles USB packets received differently. Will you please pull the latest code for this project and test it? This code will route only messages from virtual cable 0 to the UART MIDI Out and it should handle receiving packets from multiple virtual cables that arrive in a single USB transfer.

If you do test the midi2usbhub project, please be aware there is no default routing. You will have to use the CLI to choose which virtual cable will send data to the MIDI UART, and you will have to choose to which virtual cable the MIDI UART will send data.

rppicomidi commented 1 year ago

@DatanoiseTV Did the change I to USB packet handling fix your issue?

DatanoiseTV commented 1 year ago

@DatanoiseTV Did the change I to USB packet handling fix your issue?

Yes, mostly. Sometimes when replugging devices some issues appear, but seldomly and in a random fashion.

rppicomidi commented 1 year ago

OK Thanks. I will close this issue. If you can describe what happens when replugging in a separate issue, I would appreciate it.