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

issue in Serial LTE Modem v22.04

Hi Team,

I have flashed the given serial LTE Modem hex file(attached) into dev kit nRF9160 and tested TCP server mode.

I am facing issue with AT command: AT#XBIND=3442\r\n, due to this I am unable to open TCP server socket.

Log attached for your reference.serial_lte_modem_22_04.hex

2020-04-24T08:37:33.226Z INFO Application data folder: C:\Users\h266270\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
2020-04-24T08:37:33.364Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
2020-04-24T08:37:33.365Z DEBUG App path: C:\Users\h266270\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
2020-04-24T08:37:33.365Z DEBUG nRFConnect 3.3.1 is supported by the app (^3.2.0)
2020-04-24T08:37:33.365Z DEBUG nRFConnect path: C:\Users\h266270\AppData\Local\Programs\nrfconnect\resources\app.asar
2020-04-24T08:37:33.365Z DEBUG HomeDir: C:\Users\h266270
2020-04-24T08:37:33.365Z DEBUG TmpDir: C:\Users\h266270\AppData\Local\Temp
2020-04-24T08:37:36.867Z INFO Modem port is opened
2020-04-24T08:37:36.881Z DEBUG modem >> AT+CFUN?\x0D\x0A
2020-04-24T08:37:36.908Z DEBUG modem << +CFUN: 0\x0D\x0A
2020-04-24T08:37:36.912Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:43.745Z DEBUG modem >> AT+CFUN?\x0D\x0A
2020-04-24T08:37:43.762Z DEBUG modem << +CFUN: 0\x0D\x0A
2020-04-24T08:37:43.781Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:45.028Z DEBUG modem >> AT+CFUN=1\x0D\x0A
2020-04-24T08:37:45.073Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:46.713Z DEBUG modem >> AT+CFUN?\x0D\x0A
2020-04-24T08:37:46.719Z DEBUG modem << +CFUN: 1\x0D\x0A
2020-04-24T08:37:46.738Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:46.744Z DEBUG modem >> AT+CGSN=1\x0D\x0A
2020-04-24T08:37:46.826Z DEBUG modem << +CGSN: "352656100368219"\x0D\x0A
2020-04-24T08:37:46.829Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:46.834Z DEBUG modem >> AT+CGMI\x0D\x0A
2020-04-24T08:37:46.927Z DEBUG modem << Nordic Semiconductor ASA\x0D\x0A
2020-04-24T08:37:46.934Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:46.951Z DEBUG modem >> AT+CGMM\x0D\x0A
2020-04-24T08:37:47.030Z DEBUG modem << nRF9160-SICA\x0D\x0A
2020-04-24T08:37:47.033Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.037Z DEBUG modem >> AT+CGMR\x0D\x0A
2020-04-24T08:37:47.134Z DEBUG modem << mfw_nrf9160_1.1.1\x0D\x0A
2020-04-24T08:37:47.137Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.139Z INFO Nordic Semiconductor ASA nRF9160-SICA [mfw_nrf9160_1.1.1] SerNr: 352656100368219
2020-04-24T08:37:47.145Z DEBUG modem >> AT+CEMODE?\x0D\x0A
2020-04-24T08:37:47.237Z DEBUG modem << +CEMODE: 2\x0D\x0A
2020-04-24T08:37:47.239Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.255Z DEBUG modem >> AT%XCBAND=?\x0D\x0A
2020-04-24T08:37:47.346Z DEBUG modem << %XCBAND: (1,2,3,4,5,8,12,13,14,17,18,19,20,25,26,28,66)\x0D\x0A
2020-04-24T08:37:47.352Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.382Z DEBUG modem >> AT+CMEE?\x0D\x0A
2020-04-24T08:37:47.447Z DEBUG modem << +CMEE: 0\x0D\x0A
2020-04-24T08:37:47.449Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.455Z DEBUG modem >> AT+CMEE=1\x0D\x0A
2020-04-24T08:37:47.549Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.555Z DEBUG modem >> AT+CNEC?\x0D\x0A
2020-04-24T08:37:47.654Z DEBUG modem << +CNEC: 0\x0D\x0A
2020-04-24T08:37:47.658Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.673Z DEBUG modem >> AT+CNEC=24\x0D\x0A
2020-04-24T08:37:47.755Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.771Z DEBUG modem >> AT+CGEREP?\x0D\x0A
2020-04-24T08:37:47.861Z DEBUG modem << +CGEREP: 0,0\x0D\x0A
2020-04-24T08:37:47.867Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:47.883Z DEBUG modem >> AT+CGDCONT?\x0D\x0A
2020-04-24T08:37:47.965Z DEBUG modem << +CGDCONT: 0,"IP","","",0,0\x0D\x0A
2020-04-24T08:37:47.972Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.023Z DEBUG modem >> AT+CGACT?\x0D\x0A
2020-04-24T08:37:48.069Z DEBUG modem << +CGACT: 0,0\x0D\x0A
2020-04-24T08:37:48.073Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.091Z DEBUG modem >> AT+CGEREP=1\x0D\x0A
2020-04-24T08:37:48.171Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.187Z DEBUG modem >> AT+CIND=1,1,1\x0D\x0A
2020-04-24T08:37:48.276Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.281Z DEBUG modem >> AT+CEREG=2\x0D\x0A
2020-04-24T08:37:48.378Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.383Z DEBUG modem >> AT+CEREG?\x0D\x0A
2020-04-24T08:37:48.482Z DEBUG modem << +CEREG: 2,1,"0001","00000100",7\x0D\x0A
2020-04-24T08:37:48.489Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.524Z DEBUG modem >> AT+COPS=3,2\x0D\x0A
2020-04-24T08:37:48.582Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.587Z DEBUG modem >> AT+COPS?\x0D\x0A
2020-04-24T08:37:48.686Z DEBUG modem << +COPS: 0,2,"00101",7\x0D\x0A
2020-04-24T08:37:48.693Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.714Z DEBUG modem >> AT%XCBAND\x0D\x0A
2020-04-24T08:37:48.792Z DEBUG modem << %XCBAND: 13\x0D\x0A
2020-04-24T08:37:48.794Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.803Z DEBUG modem >> AT+CGDCONT?\x0D\x0A
2020-04-24T08:37:48.902Z DEBUG modem << +CGDCONT: 0,"IPV4V6","cmw500.rohde-schwarz.com","192.168.1.30 FC01:ABAB:CDCD:EFE0:0000:0000:0000:0001",0,0\x0D\x0A
2020-04-24T08:37:48.904Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:48.921Z DEBUG modem >> AT+CGACT?\x0D\x0A
2020-04-24T08:37:49.005Z DEBUG modem << +CGACT: 0,1\x0D\x0A
2020-04-24T08:37:49.007Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.018Z DEBUG modem >> AT%CESQ=1\x0D\x0A
2020-04-24T08:37:49.107Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.117Z DEBUG modem >> AT+CESQ\x0D\x0A
2020-04-24T08:37:49.212Z DEBUG modem << +CESQ: 99,99,255,255,29,77\x0D\x0A
2020-04-24T08:37:49.234Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.281Z DEBUG modem >> AT%XSIM=1\x0D\x0A
2020-04-24T08:37:49.314Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.322Z DEBUG modem >> AT%XSIM?\x0D\x0A
2020-04-24T08:37:49.418Z DEBUG modem << %XSIM: 1\x0D\x0A
2020-04-24T08:37:49.422Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.452Z DEBUG modem >> AT+CPIN?\x0D\x0A
2020-04-24T08:37:49.521Z DEBUG modem << +CPIN: READY\x0D\x0A
2020-04-24T08:37:49.524Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.547Z DEBUG modem >> AT+CPINR="SIM PIN"\x0D\x0A
2020-04-24T08:37:49.630Z DEBUG modem << +CPINR: "SIM PIN",3\x0D\x0A
2020-04-24T08:37:49.634Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.671Z DEBUG modem >> AT+CIMI\x0D\x0A
2020-04-24T08:37:49.734Z DEBUG modem << 001010123456063\x0D\x0A
2020-04-24T08:37:49.737Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:37:49.744Z INFO IMSIdentity: 001010123456063
2020-04-24T08:38:09.578Z DEBUG modem >> at#xsocket=1,1,1\x0D\x0A
2020-04-24T08:38:09.586Z DEBUG modem << #XSOCKET: 1, 1, 1, 6\x0D\x0A
2020-04-24T08:38:09.588Z DEBUG modem << OK\x0D\x0A
2020-04-24T08:38:20.762Z DEBUG modem >> at#xbind=3442\x0D\x0A
2020-04-24T08:38:20.804Z DEBUG modem << ERROR\x0D\x0A
2020-04-24T08:38:20.805Z ERROR Error: at#xbind=3442
 failed
