jeelabs / esp-link

esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer
Other
2.82k stars 720 forks source link

Esp link as an serial to usb endpoint? Fully transparent serial bridge? #508

Open rlesac opened 3 years ago

rlesac commented 3 years ago

Hi! Is there a way to use ESP-LINK as a receiver for another ESP-LINK? So I can plug the ESP-LINK to an UART->USB and communicate through it to another ESP-LINK? Without virtual serial drivers.

RoganDawes commented 3 years ago

Yes, it should be possible, assuming:

Conceptually, it's not an impossible task, but may require a bit of coding to get it working reliably. I'm assuming reliability and ease of use is a requirement, otherwise making use of virtual drivers would probably be an easier approach.

For bonus points, since the ESP8266 supports automatic baud rate detection on its serial port, you could have it automatically detect the baud rate from the connected USB-UART and pass those parameters to the target esp-link via an HTTP call.

However, if I was building this, I'd skip the USB-UART plus ESP8266 entirely, and use an ESP32-S2, which has a native USB interface. From there, implement USB-UART to TCP functionality, which, since both UAB-UART and TCP functionality already exists, is pretty much gluing the two pieces together, potentially with some configuration interface on top, accessed either via USB or WiFi/HTTP.

uzi18 commented 3 years ago

Yes there is demand for such feature, but this client mode should be added to. One need to find some spere time to develop it.

vinura commented 3 years ago

yes there is a demand, I am searching for a proper solution since last year. The closest I cam is to use a raspberry pi and convert udp port back to serial using socat.

socat -d -d UDP-LISTEN:14550 /dev/ttyS0,b921600,raw,echo=0

rraat commented 3 years ago

Doesn't the, stock AT firmware (Hayes compatible modem) Work for the dial out side?

RoganDawes commented 3 years ago

The AT firmware can make a dial-out connection, when instructed externally. The point of this discussion (as I understand it) is for that outbound connection to be made automatically, possibly on powerup, and then maintained going forward, should the connection drop for any reason.