Skip to content

Support USB host (rp2) #5986

Description

@dhalbert

From @ATMakersBill in #5630 (comment):

USB Host support (on any board) would be hugely helpful to our community. I've seen this solution https://github.com/sekigon-gonnoc/Pico-PIO-USB and would love to see something like that make it into CP (even if only on the RP2040) at some point. Either way, thanks for working on this.

Activity

  1. added this to the Long term milestone on Feb 6, 2022
  2. ATMakersBill commented on Feb 6, 2022

    @ATMakersBill
    Collaborator

    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
    Bill

  3. assigned and unassigned on Feb 11, 2022
  4. added a commit that references this issue on Mar 12, 2022
  5. rycwo commented on Apr 11, 2022

    @rycwo

    I'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.

  6. dhalbert commented on Apr 11, 2022

    @dhalbert
    CollaboratorAuthor

    @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.

  7. tannewt commented on May 9, 2022

    @tannewt
    Member

    @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!

  8. rycwo commented on May 11, 2022

    @rycwo

    Thanks for the info. I'll reach out on Discord for more information!

  9. added a commit that references this issue on Jul 8, 2023
    64e4145
  10. joshmarinacci commented on Jul 11, 2023

    @joshmarinacci

    Wow, this is huge! Thank you!

  11. tannewt commented on Jul 11, 2023

    @tannewt
    Member

    Wow, this is huge! Thank you!

    Thanks! It isn't bug free so please file issues as you find them.

  12. spencerthayer commented on Jul 12, 2023

    @spencerthayer

    I 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?

  13. tannewt commented on Jul 12, 2023

    @tannewt
    Member

    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.)

  14. chabala commented on Jul 13, 2023

    @chabala

    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 ?

  15. tannewt commented on Jul 13, 2023

    @tannewt
    Member

    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.

  16. spencerthayer commented on Jul 13, 2023

    @spencerthayer

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions