08-20-2018 07:42 PM
Hello, again.
I am sending things from a cRIO vie UDP. Recently I had some network problems. So for testing I unplugged the network cable and plugged it back in. I could not receive data after that. But it works if I get two laptops, one sender, one receiver. Unplug one laptop and plug it back in, and it recovers and keeps receiving data. Any ideas? I had to reboot the cRIO for the UDP sender to work again.
Its static IPs for the cRIO and the receiving PC.
Cheers,
Steffen
08-20-2018 10:44 PM
forgot to mention, its cRIO9035. Seems that can have an influence
08-21-2018 05:26 PM
This is likely an issue with the way the RTOS handles open connections vs. how windows does.
Specifically SO_REUSEADDR and SO_REUSEPORT. While I am not 100% certain on the SO_REUSEPORT parameter I can confirm that socket connections established on the NI RT operating systems are NOT opened with SO_REUSEADDR.
Take a look at this post from a few years ago.
https://forums.ni.com/t5/LabVIEW/TCP-Error-60-on-a-cRIO-9014/m-p/1014067/highlight/true#M452456
It explains the issue in more detail.
08-21-2018 08:51 PM
but in UDP, how does the sender know, no one is listening? It does not reconnect even after several minutes. So not sure what to do.
Send something from the PC every second and if the cRIO does not receive anything, make it try to reconnect?
Or if the cRIO figured out somehow that there is no network, make it try to reconnect. Somehow it does, because values from the Shared Variable Engine keep updating again after a few seconds after plugging the network cable back in