Comms watch (sniff) FTP communications

A terminal emulator can be used to watch (sniff) FTP communications.

See also:Using terminal mode and Serial talk through and comms watch.

ESC or a 40 second timeout will terminate on-going commands. The W: Comms Watch ("sniff") mode does not have a timeout when connected in terminal mode via PakBus. Otherwise, the timeout can be changed from the default of 40 seconds to any value ranging from 1 to 86400 seconds (86400 seconds = 1 day).

When using W in a terminal session, consider the following:

  • Concurrent terminal sessions are not allowed and will result in dropped communications.

  • Opening a new terminal session will close the current terminal session.

  • The data logger will attempt to enter a terminal session when it receives non-PakBus characters on the RS‑232 port or CS I/O port, unless the port is first opened with the SerialOpen() instruction.

If the data logger attempts to enter a terminal session on the RS‑232 port or CS I/O port because of an incoming non-PakBus character, and that port was not opened using SerialOpen(), any currently running terminal function, including the comms watch, will immediately stop. So, in programs that frequently open and close a serial port, the probability is higher that a non-PakBus character will arrive at the closed serial port, thus closing an existing talk-through or comms watch session. If this occurs, use the FilesManager setting to send comms watch or sniffer to a file.

For more information on Comms Watch, see a video at: https://www.campbellsci.com/videos/sdi12-sensors-watch-or-sniffer-mode .

  1. To enter terminal mode, connect a computer to the data logger. Open a terminal emulator program from Campbell Scientific Closeddata logger support software LoggerNet, RTDAQ, and PC400 - these Campbell Scientific software applications include at least the following functions: data logger communications, downloading programs, clock setting, and retrieval of measurement data.

    • Connect window > Datalogger menu item> Terminal Emulator...

    • Device Configuration Utility Terminal tab

  2. After entering a terminal emulator, press Enter a few times until the data logger prompt such as GRANITE 6> is returned. Type W followed by Enter.

  3. Type the number that corresponds to IP Trace (23 for the CR1000X) followed by Enter.

  4. Type the number that corresponds to FTP (2000) followed by Enter.

  5. You will now see a “hit ESC to exit, any other key to renew timeout” message. Press Start Export to create an export file of the results.

  6. Type the location to save the export file. Click Save.

  7. Wait for your FTP instruction to trigger in your data logger program or trigger it manually if you have a mechanism for doing it.

    TIP:

    For best results, let the FTP instruction complete or fail twice.

    If the FTPClient() instruction only triggers once per day, then consider adding a mechanism for triggering it manually. CRBasic program example #2 includes a Flag for manually triggering FTPClient(). See the CRBasic Editor help for detailed instruction information and program examples: https://help.campbellsci.com/crbasic/granite6/ .

  8. Click End Export. If the failure is due to a problem with FTP, then this export should contain the details of the failure.

     

     

     

     

     

  9. The following example results show different causes of errors.

    Basic FTP missing directory error:

    SFTP incompatible host encryption keys error:

    FTPS username and password failure:

    FTPS data logger is trying to stream a DataTable to the server but the Streaming Options have not been correctly selected in FTPClient():

  10. If the sniff file does not have usable information and you are confident that FTPClient() triggered and ran during the time you were capturing the results, you may have an IP configuration, DNS, or data logger IP interface routing issue. See Verifying IP interfaces are online and correct and Checking DNS issues.