-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add USB Gadget Device support #567
Conversation
… Note: Also requires a move to the latest release of circle.
Any chance to have two separate modes, selectable at booting over a switch or something? |
I see no reason in the future why we couldn't explore USB mass storage support at some point... but we need to wait for it to appear in Circle first :) Kevin |
Instructions now added to the Wiki, see: https://github.com/probonopd/MiniDexed/wiki/Hardware#usb-gadget-mode Kevin |
Thank you very much @diyelectromusic. Build for testing: |
I've done some very basic testing on the following:
And USB functionality seems to be working as I'd expect it to. Kevin |
My Akai MPC One recognizes the miniDexed RPi 3A+ as MIDIGadget and they work great together. For your information: The entry |
Yes. That is deliberate. I don't want people experimenting with enabling this without first understanding the issues around how to power the Pi and the importance of not trying to use a USB gadget link and separate power at the same time. So for the hardware reasons (which are RPi reasons, not MiniDexed reasons), although this is a nicer option for many cases, I regard this as an advanced option and thus would like to reserve it for those who have found it explicitly, and therefore have had at least a reasonable chance of reading, the wiki. Kevin |
Thank you very much @diyelectromusic! |
This fixes issue #547 and provides an option to enable USB gadget support in MiniDexed on those Raspberry Pi hardware devices that support it.
This is configuring using the following option in MiniDexed (assumed set to 0, off by default):
USBGadget=1
Note: This is not being added to MiniDexed as a comment though as USB Gadget support should not be enabled without full understanding of the hardware implications around powering the RPi and so on. Consequently, this will all be explained on the wiki and considered an "advanced" feature of MiniDexed.
USB Gadget support in Circle is still a little experimental, but this has been initially tested and shown to work on the following:
It should work on a Pi A+ too, but I don't have one to test. I don't think there is a Pi V2 that supports USB Gadget mode.
If Gadget mode is enabled on a Pi that doesn't support it then MiniDexed will halt and there will be messages logged on the console explaining why. It would be possible to allow MiniDexed to start and run normally but with no USB support (we could just not return False after initialising USB in kernel.cpp), but it was felt that this would just hide the configuration problem and cause more user confusion than forcing a halt.
There is some discussion of the implications here: #547 (comment)
IMPORTANT: This requires an upgrade to the latest version of Circle and consequently circle-stdlib. But it also uses the first new commit to the development version of Circle after the release as that includes the check of USB Gadget functionality to Pi hardware, submod.sh has been updated accordingly.
Also note: USBID.sh contains the now officially allocated (by pid.codes) MiniDexed USB Vendor and Device IDs. These should only be changed if replaced by another officially allocated USB Vendor and Device ID. These should not just be "made up".
Kevin