Multiple identical USB MIDI device naming/ordering
Posted: Fri Sep 06, 2024 5:43 pm
I'm looking into streamlining our setup/crash recovery process, and one main difficulty we encounter is the inconsistent naming/ordering of our two Akai MkIIs. I see that this is a well known issue:
https://forum.qlcplus.org/viewtopic.php ... ber#p71880
https://forum.qlcplus.org/viewtopic.php ... ber#p63347
Where instead of appending the nonexistent serial number, I want to append an identifier corresponding to the USB port the device is plugged into on the Pi. This way we can ensure some consistency by being mindful of which controller enters which port.
Does this sound feasible? I'm not familiar enough with raspberry pis to know if the usb ports are indentified consistently on boot. Also, we use the prebuilt pi image - if I make minor code changes and compile, is it straightforward to swap out the binary within the image?
Thanks!
https://forum.qlcplus.org/viewtopic.php ... ber#p71880
I'm hopefully going to be able to borrow our full setup from my buddy and find some time to poke around in a couple of weeks. I'm curious to see if I can implement something similar to these:The 'issue' is that USB devices do not reveal their serial number or any information which is unique to that device.
So when QLC+ (and other programs) list up the connected devices, it sees 2 identical devices and connects them. In which order is arbitrarily...
https://forum.qlcplus.org/viewtopic.php ... ber#p63347
https://github.com/mcallegari/qlcplus/pull/1571So a few days ago I finally found some time to limit this behaviour and make QLC+ behave consistently over startups.
Where possible, I added a serial number to the device name, like this: USB-RS485 Cable (S/N: ABCD1234)
Network interface names, instead, are unique by definition.
MIDI controllers and HID devices, unfortunately, don't have any unique identifier, so two controllers with the same name will still have an issue.
These unique names will be saved into your project, so at the next QLC+ startup, a match by name will be looked up, instead of a dumb index lookup.
If no name match is found (e.g. device disconnected or replaced), the previous method by index is used, which in some cases might be useful.
Where instead of appending the nonexistent serial number, I want to append an identifier corresponding to the USB port the device is plugged into on the Pi. This way we can ensure some consistency by being mindful of which controller enters which port.
Does this sound feasible? I'm not familiar enough with raspberry pis to know if the usb ports are indentified consistently on boot. Also, we use the prebuilt pi image - if I make minor code changes and compile, is it straightforward to swap out the binary within the image?
Thanks!