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

server_Bind not working.txt
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 Praveen,

    Here you can see my output testing the same exact application on a live network:

    From your output, you are not connected to a live network, but a CMW500 callbox, and I, therefore, think that the reason why you cannot at#xbind ("bind the socket to a local port") maybe because of some settings in the callbox. I would assume you may need to allow/set up that local port in the CMW500.

  • Hi Praveen,
    Yes, I would assume that the CMW500 has control/settings with regards to the available local ports.

    From what I know you have this "Data Application Unit" in the callbox which is it's own part on the CMW500 that handles the IP layer. It also has its own ethernet port that you can hook up to the network. One other thing you need to take care of is that the Callbox is switched to "Data/application mode" and not "Test mode".


    The modem firmware version should not have an effect on this exact issue, you should get it working with the 1.1.1 as well.

    Please flash this application and run through the same commands, it should provide a much better log output. (please share the log output)debug_serial_lte_modem_27_04.hex

    (For reference, these are the changed prj.conf configurations:)

    CONFIG_USE_SEGGER_RTT=n
    CONFIG_RTT_CONSOLE=n
    CONFIG_UART_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=n
    CONFIG_LOG_BACKEND_UART=y
    
    CONFIG_BSD_LIBRARY_TRACE_ENABLED=y
    CONFIG_SLM_LOG_LEVEL_DBG=y

  • SIDENOTE:

    Attached [debug_tcp_proxy_serial_lte_modem_27_04.hex] Is the Serial LTE modem application that supports TCP Server Proxy. (added CONFIG_SLM_TCP_PROXY=y in prj.conf)

    Here is a TCP server proxy sample:  

    Test TCP server with TCP proxy service:
    
    
    
    at#xtcpsvr=?
    
    #XTCPSVR: (0, 1),<port>,<sec_tag>
    
    OK
    
    at#xtcpsvr=1,3442    //The TCP Server proxy do bind() in the server start command
    
    #XTCPSVR: 2 started
    
    OK
    
    #XTCPSVR: 5.189.130.26 connected
    
    #XTCPRECV: 1, 13
    
    Hello, TCP#1!
    
    #XTCPRECV: 1, 13
    
    Hello, TCP#2!
    
    at#xtcpsend=1,"TCP1/2 received"
    
    #XTCPSEND: 15
    
    OK
    
    #XTCPRECV: 1, 13
    
    Hello, TCP#3!
    
    #XTCPRECV: 1, 13
    
    Hello, TCP#4!
    
    #XTCPRECV: 1, 13
    
    Hello, TCP#5!
    
    at#xtcpsend=1,"TCP3/4/5 received"
    
    #XTCPSEND: 17
    
    OK
    
    at#xtcpsvr=0
    
    OK
    
    

  • Hi Martin,

    I have flashed debug_serial_lte_modem_27_04.hex file and tried  TCP server mode, its failing at same AT command, AT#XBIND=5003.

    I am attached log generated from serial tool for your reference.

    serial_ATCommand_Log_v27_04.txt
    OK
    [00:02:41.309,967] <dbg> at_host: RX
    41 54 0d 0a                                      |AT..             
    [00:02:41.310,455] <dbg> at_host.uart_callback: RX_DISABLED
    [00:02:41.318,695] <dbg> at_host: TX
    [00:02:41.319,396] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:04:26.449,005] <dbg> at_host: RX
    41 54 2b 43 46 55 4e 3d  31 0d 0a                |AT+CFUN= 1..     
    [00:04:26.449,523] <dbg> at_host.uart_callback: RX_DISABLED
    [00:04:26.488,555] <dbg> at_host: TX
    [00:04:26.488,586] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    +CEMODE: 2
    OK
    [00:04:35.648,040] <dbg> at_host: RX
    41 54 2b 43 45 4d 4f 44  45 3f 0d 0a             |AT+CEMOD E?..    
    [00:04:35.648,498] <dbg> at_host: TX
    2b 43 45 4d 4f 44 45 3a  20 32 0d 0a             |+CEMODE:  2..    
    [00:04:35.648,529] <dbg> at_host.uart_callback: RX_DISABLED
    [00:04:35.649,597] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    %XCBAND: (1,2,3,4,5,8,12,13,14,17,18,19,20,25,26,28,66)
    OK
    [00:05:02.610,961] <dbg> at_host: RX
    41 54 25 58 43 42 41 4e  44 3d 3f 0d 0a          |AT%XCBAN D=?..   
    [00:05:02.611,450] <dbg> at_host.uart_callback: RX_DISABLED
    [00:05:02.619,964] <dbg> at_host: TX
    25 58 43 42 41 4e 44 3a  20 28 31 2c 32 2c 33 2c |%XCBAND:  (1,2,3,
    34 2c 35 2c 38 2c 31 32  2c 31 33 2c 31 34 2c 31 |4,5,8,12 ,13,14,1
    37 2c 31 38 2c 31 39 2c  32 30 2c 32 35 2c 32 36 |7,18,19, 20,25,26
    2c 32 38 2c 36 36 29 0d  0a                      |,28,66). .       
    [00:05:02.625,030] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:05:22.371,520] <dbg> at_host: RX
    41 54 2b 43 4d 45 45 3d  31 0d 0a                |AT+CMEE= 1..     
    [00:05:22.372,039] <dbg> at_host.uart_callback: RX_DISABLED
    [00:05:22.380,371] <dbg> at_host: TX
    [00:05:22.380,432] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:05:50.231,170] <dbg> at_host: RX
    41 54 2b 43 4e 45 43 3d  32 34 0d 0a             |AT+CNEC= 24..    
    [00:05:50.231,658] <dbg> at_host.uart_callback: RX_DISABLED
    [00:05:50.240,081] <dbg> at_host: TX
    [00:05:50.240,112] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:06:24.717,590] <dbg> at_host: RX
    41 54 2b 43 47 45 52 45  50 3d 31 0d 0a          |AT+CGERE P=1..   
    [00:06:24.718,078] <dbg> at_host.uart_callback: RX_DISABLED
    [00:06:24.726,470] <dbg> at_host: TX
    [00:06:24.726,501] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:08:46.385,650] <dbg> at_host: RX
    41 54 2b 43 49 4e 44 3d  31 2c 31 2c 31 0d 0a    |AT+CIND= 1,1,1.. 
    [00:08:46.386,138] <dbg> at_host.uart_callback: RX_DISABLED
    [00:08:46.394,592] <dbg> at_host: TX
    [00:08:46.394,622] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:09:25.093,658] <dbg> at_host: RX
    41 54 2b 43 45 52 45 47  3d 32 0d 0a             |AT+CEREG =2..    
    [00:09:25.094,146] <dbg> at_host.uart_callback: RX_DISABLED
    [00:09:25.102,539] <dbg> at_host: TX
    [00:09:25.102,600] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:09:49.268,524] <dbg> at_host: RX
    41 54 25 43 45 53 51 3d  31 0d 0a                |AT%CESQ= 1..     
    [00:09:49.269,012] <dbg> at_host.uart_callback: RX_DISABLED
    [00:09:49.277,374] <dbg> at_host: TX
    [00:09:49.277,404] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    OK
    [00:10:21.684,448] <dbg> at_host: RX
    41 54 25 58 53 49 4d 3d  31 0d 0a                |AT%XSIM= 1..     
    [00:10:21.684,967] <dbg> at_host.uart_callback: RX_DISABLED
    [00:10:21.685,058] <dbg> at_host: TX
    [00:10:21.685,119] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    +CPIN: READY
    OK
    [00:10:37.396,759] <dbg> at_host: RX
    41 54 2b 43 50 49 4e 3f  0d 0a                   |AT+CPIN? ..      
    [00:10:37.397,247] <dbg> at_host.uart_callback: RX_DISABLED
    [00:10:37.405,609] <dbg> at_host: TX
    2b 43 50 49 4e 3a 20 52  45 41 44 59 0d 0a       |+CPIN: R EADY..  
    [00:10:37.406,890] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    +CPINR: "SIM PIN",3
    OK
    [00:10:59.787,689] <dbg> at_host: RX
    41 54 2b 43 50 49 4e 52  3d 22 53 49 4d 20 50 49 |AT+CPINR ="SIM PI
    4e 22 0d 0a                                      |N"..             
    [00:10:59.788,177] <dbg> at_host.uart_callback: RX_DISABLED
    [00:10:59.801,849] <dbg> at_host: TX
    2b 43 50 49 4e 52 3a 20  22 53 49 4d 20 50 49 4e |+CPINR:  "SIM PIN
    22 2c 33 0d 0a                                   |",3..            
    [00:10:59.803,741] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    001010123456063
    OK
    [00:11:19.299,468] <dbg> at_host: RX
    41 54 2b 43 49 4d 49 0d  0a                      |AT+CIMI. .       
    [00:11:19.299,957] <dbg> at_host.uart_callback: RX_DISABLED
    [00:11:19.300,079] <dbg> at_host: TX
    30 30 31 30 31 30 31 32  33 34 35 36 30 36 33 0d |00101012 3456063.
    0a                                               |.                
    [00:11:19.301,635] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    +CME: 0
    [00:11:41.767,333] <dbg> at_host: RX
    1b 5b 42 1b 5b 42 1b 5b  42 1b 5b 42 1b 5b 42 1b |.[B.[B.[ B.[B.[B.
    5b 42 61 74 23 78 73 6f  63 6b 65 74 3d 31 2c 31 |[Bat#xso cket=1,1
    2c 31 0d 0a                                      |,1..             
    [00:11:41.767,822] <dbg> at_host.uart_callback: RX_DISABLED
    [00:11:41.776,214] <dbg> at_host: TX
    2b 43 4d 45 3a 20 30 0d  0a 00                   |+CME: 0. ..      
    #XSOCKET: 1, 1, 1, 6
    OK
    [00:12:19.059,692] <dbg> at_host: RX
    61 74 23 78 73 6f 63 6b  65 74 3d 31 2c 31 2c 31 |at#xsock et=1,1,1
    0d 0a                                            |..               
    [00:12:19.060,211] <dbg> at_host.uart_callback: RX_DISABLED
    [00:12:19.068,786] <dbg> at_host: TX
    23 58 53 4f 43 4b 45 54  3a 20 31 2c 20 31 2c 20 |#XSOCKET : 1, 1, 
    31 2c 20 36 0d 0a                                |1, 6..           
    [00:12:19.068,817] <dbg> tcpip.do_socket_open: Socket opened
    [00:12:19.070,770] <dbg> at_host: TX
    4f 4b 0d 0a                                      |OK..             
    ERROR
    [00:12:56.911,437] <dbg> at_host: RX
    61 74 23 78 62 69 6e 64  3d 35 30 30 32 0d 0a    |at#xbind =5002.. 
    [00:12:56.911,926] <dbg> at_host.uart_callback: RX_DISABLED
    [00:12:56.948,455] <err> tcpip: Invalid local address
    [00:12:56.948,455] <dbg> at_host: TX
    45 52 52 4f 52 0d 0a                             |ERROR..          
    ERROR
    [00:13:33.777,252] <dbg> at_host: RX
    61 74 23 78 62 69 6e 64  3d 35 30 30 32 0d 0a    |at#xbind =5002.. 
    [00:13:33.777,770] <dbg> at_host.uart_callback: RX_DISABLED
    [00:13:33.814,147] <err> tcpip: Invalid local address
    [00:13:33.814,147] <dbg> at_host: TX
    45 52 52 4f 52 0d 0a                             |ERROR..          
    

    I got update from R&S CMW500 BTS support team is that, , The available port’s are 5001 to 5008.

Related