FTP client

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FTP client

2,624 Views
amleng
Contributor IV

Hello All,

In my project I need to download a specific file from a remote tftp server (Tftpd64) and write it to the SD card. I use MQX 4.1. Would you please let me know what is the best approach for that? My best guess is having a ftp client in the application. but how can I do it? any sample project available?

Cheers

0 Kudos
Reply
3 Replies

1,613 Views
Martin_
NXP Employee
NXP Employee

All the code comes with MQX, you just need to put two examples together. Start with:

c:\Freescale\Freescale_MQX_4_0\rtcs\examples\shell\

which contains a shell command for FTP client ("ftp"). Get familiar with using it, connect with a remote server and transfer a file to ramdisk.

In second step, you take

c:\Freescale\Freescale_MQX_4_0\mfs\examples\sdcard\

which has a task that mounts MFS on SDCARD. Integrate it with the rtcs/examples/shell.

By the way, the actual version is MQX 4.0.1, very soon, MQX 4.0.2 will be out.

0 Kudos
Reply

1,613 Views
joey81
Contributor II

Hi!

I've integrated ftp client, tftp client, and MFS/FFS into my project.  The NAND FFS is mounted at "a:/"

On the PC I'm running an FTP server and a TFTP server.

From the K60 board I can TFTP a file from the server and save it to the NAND FFS.

With the FTP client, things are different.  I can connect to the FTP server and list the remote directory

contents.  When I do a GET the ftp client fails with the error "Unable to open local file."  PUT throws the same error message.

I already tried giving PUT/GET the full pathname of the local files.  Still same results.

Did I miss anything?

Thanks!

0 Kudos
Reply

1,613 Views
Martin_
NXP Employee
NXP Employee

FTPc_put FTPc_get are implemented in ftpc_cmd.c

after fopen, if fd = fopen() returns zero, add a code line to read what error it is (error_code = _io_ferror(fd)); what is the error_code ?

0 Kudos
Reply