jeelabs / esp-link

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

RS232 to UDP or TCP #574

Open jaygrovr opened 11 months ago

jaygrovr commented 11 months ago

I dont see a way to use this code to forward messages received on the uart to a UDP or TCP port? Am I missing something? I dont want to use mqtt, i just want it to send it out to a specific port so I can have node-red parse the data.

Thanks

Jason

btw, nice work on what I have so far.

yesyesuk commented 11 months ago

Hi Jason. Esp-link is a TCP server that waits for incoming connections. You need to use a client to connect to esp-link. Esp-link is not a TCP client that makes outgoing connections to an IP:port.

Once a client is connected, esp-link will forward data Serial Port <-> TCP in both directions over that TCP connection.

jaygrovr commented 11 months ago

If my node-red instance makes a connection with it on the network side will I still be able to see data coming in from the serial side? Jason

Sent from Yahoo Mail on Android

On Thu, Dec 7, 2023 at 8:37 AM, @.***> wrote:

Hi Jason. Esp-link is a TCP server that waits for incoming connections. You need to use a client to connect to esp-link. Esp-link is not a TCP client that makes outgoing connections to an IP:port.

Once a client is connected, esp-link will forward data Serial Port <-> TCP in both directions over that TCP connection.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

yesyesuk commented 11 months ago

I'm not familiar with node-red (heard the name before, but that's it), but yes, this is how it works in general, and that's how I'm using it (with my own client).

jaygrovr commented 11 months ago

how do I know which port to request the data from? jason On Thursday, December 7, 2023 at 11:52:55 AM PST, yesyesuk @.***> wrote:

I'm not familiar with node-red (heard the name before, but that's it), but yes, this is how it works in general, and that's how I'm using it (with my own client).

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

yesyesuk commented 11 months ago

it's port 23