This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 issues with Pure-FTPd? AT#XFTP serial_lte_modem and how to force use of TLS for FTP?

When I try to connect to my Pure-FTPd server I always get an error when trying to login, but If I use a public server like... https://dlptest.com/ftp-test/ it's fine. This might have something to do with TLS being enabled on most of the servers I need to connect to. But I could be wrong?

220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 00:25. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
504 Unknown command

ERROR

All my connect code is pretty much just as the documentation says... 

sprintf(buf, "AT#XFTP=\"open\",\"%s\",\"%s\",\"%s\"", username, pass, hostname);

I am at a loss, and just another thing to note, the normal documentation here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/doc/FTP_AT_commands.html

really should be updated with the much more detailed information here: https://github.com/nrfconnect/sdk-nrf/blob/a0fc38d842f4772c04f957b2d473644b567a1950/applications/serial_lte_modem/doc/slm_testing.rst#ftp-at-commands

Thanks,

Kyle

Parents Reply
  • OK!!! I FIXED IT

    I changed the UTF8 section of the  ftp_open function FW to the following...

    	/* Send UTF8 option */
    	sprintf(ctrl_buf, CMD_OPTS, "UTF8 ON");
    	ret = do_ftp_send_ctrl(ctrl_buf, strlen(ctrl_buf));
    	if (ret) {
    		close(client.sock);
    		return ret;
    	}
    	ret = do_ftp_recv_ctrl(true, FTP_CODE_200);
    	if (ret != FTP_CODE_200) {
              if (ret != FTP_CODE_500){ //
                    close(client.sock);
                    return ret;
              } else {
                ret = FTP_CODE_200;
              }
    	}

    And now everything functions! upload, download, ls ect!!!

    EDIT: AND ALL THIS WAS FIXED IN SDK 1.6.0 that was like... just released omg

Children
No Data
Related