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.

CR1000x SFTP, terminal usage


mkba235 Sep 29, 2021 04:50 PM

Hello all, 

I'm trying to use SFTP with a CR1000x, connected to an NL241. I am unable to receive any data on the server. I'm very new to working in CRBasic and Campbell Scientific devices, so I'm hoping someone can help me spot what I've missed. 

For ease of discussion, I'll put a number next to each question by which it can be referenced.

On Device Configuration Utility, I made sure that FTP is allowed. Here, I also entered the public/private key pair used to connect with the server. (1) Are there other settings that should be checked?

I'm trying to trace what's happening in the terminal, but haven't been able to get the terminal working. In PC400, I open the terminal emulator, and am unable to type anything, regardless of whether the terminal is opened or closed. I've tried pasting in a W, and this works, but there's no response from the terminal. (2) Is there a trick to get the terminal working? (3) Once I'm able to use the terminal, is there a trick to watching SFTP? Or will it be fairly obvious to someone with basic knowledge of networks what's going on with the connection attempts? 

Below is a portion of the code. Only the FTP portions are written by me, so there's a possibility I'm mistaken somewhere here. I've left out variable declarations, and used "..." to signify skipping irrelevant code portions. 

Public OutStat As Boolean, OutStatTrig As Boolean, LastFileName As String * 32


DataTable(Table1_sample,True,-1)
DataInterval(0,1000,mSec,10)
Sample(1,AirTC,FP2)
...
Sample(1,T,FP2)
TableFile("CRD:Tower_", 64, -1, 0, 1,Min, OutStat, LastFileName)
EndTable 


BeginProg
Scan(1000,mSec,2,0)
Battery(BattV)
...
SDI12Recorder(CS65X(),C7,"0","M!",1,0,-1)
CallTable Table1_sample
If OutStat Then OutStatTrig=True
NextScan


SlowSequence
Scan (1,Sec,3,0)
If OutStatTrig
FTPResult=FTPClient (IP address, username, password, LastFileName, "/home/bailey/Tower/testSend.dat",20)
OutStatTrig=False
EndIf
NextScan
EndProg

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