I'm having trouble making the RTCS FTP client work. Everything is fine until I try to send or retrieve a file. I have tried all three modes, default, port and pasv and they all fail at the point that a data connection is being opened. I have attempted to use the debugger to examine the error code returned by connect() and listen() but it looks like the optimizations are set too high in the libraries for it to be reported.
My suspicion is that there may not be enough memory (RAM?) available to accomodate the additional buffer(s) that are presumably being allocated. If that is the case, is there a compile-time constant that can be modified to decrease the size of the buffer(s)? The files I will be transferring are quite small so I can live with small packet sizes. I've been trying to wade through the multiple levels of macros with which connect() and listen() are implemented but so far haven't found my way down to where buffers are created.
Any help would be appreciated.
Solved! Go to Solution.
Hello,
yes, it's memory related problem.
You have to disable every memory consuming setting in user_config.h like UDP and DNS.
In next MQX release (3.5), there will be introduced bugfix which sets smaller buffer sizes for RX on all used sockets (listen, control, data).
And you should also try to use special ethernet initialization sequence, which can be found for example in security_webserver demo.
With all savings above I was able to execute all ftp client commands in RTCS shell example (except for put/get, because there was no storage used).
PetrM
Hello,
yes, it's memory related problem.
You have to disable every memory consuming setting in user_config.h like UDP and DNS.
In next MQX release (3.5), there will be introduced bugfix which sets smaller buffer sizes for RX on all used sockets (listen, control, data).
And you should also try to use special ethernet initialization sequence, which can be found for example in security_webserver demo.
With all savings above I was able to execute all ftp client commands in RTCS shell example (except for put/get, because there was no storage used).
PetrM