Sending a plain-text TCP packet

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tubeless
New user
Posts: 3
Joined: 27 Oct 2021, 10:49

Sending a plain-text TCP packet

#1 Post by tubeless » 27 Oct 2021, 16:28

Hello,

I am struggling to make use of ESPEasy to send telemetry data using TCP. Receiver is expecting clear text (telnet-like) content.
I've been able to make this work using UDP protocol, using SendToUDP command. To my surprise, there is no similar function for TCP.

Another possibility I've considered is using connectTCP(). However, it is not exposed to end-user and would require altering the code.

Any thoughts?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sending a plain-text TCP packet

#2 Post by TD-er » 27 Oct 2021, 17:08

For sending over TCP, you need to setup a connection.
So I assume you would like something as low-level as a telnet connection?
How often would you like to send such a simple packet?
This also determines whether or not the connection should remain open.

And to be honest I don't really see why it needs to be implemented for TCP too.
Why isn't the UDP version good enough?

tubeless
New user
Posts: 3
Joined: 27 Oct 2021, 10:49

Re: Sending a plain-text TCP packet

#3 Post by tubeless » 27 Oct 2021, 17:36

TD-er wrote: 27 Oct 2021, 17:08 So I assume you would like something as low-level as a telnet connection?
How often would you like to send such a simple packet?
This also determines whether or not the connection should remain open.
Yup, as simple as telnet/netcat/etc. Packet will be sent once per 10-20 minutes, so no need to keep the TCP session open.
TD-er wrote: 27 Oct 2021, 17:08 And to be honest I don't really see why it needs to be implemented for TCP too.
Why isn't the UDP version good enough?
Server side is using TCP, this is how it was designed. Unfortunately it is out of my control, so cannot reconfigure it to use UDP.

tubeless
New user
Posts: 3
Joined: 27 Oct 2021, 10:49

Re: Sending a plain-text TCP packet

#4 Post by tubeless » 29 Oct 2021, 09:44

Any ideas?

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests