This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200-LAUNCHXL: Changing the name that the TFTP example reads from the server

Part Number: CC3200-LAUNCHXL

Hi everyone

I'm exploring the use of the TFTP example and when I try to change the name of the file that reads from the server, I get a -11 code error when I use the sl_FsGetInfo function, I see that this error code is SL_FS_ERR_FILE_NOT_EXISTS but the file exist in the server that I'm using. This just happens when I change the file name, when I use readFromServer everything works fine.

Any suggestion that what can I be missing

Regards, Juan.

  • Hi Juan,

    Do you refer to the sl_FsGetInfo that comes after the sl_TftpRecv ?
    If the file exist on the remote server the the sl_TftpRecv will succeed.
    The following sl_FsGetInfo should fail on the first attempt as the file only exists on the server but not on the local file system (sl_FsGetInfo access the local file system).

    The API only brings the content of the remote file to a buffer (pucFileBuffer).
    Now, you'll need to write the buffer to the local FS as shown in the example.

    On the 2nd time that you will run the example, the local file should be available (and new content will be used to overwrite the file (thus used different type of fsOpen call).

    Br,
    Kobi
  • Hi Kobi

    I think that this explain it all, thank you very much.

    Regards, Juan.