Check socket connection

27 thoughts on “Check socket connection

  1. Hi,

    How can i understand connected to server or not?

    I sended “AT#SD blah blah” to server with command mode. Module alwasy return OK when connected or could not connected. After i was check socket status with “AT#SS”. Socket was opened when cannot connected.

    Is it should be return “ERROR” when cannot connect to server? How can i sense that operation.


    1. Hi, please read Telit IP Easy User Guide, is all described there. Post a command log here with the problem.

      1. Hi, i readed this document but could not be found solution about that. AT#SD alwasy return OK in command mode
        I did as follows: Wait for “NO CARRIER” after “OK”. Server connection successfull if did not return “NO CARRIER”.

        But it must be different solution. Also sometimes return “NO CARRIER” even connected to server.

          1. Working on TCP. I want to be connect to server over TCP/IP. And sense connect or disconnect.

            I added my log file to attachment. I putted stars on the major lines.

            Also i seen “IP Easy related errors” header in pdf file page 26. But i could not be activate that related errors even set SELINT to 2.

          2. Tested that commands but still could not received “IP Easy related errors”.



          3. AT+CMEE=2

            Can you connect to that server in online mode?

            Can you connect to that server with other means (ex: telnet from a computer)?

          4. AT+CMEE working while coming error codes. But i could not receive error. AT#SD alwasy send “OK” in command mode.

            Server working not problem this point. I closed server socket for get error message from telit module.


          5. Please clarify your problem:

            you say that AT#SD returns OK, then NO CARRIER, in command mode, if the server at 85.95.257 port 4666 is not running?

          6. AT#SD alwasy return OK. While connect to server or cannot connect. I closed my “socket listener software” on server because i want to be receive ERROR while cannot connecting.


            When socket opened: AT#SD……    reponse:OK

            When socket closed: AT#SD……    response:ERROR (but again return OK)

          7. When socket closed: AT#SD……    response:ERROR (but again return OK)

            A log snippet with this please (with AT+CMEE=2)?

          8. Please post only the lines in log where you think the problem is.

            Maybe this is it?

            19.08.2015 16:06:22 : MCU:AT#SD=1,0,4622,,0,0,1
            19.08.2015 16:06:24 : MODULE:

            19.08.2015 16:06:27 : MODULE:
            NO CARRIER

          9. But of course the address provided in the first log is wrong. With the one in the second log:



            and after some time, more than a minute:

            NO CARRIER

            Is obvious the server is running. The cause of closure:


            #SLASTCLOSURE: 1,3


            meaning 3 – socket inactivity timeout

            All good for now.

            Trying a nonexistent server:


            +CME ERROR: timeout in opening socket

            Good again.

            Please stop the server and notify me to be able to test.

          10. Here is:


            +CME ERROR: timeout in opening socket

            As it should be. I see no problem here.

          11. Still return OK on me. Also AT#SLASTCLOSURE alwasy return ERROR.

            Maybe problem at my module. How can i set factory default or firmware update?

          12. My #SCFG was the default one, however even with yours the “+CME ERROR: timeout in opening socket” comes back, of course much quicker.

            Simply upgrade the module to the latest firmware, you’ll have factory default settings and #SLASTCLOSURE.