LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

E-mail sendings hangs the compactrio

Solved!
Go to solution

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,

 

0 Kudos
Message 11 of 17
(1,113 Views)

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


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 12 of 17
(1,106 Views)

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

0 Kudos
Message 13 of 17
(1,099 Views)

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.

0 Kudos
Message 14 of 17
(1,081 Views)

You want to ping a known IP address, not something that has to be resolved, as you may fall into the same problem.

0 Kudos
Message 15 of 17
(1,071 Views)

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,

0 Kudos
Message 16 of 17
(1,060 Views)

I think the Google ones are good.  You could try some of these, too:

 

http://root-servers.org/

 

 

0 Kudos
Message 17 of 17
(1,051 Views)