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

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

    Here you go

    2020-01-09T19:44:55.195Z INFO Application data folder: C:\Users\ptrac\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2020-01-09T19:44:55.254Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
    2020-01-09T19:44:55.254Z DEBUG App path: C:\Users\ptrac\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2020-01-09T19:44:55.254Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.2.0)
    2020-01-09T19:44:55.254Z DEBUG nRFConnect path: C:\Users\ptrac\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-01-09T19:44:55.254Z DEBUG HomeDir: C:\Users\ptrac
    2020-01-09T19:44:55.254Z DEBUG TmpDir: C:\Users\ptrac\AppData\Local\Temp
    2020-01-09T19:44:59.155Z INFO Modem port is opened
    2020-01-09T19:45:12.414Z DEBUG modem << ***** Booting Zephyr OS build v2.0.99-ncs1 *****\x0D\x0A
    2020-01-09T19:45:12.429Z DEBUG modem << Flash region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-01-09T19:45:12.430Z DEBUG modem << 00 0x00000 0x08000 \x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.431Z DEBUG modem << 01 0x08000 0x10000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.433Z DEBUG modem << 02 0x10000 0x18000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.434Z DEBUG modem << 03 0x18000 0x20000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.436Z DEBUG modem << 04 0x20000 0x28000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.438Z DEBUG modem << 05 0x28000 0x30000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.442Z DEBUG modem << 06 0x30000 0x38000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.444Z DEBUG modem << 07 0x38000 0x40000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.446Z DEBUG modem << 08 0x40000 0x48000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.453Z DEBUG modem << 09 0x48000 0x50000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.454Z DEBUG modem << 10 0x50000 0x58000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.457Z DEBUG modem << 11 0x58000 0x60000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.461Z DEBUG modem << 12 0x60000 0x68000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.464Z DEBUG modem << 13 0x68000 0x70000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.466Z DEBUG modem << 14 0x70000 0x78000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.468Z DEBUG modem << 15 0x78000 0x80000 \x09Non-Secure\x09rwxl\x0D
    2020-01-09T19:45:12.471Z DEBUG modem << 16 0x80000 0x88000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.475Z DEBUG modem << 17 0x88000 0x90000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.478Z DEBUG modem << 18 0x90000 0x98000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.482Z DEBUG modem << 19 0x98000 0xa0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.484Z DEBUG modem << 20 0xa0000 0xa8000 \x09Non-Secure\x09rwxl\x0D
    2020-01-09T19:45:12.488Z DEBUG modem << 21 0xa8000 0xb0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.491Z DEBUG modem << 22 0xb0000 0xb8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.496Z DEBUG modem << 23 0xb8000 0xc0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.497Z DEBUG modem << 24 0xc0000 0xc8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.501Z DEBUG modem << 25 0xc8000 0xd0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.504Z DEBUG modem << 26 0xd0000 0xd8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.507Z DEBUG modem << 27 0xd8000 0xe0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.510Z DEBUG modem << 28 0xe0000 0xe8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.515Z DEBUG modem << 29 0xe8000 0xf0000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.517Z DEBUG modem << 30 0xf0000 0xf8000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.520Z DEBUG modem << 31 0xf8000 0x100000 \x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.528Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.\x0D\x0A\x0D\x0A
    2020-01-09T19:45:12.699Z DEBUG modem << SRAM region\x09\x09Domain\x09\x09Permissions\x0D\x0A
    2020-01-09T19:45:12.702Z DEBUG modem << 00 0x00000 0x02000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.703Z DEBUG modem << 01 0x02000 0x04000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.706Z DEBUG modem << 02 0x04000 0x06000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.709Z DEBUG modem << 03 0x06000 0x08000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.712Z DEBUG modem << 04 0x08000 0x0a000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.715Z DEBUG modem << 05 0x0a000 0x0c000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.718Z DEBUG modem << 06 0x0c000 0x0e000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.721Z DEBUG modem << 07 0x0e000 0x10000\x09Secure\x09\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.728Z DEBUG modem << 08 0x10000 0x12000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.730Z DEBUG modem << 09 0x12000 0x14000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.732Z DEBUG modem << 10 0x14000 0x16000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.734Z DEBUG modem << 11 0x16000 0x18000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.737Z DEBUG modem << 12 0x18000 0x1a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.740Z DEBUG modem << 13 0x1a000 0x1c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.743Z DEBUG modem << 14 0x1c000 0x1e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.746Z DEBUG modem << 15 0x1e000 0x20000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.749Z DEBUG modem << 16 0x20000 0x22000\x09Non-Secure\x09rwxl\x0D
    2020-01-09T19:45:12.753Z DEBUG modem << 17 0x22000 0x24000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.756Z DEBUG modem << 18 0x24000 0x26000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.763Z DEBUG modem << 19 0x26000 0x28000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.765Z DEBUG modem << 20 0x28000 0x2a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.767Z DEBUG modem << 21 0x2a000 0x2c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.768Z DEBUG modem << 22 0x2c000 0x2e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.771Z DEBUG modem << 23 0x2e000 0x30000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.775Z DEBUG modem << 24 0x30000 0x32000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.778Z DEBUG modem << 25 0x32000 0x34000\x09Non-Secure\x09rwxl\x0D
    2020-01-09T19:45:12.781Z DEBUG modem << 26 0x34000 0x36000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.784Z DEBUG modem << 27 0x36000 0x38000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.787Z DEBUG modem << 28 0x38000 0x3a000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.796Z DEBUG modem << 29 0x3a000 0x3c000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.797Z DEBUG modem << 30 0x3c000 0x3e000\x09Non-Secure\x09rwxl\x0D\x0A
    2020-01-09T19:45:12.798Z DEBUG modem << 31 0x3e000 0x40000\x09Non-Secure\x09rwxl\x0D\x0A\x0D\x0A
    2020-01-09T19:45:12.799Z DEBUG modem << Peripheral\x09\x09Domain\x09\x09Status\x0D
    2020-01-09T19:45:12.802Z DEBUG modem << 00 NRF_P0               Non-Secure\x09OK\x0D
    2020-01-09T19:45:12.806Z DEBUG modem << 01 NRF_CLOCK            Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.809Z DEBUG modem << 02 NRF_RTC1             Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.813Z DEBUG modem << 03 NRF_NVMC             Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.816Z DEBUG modem << 04 NRF_UARTE1           Non-Secure\x09OK\x0D
    2020-01-09T19:45:12.820Z DEBUG modem << 05 NRF_UARTE2           Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.829Z DEBUG modem << 06 NRF_TWIM2            Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.830Z DEBUG modem << 07 NRF_SPIM3            Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.831Z DEBUG modem << 08 NRF_TIMER0           Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.833Z DEBUG modem << 09 NRF_TIMER1           Non-Secure\x09OK\x0D
    2020-01-09T19:45:12.837Z DEBUG modem << 10 NRF_TIMER2           Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.840Z DEBUG modem << 11 NRF_SAADC            Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.843Z DEBUG modem << 12 NRF_PWM0             Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.847Z DEBUG modem << 13 NRF_PWM1             Non-Secure\x09OK\x0D
    2020-01-09T19:45:12.850Z DEBUG modem << 14 NRF_PWM2             Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.854Z DEBUG modem << 15 NRF_PWM3             Non-Secure\x09OK\x0D
    2020-01-09T19:45:12.862Z DEBUG modem << 16 NRF_WDT              Secure\x09\x09SKIP\x0D\x0A
    2020-01-09T19:45:12.863Z DEBUG modem << 17 NRF_IPC              Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.864Z DEBUG modem << 18 NRF_VMC              Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.867Z DEBUG modem << 19 NRF_FPU              Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.871Z DEBUG modem << 20 NRF_EGU1             Non-Secure\x09OK\x0D
    2020-01-09T19:45:12.874Z DEBUG modem << 21 NRF_EGU2             Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.877Z DEBUG modem << 22 NRF_DPPIC            Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.881Z DEBUG modem << 23 NRF_GPIOTE1          Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.884Z DEBUG modem << 24 NRF_REGULATORS       Non-Secure\x09OK\x0D\x0A
    2020-01-09T19:45:12.887Z DEBUG modem << SPM: NS image at 0xc000\x0D\x0A
    2020-01-09T19:45:12.889Z DEBUG modem << SPM: NS MSP at 0x20029050\x0D
    2020-01-09T19:45:12.896Z DEBUG modem << SPM: NS reset vector at 0xfce5\x0D\x0A
    2020-01-09T19:45:12.897Z DEBUG modem << SPM: prepare to jump to Non-Secure image.\x0D\x0A
    2020-01-09T19:45:13.277Z DEBUG modem << ***** Booting Zephyr OS build v2.0.99-ncs1 *****\x0D\x0A
    2020-01-09T19:45:13.285Z DEBUG modem << Ready\x0D\x0A
    2020-01-09T19:45:14.288Z DEBUG modem << [00:00:00.386,199] \x1B[0m<inf> app: Serial LTE Modem\x1B[0m\x0D\x0A
    2020-01-09T19:45:17.770Z DEBUG modem >> AT+CESQ\x0D\x0A
    2020-01-09T19:45:17.785Z DEBUG modem << +CESQ: 99,99,255,255,255,255\x0D\x0A
    2020-01-09T19:45:17.793Z DEBUG modem << OK\x0D
    2020-01-09T19:45:28.033Z DEBUG modem >> AT+CEREG?\x0D\x0A
    2020-01-09T19:45:28.049Z DEBUG modem << +CEREG: 0,4,"FFFE","FFFFFFFF",7\x0D\x0A
    2020-01-09T19:45:28.060Z DEBUG modem << OK\x0D\x0A
    2020-01-09T19:45:31.551Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2020-01-09T19:45:31.566Z DEBUG modem << +CFUN: 0\x0D\x0A
    2020-01-09T19:45:31.571Z DEBUG modem << OK\x0D\x0A\x00
    2020-01-09T19:45:32.805Z DEBUG modem >> AT+CFUN=1\x0D\x0A
    2020-01-09T19:45:32.849Z DEBUG modem << OK\x0D\x0A
    2020-01-09T19:45:33.582Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2020-01-09T19:45:33.622Z DEBUG modem << +CFUN: 1\x0D\x0A
    2020-01-09T19:45:33.628Z DEBUG modem << OK\x0D
    2020-01-09T19:45:44.024Z DEBUG modem >> AT+CESQ\x0D\x0A
    2020-01-09T19:45:44.039Z DEBUG modem << +CESQ: 99,99,255,255,20,56\x0D\x0A
    2020-01-09T19:45:44.043Z DEBUG modem << OK\x0D\x0A\x00
    2020-01-09T19:45:54.353Z DEBUG modem >> AT+CEREG?\x0D\x0A
    2020-01-09T19:45:54.369Z DEBUG modem << +CEREG: 0,5,"1F01","00799802",7\x0D\x0A
    2020-01-09T19:45:54.376Z DEBUG modem << OK\x0D\x0A\x00
    

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

    Here you gotrace-2020-01-09T20-06-21.845Z.bin

    my board version is 0.8.5

  • Please let me know if you need anything and thanks a lot for the followup.

    Regards

    Nordic User

  • Hi!

    From the log file, I can see that you don't have coverage where you are. So you aren't connecting to a network which is why you can't open a socket and are getting an error from the modem. 

    Are you sure your SIM card supports for LTE-M or NB-IoT, and that there is coverage where you are located?

    Best regards,

    Heidi

  • Hi,

    I am quite sure about the network and the Sim Card as the other MQTT application which I downloaded was working and had no issues as far as network coverage.

    Regards

    Nordic User

Related