I am using a 52259 with MQX 4.1. I have a USB stick connected and mounted to MFS/Partition manager at "a:". I am able to read/write files to this, so I know it is mounted properly. I am using the following code to initialize the FTP server:
-------------------------------------------------------------------------
FTPSRV_PARAM_STRUCT params = {0};
unsigned int old_handle = ftpsrv_handle;
params.af |= AF_INET;
params.auth_table = (FTPSRV_AUTH_STRUCT*) ftpsrv_users;
params.root_dir = "a:";
ftpsrv_handle = FTPSRV_init(¶ms);
if (ftpsrv_handle != 0)
{
printf("FTP Server Started. Root directory is set to \"%s\", login: \"%s\", password: \"%s\".\n",
params.root_dir,
ftpsrv_users[0].uid,
ftpsrv_users[0].pass);
}
---------------------------------------------------------------------------
I then try to connect with FileZilla, and here is what I get:
Status: Connecting to 192.168.2.100:21...
Status: Connection established, waiting for welcome message...
Response: 220 RTCS FTPSRV Ready
Command: USER developer
Response: 331 User name okay, need password.
Command: PASS *********
Response: 230 Password ok, User logged in.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "\" is the current directory
Command: TYPE I
Response: 200 Type Binary.
Command: PASV
Response: 227 Entering Passive Mode (192,168,2,100,19,136).
Command: LIST
Response: 150 Opening data connection.
Response: 451 Requested action aborted. Local error in processing
Error: Failed to retrieve directory listing
I am connecting using default FileZilla settings. Any ideas? If I change my FTP server param to use c:, and leave my usb stick at a:, I get:
Response: 550 Requested action not taken. File unavailable.
as a response to the list command, instead of response 150/451 above. This tells me that a: is a valid directory in the initial case, whereas I know c: was invalid.