Closed ozarchie closed 5 years ago
cnlohr USB code only works on ESP8266
OK, but I was proposing a new way to do it by monitoring and echoing the bit levels. cnlohr reads and interprets data, thus limiting the speed. My suggestion is to echo the data pins and let the HostDevice do the reading and interpreting.
The esp32 is a serializer/de-serializer over WiFi. The start/end conditions (D+/D- states) are monitored, but the data is then just echoed from the pins to WiFi, using UART/SPI/whatever and DMA. I am just not sure whether ESPNOW is fast enough.
USB Low Speed goes as low as 1.5Mbit/s. I've never managed to get ESP-NOW above 400Kbit/s. We are not even discussing overhead and latency/jitter here to make USB work :)
Nice idea tho, +1 for that!
I am investigating a transparent USB bridge using two ESP32s communicating using ESPNOW.
For my existing serial bridge:
I am using ESPNOW as a transparent serial comms link using two ESP32s (ESP8266 also work). Each device simply receives serial data, places it into an ESPNOW packet, and transmits via WiFi. At the same time, it receives any ESPNOW packet destined for it, puts it into a serial buffer and transmits it to the serial data pin. The Host serial plugs into the USB port and is recognised as a COMn device The Device serial plugs into the ESP32 TTL pins via logic/level convertors.
For the proposed USB bridge:
As the communication is half duplex, no collisions should occur.
My question is: Do you thing the ESP32/ESPNOW combination is fast enough to handle this?
Hardware:
Board: ESP32 Doit Core Installation/update date: Current IDE name: Platform.io Flash Frequency:
PSRAM enabled:
Upload Speed:
Computer OS: Windows 10