2020-04-24T08:38:30.888Z DEBUG modem >> at#xbind=3000\x0D\x0A
2020-04-24T08:38:30.929Z DEBUG modem << ERROR\x0D
2020-04-24T08:38:30.932Z ERROR Error: at#xbind=3000
 failed
2020-04-24T08:38:43.935Z DEBUG modem >> at#xlisten\x0D\x0A
2020-04-24T08:38:43.941Z DEBUG modem << #XSOCKET: -9, closed\x0D\x0A
2020-04-24T08:38:43.944Z DEBUG modem << ERROR\x0D\x0A
2020-04-24T08:38:43.946Z ERROR Error: at#xlisten
 failed
2020-04-24T08:38:52.005Z DEBUG modem >> at#xsocket=0\x0D\x0A
2020-04-24T08:38:52.016Z DEBUG modem << ERROR\x0D\x0A
2020-04-24T08:38:52.017Z ERROR Error: at#xsocket=0
 failed

  • Hi Martin,

    There was some firewall issue in our setup at office due to this we are unable to open any TCP IP port.

    We sorted it out and now we are able to open TCP IP client socket and also TCP server socket and also able to send data to and fro.

    We are having few observation in serial LTE modem build shared by nordic recently-serial_lte_modem_15_05.hex

    In TCP IP Client mode, after establishing connection with server.When data is sent by server we are not receiving any message saying data received in buffer from server. 

    AT#RECV command is in waiting/polling mode to receive data from server, in this mode we are not able to send any other AT command until data received from the server.

    From the LOGS below:

    2020-05-22T06:24:10.009Z DEBUG modem >> at#xsocket?\x0D\x0A
    2020-05-22T06:24:10.020Z DEBUG modem << #XSOCKET: 0\x0D\x0A
    2020-05-22T06:24:10.022Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:24:19.240Z DEBUG modem >> at#xsocket=1,1,0\x0D\x0A
    2020-05-22T06:24:19.257Z DEBUG modem << #XSOCKET: 1, 1, 0, 6\x0D\x0A
    2020-05-22T06:24:19.259Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:24:46.875Z DEBUG modem >> at#xconnect="192.168.1.21",50505\x0D\x0A
    2020-05-22T06:24:47.564Z DEBUG modem << #XCONNECT: 1\x0D\x0A
    2020-05-22T06:24:47.567Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:25:12.344Z DEBUG modem >> at#xsend=1,"Hello server"\x0D\x0A
    2020-05-22T06:25:12.365Z DEBUG modem << #XSEND: 12\x0D\x0A
    2020-05-22T06:25:12.367Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:25:44.508Z DEBUG modem >> at#xrecv\x0D\x0A
    2020-05-22T06:25:44.524Z DEBUG modem << Hello serverHello clientHello client\x0D\x0A
    2020-05-22T06:25:44.526Z DEBUG modem << #XRECV: 1, 36\x0D\x0A
    2020-05-22T06:25:44.528Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:26:16.828Z DEBUG modem >> at#xrecv\x0D\x0A
    2020-05-22T06:26:17.830Z ERROR Error: 'at#xrecv
    ' timed out
    2020-05-22T06:27:05.478Z DEBUG modem << Hello client\x0D\x0A
    2020-05-22T06:27:05.482Z DEBUG modem << #XRECV: 1, 12\x0D\x0A
    2020-05-22T06:27:05.485Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:27:20.032Z DEBUG modem >> at#xsocket=0\x0D\x0A
    2020-05-22T06:27:20.050Z DEBUG modem << #XSOCKET: 0, closed\x0D\x0A
    2020-05-22T06:27:20.054Z DEBUG modem << OK\x0D\x0A

    The same with the TCP IP server mode, there is no indication that data is in buffer to read.

    2020-05-22T06:30:35.550Z DEBUG modem >> at#xsocket=1,1,1\x0D\x0A
    2020-05-22T06:30:35.568Z DEBUG modem << #XSOCKET: 1, 1, 1, 6\x0D\x0A
    2020-05-22T06:30:35.570Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:30:52.047Z DEBUG modem >> at#xbind=50505\x0D\x0A
    2020-05-22T06:30:52.105Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:31:18.767Z DEBUG modem >> at#xlisten\x0D\x0A
    2020-05-22T06:31:18.783Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:32:35.143Z DEBUG modem >> at#xaccept\x0D\x0A
    2020-05-22T06:32:35.156Z DEBUG modem << #XACCEPT: connected with 192.168.1.21\x0D\x0A
    2020-05-22T06:32:35.158Z DEBUG modem << #XACCEPT: 2\x0D\x0A
    2020-05-22T06:32:35.159Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:33:30.071Z DEBUG modem >> at#xrecv\x0D\x0A
    2020-05-22T06:33:31.071Z ERROR Error: 'at#xrecv
    ' timed out
    2020-05-22T06:33:44.865Z DEBUG modem << hello\x0D\x0A
    2020-05-22T06:33:44.884Z DEBUG modem << #XRECV: 1, 5\x0D\x0A
    2020-05-22T06:33:44.890Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:34:05.331Z DEBUG modem >> at#xsend=1,"Hello"\x0D\x0A
    2020-05-22T06:34:05.346Z DEBUG modem << #XSEND: 5\x0D\x0A
    2020-05-22T06:34:05.348Z DEBUG modem << OK\x0D\x0A
    2020-05-22T06:39:03.189Z DEBUG modem >> at#xsocket=0\x0D\x0A
    2020-05-22T06:39:03.205Z DEBUG modem << #XSOCKET: 0, closed\x0D\x0A
    2020-05-22T06:39:03.209Z DEBUG modem << OK\x0D\x0A

  • Hi Praveen,
    I am very sorry for the confusion. 
    You should not use need to use xsend/xrecv, but instead the commands for when enabled TCP proxy service.

    AT#XTCPSVR=<op>[,<port>[,[sec_tag]]
    AT#XTCPCLI=<op>[,<url>,<port>[,[sec_tag]]
    AT#XTCPSEND=<datatype>,<data>

    Attached is a precompiled Serial LTE modem .hex with TCP proxy enabled (and the fix from earlier).

    serial_lte_modem_25_05_tcpproxy.hex

    Please flash this one and do the following when testing the TCP client with your server:

    Ready
    at+cfun=1
    OK
    at+cereg?
    +CEREG: 0,5,"0CE9","02151012",9
    OK
    at#xsocket=1,1,0
    #XSOCKET: 1, 1, 0, 6
    OK
    AT#XTCPCLI=1,"77.68.25.xxx", 50xxx
    #XTCPCLI: 2 connected
    OK
    AT#XTCPSEND=1,"hello from client"
    #XTCPSEND: 18
    OK
    #XTCPRECV: 1, 18
    hello from client

    Here you can see that you get a response automatically and do not have this blocking effect as you see with #xrecv

    I will share some updated documentation as soon as possible that describes this in more detail.

  • Hi Martin,

    Can you please share the update TCP proxy AT command document to test the shared build.

    with regards,

    Praveen P

  • Hi Praveen,
    It's under development and not yet released.
    I will provide you the draft over mail.

  • Hi Martin,

    Today I got chance to test proxy TCP AT commands with the hex file SLM_tcpproxy_ftp_28_05.hex shared.

    Below are our AT commands responses and their observations

    TCPIP Client AT commands and responses: (nRF9160 is client and Hercules is in server mode)

    Hercules Utility info: https://www.hw-group.com/software/hercules-setup-utility

     AT#XTCPCLI?

    ERROR

    AT#XTCPCLI=?

    #XTCPCLI: (0, 1),<url>,<port>,<sec_tag>

    OK

      

    AT#XTCPCLI=1,"192.168.1.21",50505

    #XTCPCLI: 2 connected

    OK

      

    AT#XTCPSEND=1,"Hi Server"

    #XTCPSEND: 9

    OK

      

    #XTCPRECV: 1, 12     // Receiving message from server directly without URC. We have to read #XTCPRECV: string

    Hello client                // There is no “OK” string indicating end of data or command response.

                                      

     

    #XTCPRECV: 1, 14

    Hello client-1

     

    #XTCPRECV: 1, 14

    Hello client-1

     

    AT#XTCPSEND=1,"Hi Server"

    #XTCPSEND: 9

    OK

     

    AT+CESQ

    +CESQ: 99,99,255,255,28,77

    OK

     

     AT#XTCPCLI=0   //Connection closed

    OK

     

     AT#XTCPSEND=1,"Hello Server"   //Error expected as Connection closed

    ERROR

     

    TCPIP Server AT command responses: (nRF9160 is server and Hercules is client)

     

     

    AT#XTCPSVR=1,50505

    #XTCPSVR: 1 started                   // Device is server mode.

    OK

     

     

    #XTCPSVR: 192.168.1.21 connected    // Client request Connection accepted automatically

     

    AT#XTCPSEND=1,"hELLO"

    #XTCPSEND: 5

    OK

     

     

    #XTCPRECV: 1, 5

    Hello                      // There is no “OK” string indicating end of data or command response

     

     

    #XTCPRECV: 1, 5

    hello

     

     

    #XTCPRECV: 1, 5

    hello

     

     

    #XTCPRECV: 1, 5

    hello

     

     

    AT#XTCPSVR=0,50505    //Server session closed

    OK

     TCPIP client Observations:

     1.After client is connected to server, Data is automatically  received from server. Client  received  data in the format:

    #XTCPRECV: 1, 12

    Hello client

    There is no  “OK” string at the end of data from the server to client.We expect "OK" string at the end of  response. In other vendors radio modules like Telit we use to get OK after response. 

    We are expecting response like shown below, if data sent by server to Client:

    #XTCPRECV: 1, 12\r\n

    Hello client\r\n

    OK\r\n

    2.Status check AT command AT#XTCPCLI?  is throwing error, due this not able to know whether module is already connected to server or not.

     

     TCP server Observations:

     1. Data sent by client is automatically received, no receive AT command. Note that there is no “OK” string at the end of data from client to server. Same expectation as mentioned in TCP client observation.

    2.Status check AT command AT#XTCPSVR?  is throwing error, due this not able to know whether server session is already started or not.

Related