-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Help Wanted] Some devices don't seem to mount #15
Comments
@KBLiveSolutions I will get to your issue in a minute. However, here is a hint about putting a link in a GitHub issue. Write them like this:
for example
It will look like this: Now to address your question. There are many reasons why the device may fail to mount. The issue could be electrical or software. Generally, the main hardware issue is not providing the required voltage or power for the device. Connecting a powered hub between the Pico and the device should fix that one. The other big issue I have found is device's USB configuration descriptor is either too large or too complex for the software to parse. Sometimes the USB configuration descriptor is not USB MIDI class compliant. If you have to load a driver on a PC or Mac for your device to work with common MIDI utilities on your computer, then the device is not MIDI class compliant. Please read the I hope this helps. |
First off, thanks again for your help and patience, especially when my issues are so well documented.
to my sketch, and had to comment out Now on the hardware debugging itself, I've noticed another thing : when running my sketch, if I plug a recognized controller, I can mount it and unmount it as much as I want, but as soon as I plug my unrecognized controler, then the recognized one doesn't mount anymore, although the loop is still active, as if the host was down. |
To make sure you are not having power or signal level issues, I do recommend connecting a powered USB hub between your MIDI device and the Pico board. Only connect one MIDI device to the hub at a time. The powered hub will make sure the MIDI device is getting the right power level and it will clean up any weak signal levels between the Pico and the MIDI device. If it still doesn't work, then read further. The Serial1 output comes out of the UART0 port on pins 1 and 2 of the Raspberry Pi Pico. You need a UART to USB converter to see that output. You need to run a separate terminal program to look at that output and to capture it to a text file. If what I just said makes no sense to you, do not worry. You can check if the MIDI devices are USB class compliant MIDI devices. I warn you that I have very limited Mac experience, so perhaps check what I say before you do anything. Do you have Mac Homebrew installed? If not, and you are willing to do it, please install Homebrew. If so, please install the
Then plug one of the problem MIDI devices to your computer. Type
to list the connected devices. They should list with a VID:PID hardware ID number pair. Then type
where Copy the Once you prove me with the full USB descriptor dump for each MIDI device that |
Ok thanks.
Here is a device that lights up but doesn't mount (Exquis MPE MIDI controller) :
And here's one that doesn't light up nor mount (the cheap USB to MIDI converter):
|
@KBLiveSolutions Sorry, but I really need to see the real USB device descriptor and real configuration descriptor. See the instructions here. The sample Plug the Exquis MPE MIDI controller to your Mac and type
If the output has no Device Descriptor and Configuration Descriptor headings in the output, try installing I know linux-like version of the lsusb command exists for my 2012 Intel Mac Mini because I use it from time to time. If all those fail with your Mac, do you have Linux machine (has |
ok, so here is what I got for Exquis (using the PC app). Apparently there are some errors, although it mounts correctly on my mac or on the PC.
and this is the output for the USB-MIDI adaptor (using lsusb):
hope this helps you figuring out what's going on. |
@KBLiveSolutions Thank you. I will work on this as soon as I have time. Right away I see that the Exquis has a wrong DeviceClass and DeviceSubClass in the device descriptor. The descriptor parser is also reporting length errors. I will have to dig in code to see if that matters and if that is the cause of the issue. |
The reason the Exquis does not work with my code is the wTotalLength field of the Configuration Descriptor is 133 (0x85). The actual length of the descriptor, if you add up the bytes, is 103 (0x67). The TinyUSB code tries to parse bytes past the end of the real configuration descriptor. There is nothing my driver, which relies on TinyUSB, can do about that. TinyUSB ignores the device class information in the Device Descriptor. Nevertheless, the bDeviceClass, bDeviceSubClass, and bDeviceProtocol fields should all be 0 for a MIDI device. If you can contact the manufacturer and request a firmware update, that should solve your problem. Alternatively, you could request a change to the Adafruit_TinyUSB project to be more robust to incorrect wTotalLength field in the Configuration Descriptor. Does the Exquis properly enumerate on a Windows PC without installing special software? |
Hi Thanks for your feedback. Did you have a moment to look at the 2nd USB device ? It seems to have errors in the bDescriptorSubtype. Similar issue ?
|
@KBLiveSolutions The second one is not obvious to me right off from the descriptor. The (invalid) tags on the bDescriptorSubtye 1 lines are not correct; see the USB MIDI Class spec. The configuration descriptor length is correct at 117 bytes. I need to see the serial port debug log from the TinyUSB stack. To generate the debug log, you need to hook a UART to USB adapter to the Pico board pins 1 and 2 and you need to capture the debug output on a serial port terminal on your computer. You should capture the debug log for log level = 1 and log level = 2. If you need help doing that, please reach out to the Raspberry Pi Pico forums, the TinyUSB documentation, and the TinyUSB Discussions. Without that information, I cannot tell what is going on. |
Most of the MIDI controllers I've tried mount and work perfectly, but a few of them don't show up.
For instance I tried this cheap USB to MIDI converter, and when I connect it, it doesn't light up and I don't get the "Device attached" log message.
When connecting this controller, the lights turn on, but once again I don't have any message.
Do you have any idea about what could be the cause ?
What is your setup like?
Arduino
Raspberry Pi Pico
Mac
Sonoma
0.6.1
Arduino IDE 2.3.2
Arduino IDE+USB cable
Attach any additional information to help explain the issue
Attach log files, screenshots, etc.
The text was updated successfully, but these errors were encountered: