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

nrf 9160 Serial LTE Modem

Hello All,

I used the sample Serial LTE modem code and downloaded it to nrf9160. Can some please help me with a sample AT commands to send to tcp/udp server and how should I receive it on the server (like a basic implementation). It would great help.

Thanks

Regards

Nordic user

  • Hi Heidi,

    Happy new Year! Thanks for giving me the list of At commands. I tried on my board, but it doesn't seem to work on my end. 

    Please let me know if I could do something with this. I updated the modem firmware too. But still gives me an error. Might be syntax issue.

    Thanks

    Nordic User

  • Hi! No, it's not a syntax error. Are you sure you are connected to a network?

    Could you provide me with a full log file from LTE Link Monitor by pressing this button - it's easier for me to see what's going on. 

  • Hi, I have added the file you had mentioned before. Apart from that the LTE sign on the top right is not green. I think I have to send some flow of AT commands to turn it on.

    Just to confirm that if my network and sim is working or not ? I tried the MQTT example and it works. Hopefully this helps you determine whats the problem with my setup.

    2020-01-09T01:00:16.515Z INFO Application data folder: C:\Users\ptrac\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2020-01-09T01:00:16.576Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
    2020-01-09T01:00:16.576Z DEBUG App path: C:\Users\ptrac\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2020-01-09T01:00:16.576Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.2.0)
    2020-01-09T01:00:16.576Z DEBUG nRFConnect path: C:\Users\ptrac\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-01-09T01:00:16.577Z DEBUG HomeDir: C:\Users\ptrac
    2020-01-09T01:00:16.577Z DEBUG TmpDir: C:\Users\ptrac\AppData\Local\Temp
    2020-01-09T01:00:20.044Z INFO Modem port is opened
    2020-01-09T01:00:24.154Z DEBUG modem << ***** Booting Zephyr OS build v2.0.99-ncs1 *****\x0D\x0A
    2020-01-09T01:00:24.171Z DEBUG modem << Flash region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-01-09T01:00:24.172Z DEBUG modem << 00 0x00000 0x08000 \x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.174Z DEBUG modem << 01 0x08000 0x10000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.175Z DEBUG modem << 02 0x10000 0x18000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.176Z DEBUG modem << 03 0x18000 0x20000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.179Z DEBUG modem << 04 0x20000 0x28000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.180Z DEBUG modem << 05 0x28000 0x30000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.185Z DEBUG modem << 06 0x30000 0x38000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.186Z DEBUG modem << 07 0x38000 0x40000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.189Z DEBUG modem << 08 0x40000 0x48000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.195Z DEBUG modem << 09 0x48000 0x50000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.197Z DEBUG modem << 10 0x50000 0x58000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.200Z DEBUG modem << 11 0x58000 0x60000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.204Z DEBUG modem << 12 0x60000 0x68000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.206Z DEBUG modem << 13 0x68000 0x70000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.208Z DEBUG modem << 14 0x70000 0x78000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.211Z DEBUG modem << 15 0x78000 0x80000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.212Z DEBUG modem << 16 0x80000 0x88000 \x09Non-Secure\x09rwxl\x0D
    2020-01-09T01:00:24.215Z DEBUG modem << 17 0x88000 0x90000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.219Z DEBUG modem << 18 0x90000 0x98000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.223Z DEBUG modem << 19 0x98000 0xa0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.226Z DEBUG modem << 20 0xa0000 0xa8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.228Z DEBUG modem << 21 0xa8000 0xb0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.232Z DEBUG modem << 22 0xb0000 0xb8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.237Z DEBUG modem << 23 0xb8000 0xc0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.239Z DEBUG modem << 24 0xc0000 0xc8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.241Z DEBUG modem << 25 0xc8000 0xd0000 \x09Non-Secure\x09rwxl\x0D
    2020-01-09T01:00:24.245Z DEBUG modem << 26 0xd0000 0xd8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.248Z DEBUG modem << 27 0xd8000 0xe0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.251Z DEBUG modem << 28 0xe0000 0xe8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.256Z DEBUG modem << 29 0xe8000 0xf0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.258Z DEBUG modem << 30 0xf0000 0xf8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.261Z DEBUG modem << 31 0xf8000 0x100000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.270Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.\x0D\x0A\x0D\x0A
    2020-01-09T01:00:24.439Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-01-09T01:00:24.443Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.445Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.447Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.450Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.452Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.455Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D
    2020-01-09T01:00:24.458Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.461Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.464Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.471Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.472Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.474Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D
    2020-01-09T01:00:24.477Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.480Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.483Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D
    2020-01-09T01:00:24.486Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.490Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.493Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.496Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.504Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.505Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.507Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.509Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.512Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.515Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.518Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D
    2020-01-09T01:00:24.521Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.524Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.528Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.531Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.537Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T01:00:24.538Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
    2020-01-09T01:00:24.540Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D\x0A
    2020-01-09T01:00:24.543Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.546Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D
    2020-01-09T01:00:24.550Z DEBUG modem << 02 NRF_RTC1             Non-Secure\x09OK\x0D
    2020-01-09T01:00:24.553Z DEBUG modem << 03 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.557Z DEBUG modem << 04 NRF_UARTE1           Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.560Z DEBUG modem << 05 NRF_UARTE2           Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.563Z DEBUG modem << 06 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.571Z DEBUG modem << 07 NRF_SPIM3            Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.573Z DEBUG modem << 08 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.574Z DEBUG modem << 09 NRF_TIMER1           Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.577Z DEBUG modem << 10 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.580Z DEBUG modem << 11 NRF_SAADC            Non-Secure\x09OK\x0D
    2020-01-09T01:00:24.584Z DEBUG modem << 12 NRF_PWM0             Non-Secure\x09OK\x0D
    2020-01-09T01:00:24.587Z DEBUG modem << 13 NRF_PWM1             Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.591Z DEBUG modem << 14 NRF_PWM2             Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.594Z DEBUG modem << 15 NRF_PWM3             Non-Secure\x09OK\x0D
    2020-01-09T01:00:24.597Z DEBUG modem << 16 NRF_WDT              Secure\x09\x09SKIP\x0D\x0A
    2020-01-09T01:00:24.604Z DEBUG modem << 17 NRF_IPC              Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.605Z DEBUG modem << 18 NRF_VMC              Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.608Z DEBUG modem << 19 NRF_FPU              Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.611Z DEBUG modem << 20 NRF_EGU1             Non-Secure\x09OK\x0D
    2020-01-09T01:00:24.614Z DEBUG modem << 21 NRF_EGU2             Non-Secure\x09OK\x0D
    2020-01-09T01:00:24.618Z DEBUG modem << 22 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.621Z DEBUG modem << 23 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.625Z DEBUG modem << 24 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A
    2020-01-09T01:00:24.627Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
    2020-01-09T01:00:24.629Z DEBUG modem << SPM: NS MSP at 0x20029050\x0D
    2020-01-09T01:00:24.637Z DEBUG modem << SPM: NS reset vector at 0xfce5\x0D\x0A
    2020-01-09T01:00:24.638Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
    2020-01-09T01:00:26.394Z DEBUG modem << ***** Booting Zephyr OS build v2.0.99-ncs1 *****\x0D\x0A
    2020-01-09T01:00:26.405Z DEBUG modem << Ready\x0D\x0A
    2020-01-09T01:00:27.405Z DEBUG modem << [00:00:01.762,939] \x1B[0m<inf> app: Serial LTE Modem\x1B[0m\x0D\x0A
    2020-01-09T01:00:32.724Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2020-01-09T01:00:32.737Z DEBUG modem << +CFUN: 0\x0D\x0A
    2020-01-09T01:00:32.748Z DEBUG modem << OK\x0D\x0A
    2020-01-09T01:00:35.502Z DEBUG modem >> AT+CFUN=1\x0D\x0A
    2020-01-09T01:00:35.546Z DEBUG modem << OK\x0D
    2020-01-09T01:00:36.796Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2020-01-09T01:00:36.800Z DEBUG modem << +CFUN: 1\x0D\x0A
    2020-01-09T01:00:36.805Z DEBUG modem << OK\x0D\x0A\x00
    2020-01-09T01:00:40.676Z DEBUG modem >> at\x0D\x0A
    2020-01-09T01:00:40.683Z DEBUG modem << OK\x0D\x0A\x00
    2020-01-09T01:00:44.981Z DEBUG modem >> AT?\x0D\x0A
    2020-01-09T01:00:44.989Z DEBUG modem << ERROR\x0D\x0A\x00
    2020-01-09T01:00:44.991Z ERROR Error: AT?
     failed
    2020-01-09T01:00:45.993Z DEBUG modem << [00:00:20.348,724] \x1B[1;31m<err> at_host: Could not send AT command to modem: -8\x1B[0m\x0D\x0A
    2020-01-09T01:01:09.060Z DEBUG modem >> at#xsocket=1,1\x0D\x0A
    2020-01-09T01:01:09.066Z DEBUG modem << ERROR\x0D\x0A\x00
    2020-01-09T01:01:09.067Z ERROR Error: at#xsocket=1,1
     failed
    2020-01-09T01:01:18.020Z DEBUG modem >> at#xsocket?\x0D\x0A
    2020-01-09T01:01:18.027Z DEBUG modem << #XSOCKET: 0\x0D\x0A
    2020-01-09T01:01:18.029Z DEBUG modem << OK\x0D\x0A\x00
    2020-01-09T01:01:29.829Z DEBUG modem >> at#xbind=5900\x0D\x0A
    2020-01-09T01:01:29.836Z DEBUG modem << ERROR\x0D\x0A\x00
    2020-01-09T01:01:29.838Z ERROR Error: at#xbind=5900
     failed
    2020-01-09T01:01:41.492Z DEBUG modem >> at#xsocket?\x0D\x0A
    2020-01-09T01:01:41.499Z DEBUG modem << #XSOCKET: 0\x0D\x0A
    2020-01-09T01:01:41.501Z DEBUG modem << OK\x0D\x0A\x00
    2020-01-09T01:01:50.004Z DEBUG modem >> at#xsocket=1,1\x0D\x0A
    2020-01-09T01:01:50.014Z DEBUG modem << ERROR\x0D\x0A\x00
    2020-01-09T01:01:50.017Z ERROR Error: at#xsocket=1,1
     failed
    

  • Thank you. I see you are receiving 

    at_host: Could not send AT command to modem: -8

    which means at_cmd_write() is returning ENOEXEC: is returned if the modem returned ERROR.

    Could you, first of all, provide me with a new log file where you send the following AT commands to the modem:

    AT+CESQ
    //wait for response
    AT+CEREG?
    //wait for response  

    Then, while you're at it, provide me with a modem trace, see this tutorial for how to do it. 

    Best regards,

    Heidi

Related