Wanting to set PEM certificate for FTPS, but there’s no > returned by SSLSECDATA

8 thoughts on “Wanting to set PEM certificate for FTPS, but there’s no > returned by SSLSECDATA

  1. I am using an HE910 modem with firmware 12.00.224, and am trying to get FTPS working. FTP works fine, and reading the SSL TLS User Guide section 5, it looked to be straightforward to get FTPS working too. However I am having problems with the AT#SSLSECDATA command. If I attempt to delete the PEM file from the NVRAM it returns (first time was “OK”, then “ERROR” as no certificate). However if I attempt to write I never get the “>” back that indicates I should start writing the PEM data. It is waiting 30s which should be more than enough time. Here’s a timestamped log of commands and responses:

    01/01/1970 00:00:16 Cmd: AT+CSQ
    01/01/1970 00:00:16 Resp 0: +CSQ: 19,0
    01/01/1970 00:00:16 Resp 1: OK
    01/01/1970 00:00:16 Signal strength 23 after read #3
    01/01/1970 00:00:16 Cmd: AT#CCLK?
    01/01/1970 00:00:16 Resp 0: #CCLK: “15/04/02,14:15:01+04,1”
    01/01/1970 00:00:16 Resp 1: OK
    02/04/2015 13:15:01 Cmd: AT#FTPCFG=100,0,1
    02/04/2015 13:15:01 Resp 0: OK
    02/04/2015 13:15:01 Cmd: AT#SSLSECCFG=1,0,1,1
    02/04/2015 13:15:01 Resp 0: OK
    02/04/2015 13:15:03 Cmd: AT#SSLSECDATA=1,1,1,1367
    02/04/2015 13:15:33 Timed Out!
    02/04/2015 13:15:33 Cmd: AT#FTPCLOSE
    02/04/2015 13:15:38 Timed Out!

    What might I be doing wrong? A contractor for us reported that it worked for him, by commanding the modem manually (using putty). I have to get this working in our existing code, so want to find out if I’m doing something in the wrong order, or too fast.

    1. What is the answer returned to #SSLSECDATA, if not >?

      Take care:

      Note: if secure socket is not enabled using AT#SSLEN only test requests can be made.

      1. Thank you for the reply. I am not getting anything back from the modem after AT#SSLSECDATA. The code will print all received characters. I have tried adding AT#SSLEN, but that returns an error:

        01/01/1970 00:00:16 Resp 0: #CCLK: “15/04/02,15:00:02+04,1”
        01/01/1970 00:00:16 Resp 1: OK
        02/04/2015 14:00:02 Cmd: AT#FTPCFG=100,0,1
        02/04/2015 14:00:02 Resp 0: OK
        02/04/2015 14:00:02 Cmd: AT#SSLEN=1,1
        02/04/2015 14:00:02 Resp 0: ERROR

        I didn’t think it was needed as I am using FTPS. If it is needed, what is the sequence for all the AT commands?

        1. There is a chapter in Telit SSL/TLS User Guide regarding FTPS; set AT+CMEE=2 and check again the error.

          1. There is a chapter in Telit SSL/TLS User Guide regarding FTPS; set AT+CMEE=2 and check again the error.

            Thanks for the suggestion. I have added that and this is what I get:

            02/04/2015 14:38:08 Cmd: AT#FTPCFG=100,0,1
            02/04/2015 14:38:08 Resp 0: OK
            02/04/2015 14:38:08 Cmd: AT+CMEE=2
            02/04/2015 14:38:08 Resp 0: OK
            02/04/2015 14:38:08 Cmd: AT#SSLEN=1,1
            02/04/2015 14:38:08 Resp 0: +CME ERROR: operation not allowed

            So the modem doesn’t think that SSLEN is valid. I will take out the SSLEN and see if it reports anything about FTPS.

          2. I will take out the SSLEN and see if it reports anything about FTPS.

            Without SSLEN the AT+CMEE=2 doesn’t report anything – the modem is simply not responding to the SSLSECDATA:

            02/04/2015 14:46:16 Cmd: AT#FTPCFG=100,0,1
            02/04/2015 14:46:16 Resp 0: OK
            02/04/2015 14:46:16 Cmd: AT+CMEE=2
            02/04/2015 14:46:16 Resp 0: OK
            02/04/2015 14:46:16 Cmd: AT#SSLSECCFG=1,0,1,1
            02/04/2015 14:46:16 Resp 0: OK
            02/04/2015 14:46:16 Cmd: AT#SSLSECDATA=1,1,1,1367
            02/04/2015 14:46:46 Timed Out!

          3. OK, I have found the problem. The modem is returning the ‘>’, but the code that handles the response (that a colleague who has gone on maternity leave wrote), always expects a new line or carriage return. As the ‘>’ doesn’t have that, it was never getting through.

            Thanks for all the help! I’ve learned about the AT+CMEE=2 command, so it has been positive for me…