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

The modem restarts after sending the command AT+CFUN=1

Hi, 

When running the at_client example, I send the AT+CFUN=1 command via the LTE link monitor. After a few seconds, the nrf9160 reboots.

I want to say that before my program worked and connected to the server. However, now I cannot even work through at_client. Commands like AT+CGMR work

If I pull out the sim card, the nrf9160 will not restart. What could be the problem?

P.S. I tried to get modem trace but tace collecor is not accepting anything. Are there any other ways to debug this problem?

Modem firmware version - mfw_nrf9160_1.1.0
I use nRF Connect SDK v1.3.0

  • I have enabled the following logs

    CONFIG_CONSOLE=y
    CONFIG_SERIAL=y
    CONFIG_NET_LOG=y
    CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y
    CONFIG_LOG_BLOCK_IN_THREAD=y
    CONFIG_AT_CMD_LOG_LEVEL_DBG=y
    CONFIG_NET_IF_LOG_LEVEL_DBG=y
    CONFIG_UART_MUX_LOG_LEVEL_DBG=y
    CONFIG_UART_CONSOLE_LOG_LEVEL_DBG=y
    CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y

    and attached a log file - 

    2020-08-11T10:46:44.990Z INFO Application data folder: C:\Users\y.morgunov\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2020-08-11T10:46:45.062Z DEBUG App pc-nrfconnect-linkmonitor v1.1.4 official
    2020-08-11T10:46:45.062Z DEBUG App path: C:\Users\y.morgunov\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2020-08-11T10:46:45.062Z DEBUG nRFConnect 3.4.2 is supported by the app (^3.2.0)
    2020-08-11T10:46:45.062Z DEBUG nRFConnect path: C:\Users\y.morgunov\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-08-11T10:46:45.063Z DEBUG HomeDir: C:\Users\y.morgunov
    2020-08-11T10:46:45.063Z DEBUG TmpDir: C:\Users\YDBE4~1.MOR\AppData\Local\Temp
    2020-08-11T10:46:45.069Z VERBOSE Could not fetch serial number for serial port at COM1
    2020-08-11T10:46:45.069Z VERBOSE Could not fetch serial number for serial port at COM20
    2020-08-11T10:46:47.031Z INFO Modem port is opened
    2020-08-11T10:46:53.736Z DEBUG modem >> AT+CFUN?
    2020-08-11T10:46:53.760Z DEBUG modem << +CFUN: 0
    2020-08-11T10:46:53.776Z DEBUG modem << OK
    2020-08-11T10:46:54.747Z DEBUG modem << [00:00:23.300,659] [0m<dbg> at_cmd.at_write: Sending command AT+CFUN?[0m
    2020-08-11T10:46:54.763Z DEBUG modem << [00:00:23.309,326] [0m<dbg> at_cmd.at_cmd_write: Awaiting response for AT+CFUN?[0m
    2020-08-11T10:46:54.764Z DEBUG modem << [00:00:23.312,591] [0m<dbg> at_cmd.socket_thread_fn: at_cmd_rx 15 bytes, +CFUN: 0
    2020-08-11T10:46:54.766Z DEBUG modem << OK
    2020-08-11T10:46:54.769Z DEBUG modem << [0m
    2020-08-11T10:46:54.772Z DEBUG modem << [00:00:23.312,622] [0m<dbg> at_cmd.socket_thread_fn: Enqueueing response for sync call[0m
    2020-08-11T10:46:54.784Z DEBUG modem << [00:00:23.312,652] [0m<dbg> at_cmd.socket_thread_fn: Writing any pending command[0m
    2020-08-11T10:46:54.788Z DEBUG modem << [00:00:23.312,683] [0m<dbg> at_cmd.socket_thread_fn: Listening on socket[0m
    2020-08-11T10:47:10.313Z DEBUG modem >> AT+CFUN=1
    2020-08-11T10:47:10.384Z DEBUG modem << OK
    2020-08-11T10:47:11.354Z DEBUG modem << [00:00:39.876,892] [0m<dbg> at_cmd.at_write: Sending command 
    2020-08-11T10:47:11.367Z DEBUG modem << AT+CFUN=1[0m
    2020-08-11T10:47:11.373Z DEBUG modem << [00:00:39.885,589] [0m<dbg> at_cmd.at_cmd_write: Awaiting response for 
    2020-08-11T10:47:11.376Z DEBUG modem << AT+CFUN=1[0m
    2020-08-11T10:47:11.379Z DEBUG modem << [00:00:39.915,618] [0m<dbg> at_cmd.socket_thread_fn: at_cmd_rx 5 bytes, OK
    2020-08-11T10:47:11.382Z DEBUG modem << [0m
    2020-08-11T10:47:11.397Z DEBUG modem << [00:00:39.915,618] [0m<dbg> at_cmd.socket_thread_fn: Enqueueing response for sync call[0m
    2020-08-11T10:47:11.401Z DEBUG modem << [00:00:39.915,679] [0m<dbg> at_cmd.socket_thread_fn: Writing any pending command[0m
    2020-08-11T10:47:11.405Z DEBUG modem << [00:00:39.943,786] [0m<dbg> at_cmd.socket_thread_fn: Listening on socket[0m
    2020-08-11T10:47:12.481Z DEBUG modem << *** Booting Zephyr OS build v2.3.0-rc1-ncs1-4-ga6a1fb4642fa  ***
    2020-08-11T10:47:12.498Z DEBUG modem << Flash regionsDomainPermissions
    2020-08-11T10:47:12.503Z DEBUG modem << 00 00 0x00000 0x08000 Securerwxl
    2020-08-11T10:47:12.509Z DEBUG modem << 01 31 0x08000 0x100000 Non-Securerwxl
    2020-08-11T10:47:12.513Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.
    2020-08-11T10:47:12.671Z DEBUG modem << SRAM regionDomainPermissions
    2020-08-11T10:47:12.685Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
    2020-08-11T10:47:12.693Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
    2020-08-11T10:47:12.698Z DEBUG modem << PeripheralDomainStatus
    2020-08-11T10:47:12.702Z DEBUG modem << 00 NRF_P0               Non-SecureOK
    2020-08-11T10:47:12.706Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
    2020-08-11T10:47:12.710Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
    2020-08-11T10:47:12.732Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
    2020-08-11T10:47:12.736Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
    2020-08-11T10:47:12.739Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
    2020-08-11T10:47:12.741Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
    2020-08-11T10:47:12.744Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
    2020-08-11T10:47:12.747Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
    2020-08-11T10:47:12.750Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
    2020-08-11T10:47:12.755Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
    2020-08-11T10:47:12.756Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
    2020-08-11T10:47:12.764Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
    2020-08-11T10:47:12.766Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
    2020-08-11T10:47:12.767Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
    2020-08-11T10:47:12.768Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
    2020-08-11T10:47:12.770Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
    2020-08-11T10:47:12.771Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
    2020-08-11T10:47:12.772Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
    2020-08-11T10:47:12.774Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
    2020-08-11T10:47:12.776Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
    2020-08-11T10:47:12.777Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
    2020-08-11T10:47:12.785Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
    2020-08-11T10:47:12.786Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
    2020-08-11T10:47:12.786Z DEBUG modem << 24 NRF_GPIOTE1          Non-SecureOK
    2020-08-11T10:47:12.787Z DEBUG modem << 25 NRF_REGULATORS       Non-SecureOK
    2020-08-11T10:47:12.787Z DEBUG modem << SPM: NS image at 0xc000
    2020-08-11T10:47:12.788Z DEBUG modem << SPM: NS MSP at 0x2003b098
    2020-08-11T10:47:12.789Z DEBUG modem << SPM: NS reset vector at 0xdf9d
    2020-08-11T10:47:12.790Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
    2020-08-11T10:47:13.015Z DEBUG modem << *** Booting Zephyr OS build v2.3.0-rc1-ncs1-4-ga6a1fb4642fa  ***
    2020-08-11T10:47:13.031Z DEBUG modem << The AT host sample started
    2020-08-11T10:47:13.036Z DEBUG modem << [00:00:00.226,928] [0m<dbg> net_if.net_if_init: (0x20020cec): [0m
    2020-08-11T10:47:13.041Z DEBUG modem << [00:00:00.226,959] [0m<dbg> net_if.init_iface: (0x20020cec): On iface 0x200201e0[0m
    2020-08-11T10:47:13.046Z DEBUG modem << [00:00:00.226,959] [0m<dbg> net_if.net_if_post_init: (0x20020cec): [0m
    2020-08-11T10:47:13.060Z DEBUG modem << [00:00:00.226,959] [0m<dbg> net_if.net_if_up: (0x20020cec): iface 0x200201e0[0m
    2020-08-11T10:47:13.065Z DEBUG modem << [00:00:00.240,112] [0m<dbg> at_cmd.at_cmd_driver_init: Common AT socket created[0m
    2020-08-11T10:47:13.071Z DEBUG modem << [00:00:00.240,142] [0m<dbg> at_cmd.at_cmd_driver_init: Common AT socket processing thread created[0m
    2020-08-11T10:47:13.085Z DEBUG modem << [00:00:00.240,142] [0m<dbg> at_cmd.at_cmd_set_notification_handler: Setting notification handler to 0x000110a5[0m
    2020-08-11T10:47:13.089Z DEBUG modem << [00:00:00.242,736] [0m<dbg> at_cmd.socket_thread_fn: AT socket thread started[0m
    2020-08-11T10:47:13.101Z DEBUG modem << [00:00:00.242,736] [0m<dbg> at_cmd.socket_thread_fn: Writing any pending command[0m
    2020-08-11T10:47:13.104Z DEBUG modem << [00:00:00.242,767] [0m<dbg> at_cmd.socket_thread_fn: Listening on socket[0m
    

  • Hi Yury,
    Please update the mfw to a newer one: https://www.nordicsemi.com/Products/Low-power-cellular-IoT/nRF9160/Download#infotabs

    Then just run the regular unmodified AT Client (also attached: at_client_nrf91dk.hex)

    Then turn ON "Automatic Requests" when you test:

  • Unfortunately, it didn't help. The device keeps restarting after sending command AT+CFUN=1.

    2020-08-12T05:39:42.767Z INFO Application data folder: C:\Users\y.morgunov\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2020-08-12T05:39:42.833Z DEBUG App pc-nrfconnect-linkmonitor v1.1.4 official
    2020-08-12T05:39:42.834Z DEBUG App path: C:\Users\y.morgunov\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2020-08-12T05:39:42.834Z DEBUG nRFConnect 3.4.2 is supported by the app (^3.2.0)
    2020-08-12T05:39:42.834Z DEBUG nRFConnect path: C:\Users\y.morgunov\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-08-12T05:39:42.834Z DEBUG HomeDir: C:\Users\y.morgunov
    2020-08-12T05:39:42.834Z DEBUG TmpDir: C:\Users\YDBE4~1.MOR\AppData\Local\Temp
    2020-08-12T05:39:42.840Z VERBOSE Could not fetch serial number for serial port at COM1
    2020-08-12T05:39:42.841Z VERBOSE Could not fetch serial number for serial port at COM20
    2020-08-12T05:39:47.994Z INFO Modem port is opened
    2020-08-12T05:39:48.002Z DEBUG modem >> AT+CFUN?
    2020-08-12T05:39:48.019Z DEBUG modem << +CFUN: 0
    2020-08-12T05:39:48.022Z DEBUG modem << OK
    2020-08-12T05:40:16.275Z DEBUG modem >> AT+CFUN=1
    2020-08-12T05:40:16.318Z DEBUG modem << OK
    2020-08-12T05:40:20.868Z DEBUG modem << *** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
    2020-08-12T05:40:20.883Z DEBUG modem << Flash regionsDomainPermissions
    2020-08-12T05:40:20.888Z DEBUG modem << 00 00 0x00000 0x08000 Securerwxl
    2020-08-12T05:40:20.891Z DEBUG modem << 01 31 0x08000 0x100000 Non-Securerwxl
    2020-08-12T05:40:20.894Z DEBUG modem << Non-secure callable region 0 placed in flash region 0 with size 32.
    2020-08-12T05:40:21.056Z DEBUG modem << SRAM regionDomainPermissions
    2020-08-12T05:40:21.061Z DEBUG modem << 00 07 0x00000 0x10000 Securerwxl
    2020-08-12T05:40:21.063Z DEBUG modem << 08 31 0x10000 0x40000 Non-Securerwxl
    2020-08-12T05:40:21.066Z DEBUG modem << PeripheralDomainStatus
    2020-08-12T05:40:21.069Z DEBUG modem << 00 NRF_P0               Non-SecureOK
    2020-08-12T05:40:21.073Z DEBUG modem << 01 NRF_CLOCK            Non-SecureOK
    2020-08-12T05:40:21.076Z DEBUG modem << 02 NRF_RTC0             Non-SecureOK
    2020-08-12T05:40:21.084Z DEBUG modem << 03 NRF_RTC1             Non-SecureOK
    2020-08-12T05:40:21.085Z DEBUG modem << 04 NRF_NVMC             Non-SecureOK
    2020-08-12T05:40:21.088Z DEBUG modem << 05 NRF_UARTE1           Non-SecureOK
    2020-08-12T05:40:21.090Z DEBUG modem << 06 NRF_UARTE2           SecureSKIP
    2020-08-12T05:40:21.100Z DEBUG modem << 07 NRF_TWIM2            Non-SecureOK
    2020-08-12T05:40:21.103Z DEBUG modem << 08 NRF_SPIM3            Non-SecureOK
    2020-08-12T05:40:21.105Z DEBUG modem << 09 NRF_TIMER0           Non-SecureOK
    2020-08-12T05:40:21.107Z DEBUG modem << 10 NRF_TIMER1           Non-SecureOK
    2020-08-12T05:40:21.109Z DEBUG modem << 11 NRF_TIMER2           Non-SecureOK
    2020-08-12T05:40:21.115Z DEBUG modem << 12 NRF_SAADC            Non-SecureOK
    2020-08-12T05:40:21.118Z DEBUG modem << 13 NRF_PWM0             Non-SecureOK
    2020-08-12T05:40:21.120Z DEBUG modem << 14 NRF_PWM1             Non-SecureOK
    2020-08-12T05:40:21.121Z DEBUG modem << 15 NRF_PWM2             Non-SecureOK
    2020-08-12T05:40:21.125Z DEBUG modem << 16 NRF_PWM3             Non-SecureOK
    2020-08-12T05:40:21.132Z DEBUG modem << 17 NRF_WDT              Non-SecureOK
    2020-08-12T05:40:21.134Z DEBUG modem << 18 NRF_IPC              Non-SecureOK
    2020-08-12T05:40:21.136Z DEBUG modem << 19 NRF_VMC              Non-SecureOK
    2020-08-12T05:40:21.138Z DEBUG modem << 20 NRF_FPU              Non-SecureOK
    2020-08-12T05:40:21.143Z DEBUG modem << 21 NRF_EGU1             Non-SecureOK
    2020-08-12T05:40:21.150Z DEBUG modem << 22 NRF_EGU2             Non-SecureOK
    2020-08-12T05:40:21.152Z DEBUG modem << 23 NRF_DPPIC            Non-SecureOK
    2020-08-12T05:40:21.154Z DEBUG modem << 24 NRF_GPIOTE1          Non-SecureOK
    2020-08-12T05:40:21.156Z DEBUG modem << 25 NRF_REGULATORS       Non-SecureOK
    2020-08-12T05:40:21.158Z DEBUG modem << SPM: NS image at 0xc000
    2020-08-12T05:40:21.165Z DEBUG modem << SPM: NS MSP at 0x20027aa8
    2020-08-12T05:40:21.168Z DEBUG modem << SPM: NS reset vector at 0xd3bd
    2020-08-12T05:40:21.170Z DEBUG modem << SPM: prepare to jump to Non-Secure image.
    2020-08-12T05:40:21.360Z DEBUG modem << *** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
    2020-08-12T05:40:21.368Z DEBUG modem << The AT host sample started
    2020-08-12T05:40:31.203Z DEBUG modem >> AT+CGMR
    2020-08-12T05:40:31.217Z DEBUG modem << mfw_nrf9160_1.2.0
    2020-08-12T05:40:31.219Z DEBUG modem << OK
    

  • Hi Yury,
    Please open the Programmer app in nRF Connect, then delete what is on the flash.

    Then flash the following version of the at_client:
    atclient_trace_enabled.hex

    Then open the trace collector and LTE Link monitor and connect to the device.

    Then start capturing and hit the "reset" button on the nRF91DK so you get the boot up message in LTE Link Monitor and then you can issue the AT commands as you want.

    Then send me the Trace collector file when you are finished with the trace.


    If the trace collector does not get any data, please issue the command AT%XMODEMTRACE=1,2 then AT+CFUN=0 then redo the capture as described here.

Related