We have noticed a strange problems with our remote CR1000s (OS version 27) using GPRS modems: several times now (different) dataloggers seem to hang (permanently) in the PPPClose function in the slowsequence scan loop (see the program below, we used the status variable to track the problem down). The modem is still active (even when we get there weeks later), but no more data is being transferred. The data collection loop seems to continue normally.
Public Status As String * 32 Public FTP_Result As Long Public IP_Address As String * 16 DataTable(Measurements, True, -1) DataInterval(0, 5, min, 30) Sample(1, Status.StationName, STRING) Minimum(1, Status.Battery, FP2, False, False) Minimum(1, Status.LithiumBattery, FP2, False, False) Maximum(1, Status.PanelTemp, FP2, False, False) EndTable BeginProg PPPClose Scan(5, sec, 0, 0) CallTable Measurements NextScan SlowSequence Scan(5, min, False, 0) Status = "PPP open" SW12(1) Delay(1, 5, sec) IP_Address = PPPOpen If IP_Address <> "0.0.0.0" Then Status = "FTP upload" FTP_Result = FTPClient("server", "user", "pass", "Measurements", "Measurements.csv", 9, 0, 0, 0, 1013) EndIf Status = "PPP close" PPPClose Status = "Wait for disconnect" SerialOpen(ComME, 9600, 0, 0, 24) SerialOut(ComME, "", CHR(10) & "NO CARRIER", 1, 500) Status = "Modem shutdown" SerialOut(ComME, "AT+CFUN=0" & CHR(13), CHR(10) & "OK", 3, 500) SerialClose(ComME) Delay(1, 2, sec) SW12(0) Status = "Connection closed" NextScan EndSequence EndProg
When we connect directly using the Device Configuration Utility, the datalogger seems responsive. However, when we try to modify a value in a data table or use the serial sniffer, the datalogger stops responding (no table updates etc.). After a power cycle everything works normally again.
What is the best way to debug this problem? (The problem is not (yet) reproducible and (luckily) quite rare.)
Is there any way to have the datalogger reset itself (when it detects a problem or simply periodically) to clear the problem?
Thanks for any suggestions.
* Last updated by: MrEggie on 7/3/2014 @ 7:03 AM *
A colleague will be responding to the email you sent to us directly shortly. There is a known problem with some ftp servers, which if the connection fails at a critical point, the logger can get stuck in the ftpclient instruction.