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 with custom file name


artyb Oct 26, 2021 09:49 AM

Hi,

I'm trying to send data every minute using FTPS with FTPClient. This used to be done using HTTPPost, which isn't secure. It's a CR1000 with OS 32.05.

I've read the FTP Streaming guide and am doing what that says, using a slow sequence with a loop. I'm creating the filename string just before the FTPClient command, using the RTime array. When I use a command of this form:

FTP_Result = FTPClient (AddressAndPort,UserName,Password,"Table1",FilenameAndExtension,12,0,1,Min,33)

Where option 2 means save data file in passive mode, adding 10 means use FTPS. Option 33 means CSIJSON with timestamp but no record#

Data is saved in multiple files, but the filename and extension aren't what I want.

When I use the following, I get occasionally get a unique file created, with non-zero size and the right filename, but mainly there is a file with the right filename, of size 0K that keeps being overwritten:

FTP_Result = FTPClient (AddressAndPort,UserName,Password,"Table1",FilenameAndExtension,12,0,1,Min,1033)

Where option 2 means save data file in passive mode, adding 10 means use FTPS. Option 33 means CSIJSON with timestamp but no record#, adding 1000 means don't append incrementing number and file extension.

The FilenameAndExtension values are incrementing as expected, except when I try to use the custom filename.

Any ideas?

Thank you,

A


artyb Nov 3, 2021 09:34 AM

Hi,

Could I bump this please?

Thank you,

A


artyb Oct 30, 2022 06:41 PM

I'm working on a project where it would be useful to be able to send large files by FTP, but a secure form. Any progress on this?


Nico Nov 3, 2022 07:40 AM

send large files by FTP

Be aware that the TCP/IP buffer in those loggers is very tiny, which means that the back and forth waiting on ACKs will create a slow connection the higher the latency of that com link is. Next to a FTP server (=good).. half way across the county with a mobile connection between (=bad).

On your FTP thing.. I only got a solution here that stores files in logger memory (CRD) and renames those and then they get pulled by a computer. It's the other way around from what you do.. but maybe an option?
If the logger is behind a modem/router and that is VPN capable the security issue is taken up by that device..


artyb Nov 3, 2022 11:08 AM

Thanks for the reply Nico.

Insecure FTP has worked OK in the past, but good to know about the reason for slow transfers. That particular project doesn't have a memory card, but it's another thought as a work around. It'd be great if the FTPS code worked though.

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