I have an ESP32-S3-N16R8 devkit board with two USB ports and I have a device that communicates via Serial USB. I want to read serial data from ESP32 board and process it. So the ESP32 board should act as a USB host. I couldn't find any useful documentation about it. What is the best way to achieve this? Preferably in the Arduino framework but I'm also open to using ESP-IDF.
1 Answer 1
Many (but not all, see the link below for details) modern USB-Serial adapters implement a standard USB device class called CDC-ACM. It's standardised by USB something something, so manufacturer specific drivers are not required. ESP IDF seems to have both host support and class drivers for CDC-ACM (and since Arduino is built on top of ESP IDF, maybe someone has built a nice convenient wrapper). Sample project is here:
https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/cdc/cdc_acm_vcp
Edit: here you go, someone made a corresponding library for Arduino also. No idea how it works:
https://github.com/bertmelis/USBHostSerial
Comments
Explore related questions
See similar questions with these tags.