TinyUSB: Open-source cross-platform USB Host/Device stack for embedded systems
docs.tinyusb.org
docs.tinyusb.org
I wonder how much work it would be to create a no_std sys crate to use this from a rust context. (I see some interest from Tock users in the GitHub issue discussions.)
The github repo for the TinyUSB project: https://github.com/hathach/tinyusb
EDIT:
I spoke too soon, there's already a tinyusb-sys crate here [0]!
TinyUSB was very easy to use. It was my first foray into USB devices and adapting the example code was straight forward.
I wrote the code in C but I could have done it in python also but I didn't as you need ms accuracy for decoding morse code and I wasn't sure it would be fast enough.
There are examples for pretty much any usb peripheral you can think of here: https://github.com/hathach/tinyusb/tree/master/examples/devi...
TinyUSB allows a programmable chip (e.g. ESP32, SAM, STM32) to read USB flash drives, or behave as a keyboard and mouse.
A similar library for Arduino is V-USB.
https://hackaday.com/tag/tinyusb/
Question for the experts: is it possible to do USB pass-through monitoring?
Specifically, I have an Apple Magic Keyboard connected to the Dell work PC. I'd like to capture the F7-F12 keys, and use them to control the music on my iPod. Currently I use an AutoHotKey script to send serial commands from the PC, but having 2 FTDI cables plugged in sometimes causes issues.
Yes, I'm effectively suggesting a keylogger, but without trying to record the keystrokes, just use them to trigger another UART. It could also be really nice to remap the Command key to Ctrl (again, I work around this with AutoHotKey, but it's imperfect).
I saw it posted here on HN[1], and have been using it since then with great success.
[0] https://github.com/haimgel/display-switch [1] https://news.ycombinator.com/item?id=29608967
I fear it would need something a little bit more complex than just an Arduino on the hardware side. For some options, you could take a look at some recent versions of Facedancer [0] and their HW requirements.
As long as you have genuine FTDI cables or at least ones that expose an unique serial number, you can use udev rules to have clean reproducible device names: https://askubuntu.com/a/165262/777894
You're not kidding, that is very impressive. I always find it fascinating what some people manage to achieve with bit-banging.
This is one I remember being quite impressed with back in the day:
https://hackaday.com/2011/05/10/bit-banging-vga-from-an-sd-c...
http://digistump.com/products/1
https://github.com/digistump/DigisparkArduinoIntegration/tre...
The utility of it diminished with the availability of AVR devices with integrated USB peripherals. There's LUFA to help with their use: http://www.fourwalledcubicle.com/LUFA.php
[1] https://github.com/earlephilhower/arduino-pico [2] https://github.com/adafruit/Adafruit_TinyUSB_Arduino
ps. I'm aware of megadrum (.info) and Mios (ucapps.de), just wanted to see if I could make something similar, albeit much smaller, by myself.