Verify Internet/network connectivity
Ensure your data logger has an Internet or network connection and can reach the HTTP server where you will be sending your HTTPGet()
, HTTPPost()
, or HTTPPut()
.
To verify connectivity, perform a ping from the data logger to the target IP address or domain using one of these methods:
-
For all Campbell Scientific data loggers, you can use the
PingIP()
instruction in your CRBasic program to check if an address is available. To implement this, declare thePingResult
variable asPublic
at the top of your program and assign it the result ofPingIP()
within the scan.Example:
Public
PingResult
PingResult =
PingIP
("8.8.8.8"
,1000)
- The CR300 Series data loggers have the added ability to ping from the terminal. To check connectivity for CR300 Series data loggers, connect a computer to the data logger and open the terminal emulator in Campbell Scientific support software, such as LoggerNet or PC400. In the terminal, press Enter until the
CR3XX>
prompt appears. Then, type: ping x.x.x.x. Replace X.X.X.X with the IP address or name of the HTTP server you are sending data to. -
Enable Ping (ICMP) Enabled in the data logger settings using the Device Configuration Utility under the Network Services tab, then click Apply. Connect a laptop to the same network as the data logger and ping the IP address of the data logger over the network from the command prompt to verify the data logger is responding.
Sending a ping from your data logger to the gateway address your data logger is using will help you verify network connectivity of the data logger. Likewise, performing another ping to an IP address on the Internet, like 8.8.8.8, will help you confirm Internet connectivity.
-
If these methods are successful, and you are going to be sending HTTP data data to a server using a domain name (e.g. myhttpserver.com), be sure to send a test ping to that server address. If the ping is unsuccessful, your data logger may not have a DNS server to resolve the server address to an IP address, or your network connection may not be functioning properly.
To verify if you're experiencing a DNS issue, refer to the Troubleshooting DNS resolution failures section in this document.