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
TCP over Ethernet (wired) instance creation?
-
- Posts: 6
- Joined: Thu Nov 07, 2019 12:51 pm
- Location: Tasmania - Australia
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
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 531 times
-
- Posts: 6
- Joined: Thu Nov 07, 2019 12:51 pm
- Location: Tasmania - Australia
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
Your example for Ethernet UDP Command Handler worked a treat.
I'll work it into my code over the next week.
Cheers,
Phil H