tobozo / ESP32-USB-Soft-Host

An Arduino wrapper to @sdima1357's usb_soft_host esp-idf example
GNU Affero General Public License v3.0
294 stars 44 forks source link
arduino esp-idf esp32 esp32s2 espressif hid usb usb-soft-host

ESP32 USB Soft Host library for Arduino IDE

What is it?

This is mainly a wrapper around the excellent work of Dmitry Samsonov (@sdima1357) with esp32_usb_soft_host

Some parts of the code (e.g. the timer group isr calls) have been regressed to fit esp-idf 3.3 needs but it has been tested up to 4.4.2.

USB Low Speed is slow

ESP32 USB-LS Soft host (:warning: LS=low speed) is a pure software implementation of USB host thru general IO pins.

Features

The library supports up to 4 HID low speed devices simultaneously. A callback can be attached both for detection and events.

Hardware support

This library has been tested on ESP32-Wroom/Wrover and works fine as long as the pins aren't shared (beware of the psram pins!).

It has partial support for ESP32-S2, and remains untested on ESP32-S3 && ESP32-C3.

Known working HID devices:

Status Brand Model Name idVendor idProduct Init Events Comments
:smile: LogiLink ID0062 0x1a2c 0x0042 10/10 10/10 Low cost 3 buttons mouse
:smile: Microsoft Intellimouse 1.1 0x045e 0x0039 10/10 10/10
:smile: A4Tech SWOP-48 0x093a 0x2510 10/10 10/10
:smile: Genius Netscroll 110X 0x0458 0x003a 10/10 10/10
:no_mouth: Logitech M-UV55A 0x046d 0xc016 10/10 7/10 Brand is advertised as ASUS/Logitech
:no_mouth: Microsoft Wheel Mouse 0x045e 0x0040 6/10 6/10
:no_mouth: A4Tech OP-720 0x093a 0x2510 10/10 5/10
:cold_face: Logitech M-BT83 0x046d 0xc03e 5/10 5/10
:cold_face: Logitech B100 0x046d 0xc077 10/10 3/10
:skull: Oklick 305m n/a n/a 10/10 0/10
:skull: Exegate SH-9018 n/a n/a 10/10 0/10 Device reaction looks like Oklick-305m
:skull: A4Tech X-7??? 0x09da 0x8090 0/10 0/10 Gaming mouse w/o label

Proof of concept:

Credits: