Reopening TCP server on the same port, TCP proxy (Serial LTE modem)

Dear Nordic company,

                                   I am writting to you in order to discuse some trouble with TCP server that I am trying run on Serial LTE modem application.

I am able to create TCP server (after entering APN usign AT+CGDCONT command, AT+CEREG=5 and AT+CFUN=1) with AT#XTCPSVR command.

If i close server with command

AT#XTCPSVR=0,XYZW 
OK
I am not able to open server on the same port again.
AT#XTCPSVR=1,XYZW 

ERROR

But if I try open server on another port, it works.

AT#XTCPSVR=1,XYZK 
OK
I try to logg isue and i know  I am not able to use listen() function.
I tried to fix it with using AT+CFUN=0 and AT+CFUN=1, but this doesn't help me. I tried to shut down net_if via net_if library, it doesn't work. Only way how fix it is use reset. I tried AT%XFACTORYRESET command, but it doesn't help too.
Could you please help me find way how to reopen server on the same port without reset of nrf9151?

Kind regards

Jaroslav Havel

  • Hello Jaroslav, 

    Are you able to provide more details on which version of the Serial LTE Modem you are using? I.e. nRF Connect SDK version

    Can you also please provide the full application log from startup, showing the steps you are taking?

    Thank you.

    Kind regards,
    Øyvind

  • > AT+CGDCONT=1,IP,iot.1nce.net
    
    OK
    > AT+CEREG=5
    
    OK
    > AT+CFUN=1
    
    OK
    
    +CEREG: 2,"0655","081EAD01",7
    
    +CEREG: 5,"0655","081EAD01",7,,,"11100000","11100000"
    > AT#XTCPSVR=1,6500
    
    #XTCPSVR CLIENT 1: 0,"started"
    
    #XTCPSVR CLIENT 2: 0,"started"
    
    #XTCPSVR CLIENT 3: 0,"started"
    
    #XTCPSVR CLIENT 4: 0,"started"
    
    #XTCPSVR CLIENT 5: 0,"started"
    
    #XTCPSVR CLIENT 6: 0,"started"
    
    #XTCPSVR CLIENT 7: 0,"started"
    
    #XTCPSVR CLIENT 8: 0,"started"
    
    #XTCPSVR CLIENT 9: 0,"started"
    
    #XTCPSVR CLIENT 10: 0,"started"
    
    OK
    > AT#XTCPSVR=0,6500
    
    OK
    > AT#XTCPSVR=1,6500
    
     NEDAŘÍ SE POSLOUCHAT 
    
    #XTCPSVR se nepodarilo spustit
    
    ERROR

    00> *** Booting nRF Connect SDK v2.7.0-5cb85570ca43 ***
    00> *** Using Zephyr OS v3.6.99-100befc70c74 ***
    00> [00:00:00.256,042] <inf> at_cmd_custom: Custom AT commands enabled with 79 entries.
    00> [00:00:00.262,145] <inf> fs_nvs: 2 Sectors of 4096 bytes
    00> [00:00:00.262,176] <inf> fs_nvs: alloc wra: 0, fe8
    00> [00:00:00.262,176] <inf> fs_nvs: data wra: 0, 0
    00> [00:00:00.526,977] <inf> slm: lib_modem init: 0
    00> [00:00:00.527,038] <inf> mcuboot_util: Image index: 0, Swap type: none
    00> [00:00:00.527,038] <inf> slm: Serial LTE Modem
    00> [00:00:00.620,483] <inf> slm_uart_handler: UART baud: 115200 d/p/s-bits: 3/0/1 HWFC: 1
    00> [00:00:00.620,605] <inf> slm_at_host: at_host init done
    00> [00:02:06.398,498] <err> slm_tcp: listen() failed: -112
    00> [00:02:06.404,968] <err> slm_at_host: AT command failed: -22

    Kind regards

    Jardoslv Havel

Related