Repository navigation
Support USB host (rp2) #5986
Description
Activity
Thanks for adding this, @dhalbert!
We have a number of "conversion" projects that take old equipment and convert them to current standards. The most successful is the IntelliKeys adapter https://github.com/ATMakersOrg/IKeysAdapter It takes an old product that is STILL the best device for many folks with cerebral palsy and makes it work with any modern operating system.
The solution we made took two Trinket M0's back to back and talked over UART. It works, and we've got over a hundred in the field now. But it's clunky, costs more than it should & relies on weird cables (micro-B to Full-Sized B). @ladyada was good enough to add the diode bypass on the RP2040 QT Py which lets us use those, but the host library we're working doesn't support the RP2040 yet, so we're using a weird hybrid: CircuitPython on the RP2040 talking UART to a Trinket M0 running Arduino. It works, but again, it seems clumsy.
I recently saw this solution that uses the RP2040's PIO system to add a USB Host port on two GPIO pins https://github.com/sekigon-gonnoc/Pico-PIO-USB. It supports everything we'd need, but is not in a useful environment (neither Arduino nor CP). If this same PIO code was to work as a CP module (or arduino library), it would be amazing. I can even see simple #BFF or #FeatherWing boards that just had a female USB-A jack and some passives.
Anyway, please know that we'd put this to very good use - let me know if I can help
BillReacted by David GlaudeI'd like to take a look at adding USB Host support for the RP2040, but I'm not sure where to start. I saw the change made by @tannewt in #6125, but it sounds like support needs to first be added to TinyUSB? Would love to help out in whatever way I can. I'm comfortable writing C, but I don't have any driver/microcontroller development experience.
@tannewt is off for 4-5 weeks, so I'd say to wait. He will be back and be able to answer questions authoritatively then.
Reacted by Ryan Chan@rycwo I don't believe TinyUSB has support in its main branch yet. It's waiting on sekigon-gonnoc/Pico-PIO-USB#22
So, progress is being made but isn't there yet. Once it is, we'll also need to connect the actual reading and writing of packets to the new TinyUSB API for it. You could start this on iMX for now if you are eager. We're happy to help ramp folks up to contributing to CircuitPython. Chatting with us on Discord is a good place to start: https:/adafru.it/discord
Thanks!
Reacted by Maksim ReshetnikovThanks for the info. I'll reach out on Discord for more information!
- added a commit that references this issue
on Jul 8, 2023 Wow, this is huge! Thank you!
Reacted by Spencer Thayer and Ryan ChanWow, this is huge! Thank you!
Thanks! It isn't bug free so please file issues as you find them.
Reacted by Spencer ThayerI just saw your YouTube live video @tannewt. Amazing timing that you just completed it today! Congrats!
Anyway in that video you casually mentioned eventually being able to connect a USB device to an ESP32-S3 Feather and use it with an iPad over Bluetooth. I am looking into possibly doing that for my ZSA Moonlander, any ideas on how one would accomplish this feat using circuitPython?
Anyway in that video you casually mentioned eventually being able to connect a USB device to an ESP32-S3 Feather and use it with an iPad over Bluetooth. I am looking into possibly doing that for my ZSA Moonlander, any ideas on how one would accomplish this feat using circuitPython?
We don't have a device that does usb host and ble unfortunately. So, you'd need to come up with a two device solution for now. (Maybe hid reports over UART would be enough.)
We don't have a device that does usb host and ble unfortunately.
Wouldn't that just be any of the Pico form factor RP2040 boards + https://www.waveshare.com/wiki/Pico-BLE ?
We don't have a device that does usb host and ble unfortunately.
Wouldn't that just be any of the Pico form factor RP2040 boards + https://www.waveshare.com/wiki/Pico-BLE ?
I consider that two devices because it is two ICs. It can probably be made to work, just not from CircuitPython only.
It can probably be made to work, just not from CircuitPython only.
Shame, I am trying to figure out how to do this with just CircuitPython.
From @ATMakersBill in #5630 (comment):