TCP over Ethernet (wired) instance creation?

Support forum for MegunoLink
Post Reply
pmsolutionsdownunder
Posts: 4
Joined: Thu Nov 07, 2019 12:51 pm
Location: Tasmania - Australia

Wed Nov 20, 2019 9:17 am

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
pmsolutionsdownunder
Posts: 4
Joined: Thu Nov 07, 2019 12:51 pm
Location: Tasmania - Australia

Mon Nov 25, 2019 10:27 am

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
Attachments
code.zip
(1.34 KiB) Downloaded 5 times
philr
Posts: 298
Joined: Mon May 26, 2014 10:58 am

Wed Nov 27, 2019 8:25 am

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.
pmsolutionsdownunder
Posts: 4
Joined: Thu Nov 07, 2019 12:51 pm
Location: Tasmania - Australia

Thu Nov 28, 2019 1:39 pm

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
Post Reply