My application runs on an arduino Mega and an ethernet W5100 based shield.
The following modules / functions are implemented :
NTP RTC sync
modbus tcp client
I know its a lot to have on a single system
I know that the W5100 chip can support upto a total of 4 concurrent sockets.
Therefore, not all of the above functions can run at the same time.
For example when FTP service is required which needs 2 sockets, Telnet is terminated to free-up sockets.
Web server and UDP is always available and Telnet is always listening for incoming connections.
Modbus tcp is periodically polling a remote modbus server and closes the connection after each poll
My problem arises when I try to also use NTP sync which employs UDP transmission: even with no Telnet or FTP connections, NTP sync fails.
How can I make sure that a socket is freed up?
Doesnt this client.stop() free a used socket ?
Is it possible to also stop a server?
Any other ways to get around this?