is this a question about how to send hex data or how to use the usb/serial interface?
you can use the same usb/com port used to download and communicate with the esp using the serial monitor without the Arduino IDE using a PC com interface program
all data sent over a serial interface is binary. ASCII characters can be displayed directly. binary data can be displayed in a number of ways: bits, octal, hex, decimal, ...
as i said, any PC program can be used to send/receive serial data over the USB com port used by the Arduino IDE. but 2 programs can't use the same com port at the same time. the Arduino IDE can't be running when using some other PC program to access the port.
I understand...
I connect usb device, like card reader, with usb interface to ESP32.
card reader support HEX-command and I try to send this them from my esp32 board
Hi,
I have the same issue. I have a QR reader which outputs USB data. When I connect it to the PC and open Word/Excel etc... the data is automatically written, so I can see that it is working.
I now need to connect the d+ (green cable) and d- (white) connections to the ESP32 (C3 Mini 1) , using GPIO 18 and 19 (D-and D+). I do not need the Tx and RX pins, since these are used by the usb-to-uart CP2102 chip.
I know data is coming out from the QR reader in ASCII format. However, I do not know, and have not found any code, on how to read this data from the D+ and D- pins of the ESP32. Ideally, I would read them into a buffer, then send them through serial to the PC through the normal usb serial COM port.
thanks
M
Check the ESP32-C3 datasheet. I recall it does not support USB host. In fact,
even in device mode it cannot do mouse or keyboard. The USB controller is
hardware wired only for CDC ACM and JTAG. You need an ESP32-S2 or ESP32-S3 for
USB OTG.