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.

Receiving and sending data from CR1000/X by ftp


artyb May 26, 2021 05:02 PM

Hi,

I'm after some advice for a project where we would need to retrieve files from an ftp server and then send them onto a different ftp server on a timed schedule.

I'll number my questions to allow people to refer to them:

1) Is there some information about how the ftp servers should be configured and how to increase security (SFTP)?

2) Can someone confirm that the logger can store downloaded files (probably a few kB each) on a memory card and then read and send them (pretty sure this can be done!)?

3) Does anyone have any examples of code to detect and then retry pulls and pushes if any transfers have failed?

4) Does the CR basic code have to manage how much of the memory card is used up and delete older files (if they were kept at all, or can the logger manage that as it does with data tables?

5) Anything else to watch out for?

Thank you,

A


Nico May 27, 2021 12:40 PM

You want a datalogger to move files via FTP from one FTP server to another?

Be aware that the firmware has got a 1-digit kB TCP/IP buffer size.. which means if you want to transfer over a longer connection (pings > 100 ms) it will take a while to transfer data (will not be apprent for smaller files though).

to 1) .. for SFTP security, public/private keys is the way to go. Ask your server admin/IT guy.

to 2) .. I only tested FTP so far, up/downloading to/from CR3000, CR1000, CR1000X with a FTP client. This way the FTP part of the firmware of the logger deals with things. Involving CRbasic usually slows things down a lot, i.e. CRbasic being in control of up/dpownload. Wouldn't recommend it unless really necessary.

to 4) .. you have to take care IMHO

to 5) .. well, actually, there is always plenty different ways to skin a cat. If you can - tell us a bit what you actually want to do and maybe there is some better/other way to solve this? Maybe some tiny ARM/linux or android based SBC with Ethernet can do this job?


artyb May 28, 2021 09:39 AM

Hi Nico,

Thank you for your reply. I'm not sure that a logger is the best approach, but was investigating it due to familiarity with them, their robustness and accuracte clocks etc and we might want to use some other functionality of them too, eg to monitor the power supply.

The task is to retrieve data from a local piece of equipment using ftp and send it to a remote ftp server on a schedule. I'd rather not have remote access into the system via ftp. 

Accessing the data locally via ftp is one option, but so might be Modbus RTU, then sending via ftp as before.

This site would have a satellite connection, so the comment about longer pings is pertinent.

Cheers,
A


JDavis May 28, 2021 08:56 PM

1) Is there some information about how the ftp servers should be configured and how to increase security (SFTP)?

SFTP is recommended for security reasons. To handle the additional processing the encryption requires, you want to use newer generation dataloggers like the CR1000X and CR6.

2) Can someone confirm that the logger can store downloaded files (probably a few kB each) on a memory card and then read and send them (pretty sure this can be done!)?

It is not a problem to do FTPClient() to grab a file from one server then FTPClient() to send the same file to a different server. As the previous post said, it won't be fast.

3) Does anyone have any examples of code to detect and then retry pulls and pushes if any transfers have failed?

FTPClient() provides a result code to show if it was successful. You can build a pretty simple For Loop around it, and exit the loop early if successful.

4) Does the CR basic code have to manage how much of the memory card is used up and delete older files (if they were kept at all, or can the logger manage that as it does with data tables?

If the files are received with the logger acting as an FTP server, there is a File Manage setting that can be used to limit the number of files. With grabbing files with FTPClient() there is not an automatic means to manage the files. Code would need to be written. Simplest is to delete each file after you send it successfully.

5) Anything else to watch out for?

If you have two IP interfaces on a datalogger, such as cell modem and Ethernet, you may need to use IPRoute(). IPRoute() lets you specify which interface to use for connecting to a particular server.


Billie34 Feb 20, 2023 03:44 AM

Would you elaborate on one of your featured projects so that it can be reviewed for easier download? 

I've got a project about game mods that everyone can download from Android at word wipe uptomods.com


squaregelding Aug 11, 2023 07:22 AM

love it  google


Oweig2000 Aug 30, 2023 09:19 AM

Hi Nico,

Thank you for your reply. I'm not sure that a logger is the best approach, but was investigating it due to familiarity with them, their robustness and accuracte clocks etc and we might want to use some other functionality of them too, eg to monitor the power supply.

The task is to retrieve data from a local piece of equipment using ftp and send it to a remote ftp server on a schedule. I'd rather not have remote access into the system via ftp. 

Accessing the data locally via ftp is one option, but so might be Modbus RTU, then sending via ftp as before.

This site would have a satellite connection, so the comment about longer pings is pertinent.

Cheers

I got much info here.


cooingbashful Sep 8, 2023 03:50 AM

i am having same problem with CR310 datalogger.

Sending the data via the EmailRelay only up

The Email was received with an empty file attachment.


georggee Sep 13, 2023 03:20 PM

I've got a project about game mods that everyone can download from Android

Speaking of this topic, guys, what are your thoughts on sports betting? I would like to try something like that and I have also found this source there on https://dailysports.net/ with lots of information about sport and betting as well and now I would like to hear your personal opinion if it's a good idea or not.


JennaGraves Mar 1, 2024 10:04 AM

This post is under review.


erwinsmith Mar 20, 2024 01:07 PM

This post is under review.


Chrisy Mar 21, 2024 09:47 AM

Is anyone here competent in providing proven information regarding amazon account reinstatement I've faced some issue and urgently need to fix this with reliable support and probably explore the trouble that might cause this problem https://www.mrjeffamz.com/amazon-account-reinstatement-services. I am interested in expanding my business with right approach and guidance


alanaddams Mar 21, 2024 10:02 PM

This post is under review.

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