Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

FTPClient


cfuller Jan 31, 2013 03:27 PM

Ok, I give in. Why isn’t the FTPClient instruction working here? I’ve got a CR800 connected via rs232 serial port to a GX400 phone serial port. The rs232 port on the logger is set to PPP mode. The serial port on the GX400 is set to PPP mode. I can connect to the logger through port 6785 using loggernet, no problem. Scheduled collection is working. The file is being written and saved to the USR drive of the logger. However it refuses to upload a file to the ftp site. How do I troubleshoot this? Can I somehow see the attempt to contact the FTP site in a terminal emulator? I’ve tried that and I don’t see anything useful. I’ve tried the program below and the example program provided in the CRBasic Help file without success. Any insight on what is wrong or how to troubleshoot would be much appreciated. Thanks

'CR800 Series Datalogger
'Program Name: FTP Data Table Example.CR1

'Declare Public Variables
Public PTemp, batt

'FTP Variables
Public FTPSuccess As Boolean
Public OutStat As Boolean
Public LastFileName As String * 25

'FTP Information
Const IPAddress="ftp.myftpsite.com"
Const User="user"
Const Password="password"
Const Filename = "FTPdata.dat"

'Define Data Tables
DataTable (FTP,1,-1)
TableFile ("USR:FTP",12,5,1,0,Min,OutStat,LastFileName)
Sample (1,PTemp,FP2)
Sample (1,batt,FP2)
EndTable

'Main Program
BeginProg

'Set up USR drive to write data
SetStatus ("USRDriveSize",31744)

'Scan every 10 minutes
Scan (10,Min,0,0)

'Measure Panel Temperature
PanelTemp (PTemp,250)

'Measure Battery Voltage
Battery (batt)

'Call Data Table
CallTable (FTP)
NextScan

SlowSequence
Scan(5,Min,0,0)
'FTP Data
If Outstat Then
FTPSuccess = FTPClient (IPAddress,User,Password,LastFileName,Filename,0)
EndIf
NextScan

EndProg


everhamme Feb 1, 2013 10:06 PM

try using option 2 in the FTPClient instruction to force passive FTP mode?


Sam Feb 18, 2013 06:52 AM

yes you might have better luck using option 2, passive mode file transfer.

>> Can I somehow see the attempt to contact the FTP site in a terminal emulator?
Yes, you can use CR1000> terminal to snoop the FTP (application layer) traffic that is going over IP. Use the "W" mode. Alternatively, you can telnet into the logger and at the CRx000> prompt type in 65535D and press enter. This will give you a wealth of additional information about what is going on over IP.

Log in or register to post/reply in the forum.