09-04-2015 07:16 AM
Hi,
It seems like trying to connect to port TCP 53 of google's public DNS is not such a good idea. Indeed, I'm currently experiencing time outs for 1 out of 2 connection attempts.
So does anyone know:
- How to prevent VxWorks for hanging when trying to resolve a domain name?
- How to check that an internet connection is active? (before trying to resolve the domain name)
The last propostion calls for the windows equivalent of "nslookup" but, afaik, there is no equivalent in VxWorks.
Thanks in advance,
regards,
09-04-2015 07:40 AM - edited 09-04-2015 07:43 AM
Does the whole cRIO hang or just the function that is accessing the network? I would expect it's the latter - and you should be able to mitigate that problem by using timed loops and correctly setting the priorities so your main application doesn't hang.
1) Use valid configuration on the IP configuration for the cRIO - that means setting a valid gateway and DNS server IP address
2) Find a service/website that you can communicate with. For example you could try to access a web-page (using the HTTP client VIs) from a web server with a static IP address. The key thing is that they allow you to do this (otherwise they might see it as an attack and block on their firewall).
You could always try the VI posted here which does a Ping command: http://forums.ni.com/t5/LabVIEW/How-to-Ping-a-network-device-from-RT-controller/td-p/1535420
09-04-2015 07:49 AM - edited 09-04-2015 07:52 AM
As far as an active connection, you can just ping one or more addresses.
You can start by looking here: http://forums.ni.com/t5/LabVIEW/How-to-Ping-a-network-device-from-RT-controller/td-p/1535420
09-04-2015 08:21 AM
The whole compactRIO hangs. I temporarily loose the connection to the crio and CPU usage drops to almost 0.
DNS server are configured correctly. However, the Crio connects to internet via a 3G modem which means that, depending on the network quality, it sometimes does not have access to internet.
I'll try to ping www.google.com be before resolving the SMTP server name.
09-04-2015 08:36 AM
You want to ping a known IP address, not something that has to be resolved, as you may fall into the same problem.
09-04-2015 08:55 AM
yes indeed:)
What would be a good server with a fixed ip address to ping?
8.8.8.8?
8.8.4.4?
or a NTP serveut maybe?
Regards,
09-04-2015 09:17 AM