4 ms·
Anrdoid and iOS don't support USB HID natively. The iPod does with Rockbox, but I'm probably the only person still carrying one around. The best solution I've
by peterburkimsher 2y ago
Anrdoid and iOS don't support USB HID natively. The iPod does with Rockbox, but I'm probably the only person still carrying one around.
The best solution I've found for pocket-sized USB HID is an EspUSB Tiny:
https://github.com/cnlohr/espusb https://github.com/cnlohr/espusb
It's an ESP8285 acting as a USB keyboard, with the keystrokes coming over WiFi from a nearby phone.
- monocasa 2y agoA rooted android can. https://github.com/tejado/android-usb-gadget https://github.com/tejado/android-usb-gadget
- numpad0 2y agoActing like USB HID and hosting USB HID devices are two different things, GP's suggestion might be possible with Android Open Accessory(aka abusing adb in Google sanctioned way) or through a rooted phone with a custom kernel mode gadget driver. An RP2040 device with 2 USB downstream facing port and 1 USB upstream facing port can be made, stuffed into a conspicuous Y-cable, appropriately programmed and appear as a single USB keyboard. Out of my reach but not impossible.
- monocasa 2y agoJust going to through out there that you don't need a custom kernel driver to do this on Android. There's a userspace gadget API; you only need a rooted phone to have the permissions to access the relevant device and config files. http://www.linux-usb.org/gadget/usb.c http://www.linux-usb.org/gadget/usb.c
- brokenmachine 2y agoESP32-S2, ESP32-C3 and ESP32-S3 have USB-OTG to act as USB Hosts. I've seen cheap ESP32-S3 boards with two USBC connectors, one for USB-OTG and the other to connect to the PC. edit: Actually the port to connect to the PC goes through a UART chip, so you can't emulate HID devices using that port. So it won't work.
- felixg3 2y agoDo you have a suggestion for a Bluetooth HID bridge? To use Bluetooth mice and keyboards with a generic dongle that presents as a usb HID to the computer, similar to how apple does peripheral support?
- peterburkimsher 2y agoAre you looking for a product, or one to build yourself? If you want a product, why not just get a USB-Bluetooth adaptor? It would support HID as well as A2DP (music) and other Bluetooth protocols. If you want to build something, I'd recommend getting a board with an ESP32. The ESP32 comes with plenty of example code in their esp-idf SDK. You'd be needing: esp-idf/examples/peripherals/usb/device/tusb_hid esp-idf/examples/bluetooth/esp_hid_host