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

  • The trace collector file is empty after I try to record one using the LTE link monitor+trace collector to demonstrate my issue?

    Edit: Apparently I need to compile the modem FW again... hold tight

  • I will unfortunately not be able to give you an answer within the next 6 hours, Kyle. Due to start of vacation, we are very short on staff which will result in increasing lead times. A modem trace analysis might take a week or two.

    Have you enabled modem tracing in your application?

    Regards,

    Markus

  • I swear I have it enabled but its not working. just leave that for now then.

    vacations? never heard of them :P

    Maybe we can get it going this way faster... here is a log of me trying to do a http post of 3 bytes to a php file and it just wont work. Maybe its something obvious since I've been at this for at least 20 hours now.

    2021-06-30T11:48:28.217Z INFO Application data folder: C:\Users\user\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2021-06-30T11:48:28.265Z DEBUG App pc-nrfconnect-linkmonitor v1.1.10 official
    2021-06-30T11:48:28.266Z DEBUG App path: C:\Users\user\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2021-06-30T11:48:28.266Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-06-30T11:48:28.266Z DEBUG nRFConnect path: C:\Users\user\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-06-30T11:48:28.266Z DEBUG HomeDir: C:\Users\user
    2021-06-30T11:48:28.266Z DEBUG TmpDir: C:\Users\user\AppData\Local\Temp
    2021-06-30T11:48:28.315Z VERBOSE Could not fetch serial number for serial port at COM1
    2021-06-30T11:48:40.506Z INFO Modem port is opened
    2021-06-30T11:48:41.567Z DEBUG modem >> AT
    2021-06-30T11:48:41.593Z DEBUG modem << OK
    2021-06-30T11:48:48.153Z DEBUG modem >> AT+CGDCONT=0,"IP","*********"
    2021-06-30T11:48:48.172Z DEBUG modem << OK
    2021-06-30T11:48:54.790Z DEBUG modem >> AT+CGDCONT?
    2021-06-30T11:48:54.812Z DEBUG modem << +CGDCONT: 0,"IP","***********","",0,0
    2021-06-30T11:48:54.842Z DEBUG modem << OK
    2021-06-30T11:49:00.527Z DEBUG modem >> AT+CFUN=1
    2021-06-30T11:49:00.574Z DEBUG modem << OK
    2021-06-30T11:49:07.983Z DEBUG modem >> AT+CEREG?
    2021-06-30T11:49:07.994Z DEBUG modem << +CEREG: 0,1,"2B1C","01AFEA0C",7
    2021-06-30T11:49:08.019Z DEBUG modem << OK
    2021-06-30T11:49:17.715Z DEBUG modem >> AT#XHTTPCCON=1,"***********.ca",80
    2021-06-30T11:49:18.001Z DEBUG modem << #XHTTPCCON: 1
    2021-06-30T11:49:18.004Z DEBUG modem << OK
    2021-06-30T11:50:06.606Z DEBUG modem >> AT#XHTTPCREQ="POST","/tester.php?fn=test.csv","Content-Type: text/plain; \r\n Content-Length: 3",3
    2021-06-30T11:50:06.626Z DEBUG modem << OK
    2021-06-30T11:50:06.637Z DEBUG modem << #XHTTPCREQ: 1
    2021-06-30T11:50:13.039Z DEBUG modem >> 012
    2021-06-30T11:50:13.054Z DEBUG modem << OK
    2021-06-30T11:50:13.057Z DEBUG modem << #XHTTPCREQ: 0
    2021-06-30T11:50:23.054Z DEBUG modem << #XHTTPCRSP: 0,-104
    2021-06-30T11:50:23.061Z DEBUG modem << #XHTTPCCON: 0
    2021-06-30T11:50:35.920Z INFO Modem port is closed
    

  • Another update on the FTP thing, switching to a different server running Pro-FTPD gets a different error:

    220 ProFTPD Server (ProFTPD Default Installation) [************]
    500 OPTS UTF8 not understood

    So the root of the problem is that the modem wants to use UTF-8 path names, but most modern FTP servers don't want to support it, or at least do not have them enabled in the release versions

  • Hello Kyle,

    I’m unfortunately not sure if I can give you any more input here. If have to check with our application team in this case.

    Do you still need support or have you been able to resolve this issue?

    Regards,

    Markus

Related