Hi,
I am using MQX 3.0 on MCF52259 Demo board.
I cant find out how to use the board as an FTP client. I could use it as a server though.
I can see the ftpclient.c source in the RTCS source. However I cant find, from where it is called. I also see some references to an RTCS shell, which i cannot open.
I am using the shell on the serial interface. The "help" command does not show any commands for starting an FTP client.
Please help me out!
Solved! Go to Solution.
Hello,
you should be able to define following FTP client commands in your application and call the FTP_client("192.168.1.1") function (located in ftpc.c):
const FTPc_COMMAND_STRUCT FTPc_commands[] = {
{ "ascii", FTPc_ascii },
{ "binary", FTPc_binary },
{ "bye", FTPc_bye },
{ "cd", FTPc_cd },
{ "close", FTPc_close },
{ "delete", FTPc_delete },
{ "get", FTPc_get },
{ "help", FTPc_help },
{ "ls", FTPc_ls },
{ "mkdir", FTPc_mkdir },
{ "open", FTPc_open },
{ "pass", FTPc_pass },
{ "put", FTPc_put },
{ "pwd", FTPc_pwd },
{ "remotehelp", FTPc_remotehelp },
{ "rename", FTPc_rename },
{ "rmdir", FTPc_rmdir },
{ "user", FTPc_user },
{ NULL, NULL }
};
If you want to use it as shell command, you should add this line to the Shell_commands array:
{ "ftp", Shell_FTP_client }, // located in sh_ftpc.c
But I'm suggesting to upgrade to later MQX versions, because of bugfixed code and working RTCS shell example...
PetrM
Hello,
you should be able to define following FTP client commands in your application and call the FTP_client("192.168.1.1") function (located in ftpc.c):
const FTPc_COMMAND_STRUCT FTPc_commands[] = {
{ "ascii", FTPc_ascii },
{ "binary", FTPc_binary },
{ "bye", FTPc_bye },
{ "cd", FTPc_cd },
{ "close", FTPc_close },
{ "delete", FTPc_delete },
{ "get", FTPc_get },
{ "help", FTPc_help },
{ "ls", FTPc_ls },
{ "mkdir", FTPc_mkdir },
{ "open", FTPc_open },
{ "pass", FTPc_pass },
{ "put", FTPc_put },
{ "pwd", FTPc_pwd },
{ "remotehelp", FTPc_remotehelp },
{ "rename", FTPc_rename },
{ "rmdir", FTPc_rmdir },
{ "user", FTPc_user },
{ NULL, NULL }
};
If you want to use it as shell command, you should add this line to the Shell_commands array:
{ "ftp", Shell_FTP_client }, // located in sh_ftpc.c
But I'm suggesting to upgrade to later MQX versions, because of bugfixed code and working RTCS shell example...
PetrM