The code I come up with is available at https://gist.github.com/alessionossa/72 ... 0e4e71bc20, however the code on ESP32 gets stuck, probably because the current code requires too many parallel operations. I tried using both threads and uasyncio, but I was not able to get a working solution.
The structure is:
- A server that listens on two ports:
- First port is for the connection from the ESP32 board, this connection is persistent and the TCP tunnel will be used to forward traffic to the microcontroller.
- Second port is for the external connection from WebREPL client.
- The script on ESP32, which connects to the server creating a TCP tunnel and forwards the data coming from the tunnel to WebREPL's port.