-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Long audio_control_interface_name appears to be incompatible with Windows #9871
Comments
Update : |
The pasted code above has a broken line, with missing text at the end. Maybe this is just a copy-paste error into the issue? Could you check that and edit your original post, if necessary? Any errors in |
It was a copy/paste error, I corrected the above post. |
Just as a data point, I put the updated code in the
The device also appears in the devices I can use with Linux command-line MIDI playback software like Did you try more than one piece of MIDI software on Windows? Do you mind saying what software you did try? What if you specify a name, but make it the exact same name that CircuitPython uses? - iInterface 9 CircuitPython Audio
+ iInterface 9 new_audio_control_interface_name
- iInterface 8 CircuitPython MIDI
+ iInterface 8 new_streaming_interface_name
- iJack 10 CircuitPython usb_midi.ports[0]
+ iJack 10 new_in_jack_name
- iJack 11 CircuitPython usb_midi.ports[0]
+ iJack 11 new_out_jack_name Two more random notes:
I only use Linux and am a only a MIDI dabbler so feel free to take any of the above with a huge grain of salt. |
I used MidiOX, MidiView and Bome to verify I could talk to the midi device or not. Every time I change the name, I delete the device from the device manager so that it can be detected again with the proper name. Otherwise, the old name "sticks". I will try more scenarios and report back. |
Using the same names that CircuitPython uses by default, it works : |
OK, it's helpful to know it's not specific to a single piece of Windows software, and that it's probably not a problem with cached device info (unless all three of those programs have device info caches with the exact same bug which is unlikely) I tested on a different microcontroller than you did (just because of what was at my workspace), but the USB descriptor code is the same for every kind of device as far as I know. |
I spent a long time debugging a similar problem on macOS : https://forums.adafruit.com/viewtopic.php?t=212247. I think I replicated your problem, using MIDITools to list the devices. I also deleted the device from Device Manager each time, and even rebooted once. It might be worth searching the Windows Registry for the original jack names after deleting the device. The fact that it works when you restore the original jack names, even explicitly, suggests to me some kind of caching problem. |
If I reduce the length |
Not really sure what else I can try. Is there a way to confirm if it's a length issue for the fields in usb_midi.set_names? |
It seems like there is a length issue. If you use a shorter name, it's working fine for you now? We'll look at the length issue and fix it. |
Correct. If I do not use the provided example and use shorter values instead, it works. So, this is solved for me. |
USB limits "string descriptors" to 126 Unciode code points. I skimmed the USB MIDI standard and did not see any additional restriction imposed on the interface names. However, we also can't effectively argue with whatever it is Windows is doing. Is the "fix" to note in the documentation that "some operating systems (Windows) require descriptors be at most 31 ASCII letters or 31 Unicode code points"? It'd be too bad to break someone's working project on Linux, which did not appear to have any such limitation. |
CircuitPython version
Code/REPL
Behavior
On my device, if I input this code in the boot.py file, it does indeed change the midi device name in the windows device manager. However, the device does not show up in windows midi software anymore.
If I comment out the line that starts with usb_midi.set_names, the midi device works again, with the default name (CircuitPython Audio).
I'm using the example code from #9146
Description
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: