Page 1 of 1

TCP over Ethernet (wired) instance creation?

Posted: Wed Nov 20, 2019 9:17 am
by pmsolutionsdownunder
Hi,
All the examples I have seen for TCP seam to be over a WiFi connection using a WiFi library include and an instance from that.
What is the difference in creating an instance for TCP over Ethernet vs over WiFi?

I wanted to use TCP instead of UDP because TCP has the commandhandler lib.
Does commandhandler work with UDP as well? If so how would I code that.

Cheers,
Phil H

Re: TCP over Ethernet (wired) instance creation?

Posted: Mon Nov 25, 2019 10:27 am
by pmsolutionsdownunder
The frustration levels are rising. I have to missing something simple. Simple to others that is.
My whole system works perfectly via serial connection. Commands, plotting to time and X-Y plots as well as getting the arduino to change properties in the interface.
I want wired Ethernet for the inherent galvanic isolation it provides. USB is connected electrically while Ethernet is not. It's too late to put wireless hardware in and it's a noisy environment.

The UDP to TimePlot example works so I know that the communication between MegunoLink and my board works.
The Ethernet library server example works but I cannot marry the TCPcomandhandler example to Ethernet. It seams to need library functions that are in the ESP library.
So I'm back looking at UDP.

I modified the HandleUDPCommads example for Ethernet but I get absolutely no response when I try it.
Here is the code-

The forum won't let me post the code so I've attached it


Some pointers, any pointers would be greatly appreciated.
Phil

Re: TCP over Ethernet (wired) instance creation?

Posted: Wed Nov 27, 2019 8:25 am
by philr
Hi Phil, looks like you managed to get the forum working.

UDP and TCP sound great but they are a much bigger pain than serial. Hopefully we can get something working well for you.

Re: TCP over Ethernet (wired) instance creation?

Posted: Thu Nov 28, 2019 1:39 pm
by pmsolutionsdownunder
Thanks Phil,
Your example for Ethernet UDP Command Handler worked a treat.
I'll work it into my code over the next week.

Cheers,
Phil H