I am a little bit lost right now. I’ve got a Panda II and the Connect shield. I want to use the Panda as a TCP server and it should synch its time with a NTP server once a day.
I am using the code from the examples to synch the time and it works great. I also use a modified version of the TCP server example to create the TCP server which accepts incoming clients asynchronously. This also works w/o any problems.
But once a client was connected to the server I cannot synch the time with the NTP server anymore. There is no socket exception. The poll method simply times out.
This is what is working right now:
start TCP Server
synch with NTP
This is what is not working:
start TCP server
accept client connection
close client connection
synch with NTP — > timeout
The TCP server runs fine. It can accept any client connection, as long there is no other client connnected allready (only one client allowed).
The only way to be able to synch with the NTP server again is to restart the Panda II…
Does anyone have an idea if I miss something important here? Or it is generally impossible to use TCP server and UDP client sockets at the same time?