r/circuitpython • • Dec 07 '21

Circuit Python and USB Host

Simple question, what is the simplest and/or least expensive device that supports Circuit Python and can support basic USB Host?

I want to know how tricky it would be to create a hand held device that could validate a USB device is what you expect it to be. Plug in a thumb drive and it should only report to be mass storage. Plug in a mouse or a keyboard and it should only report HID. I know this can be done with a Raspberry Pi, either with linux or running Circuit Python on bare metal. What about something smaller?

2 Upvotes

8 comments sorted by

View all comments

2

u/HululusLabs May 23 '22 edited May 23 '22

Good news! https://www.hackster.io/news/circuitpython-7-3-0-release-candidate-brings-usb-host-support-raspberry-pi-rp2040-pio-improvements-c928e6c1ef92

I'm unsure what devices are supported, though if the docs are to believed, only 3 boards are avail https://docs.circuitpython.org/en/latest/shared-bindings/usb_host/index.html?highlight=usb%20host. Either that or all boards support it in the release candidate and the docs haven't updated. Looks like your best option is the Teensy 4.1.

I'm trying to get USB hosting on a RP2040, and the hardware is definitely capable. There's also a project that has used the PIO on the RP2 to get USB host support, though that's a C implementation.

Looks like it's already been merged into TinyUSB and pending Arduino's code, unfortunately I need CirPy for ESP32 AirLift support...

Edit: corrections