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

nRF9160 > modem_info fails on CCLK

Dear Team,

first of all: what is the best way to ask question for nrf91 nrf-connect? as the "issues" are not enabled..

now the question or the issue: the CCLK AT Command is causing a problem in the modem_info

https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/lib/modem_info

here is the log:


innblue > mod_mqtt_connect [853] > get modem info parameters
innblue > app__get_modem_info_params [181] > enter
innblue > modem_info_params_get [134] > enter
innblue > modem_info_params_get [138] > network
innblue > modem_info_short_get [399] > cmd: (AT%XCBAND)
innblue > modem_info_string_get [443] > cmd: (AT%XCBAND=?)
innblue > modem_info_string_get [443] > cmd: (AT+CGDCONT?)
innblue > modem_info_short_get [399] > cmd: (AT+CEMODE?)
innblue > modem_info_string_get [443] > cmd: (AT+COPS?)
innblue > modem_info_string_get [443] > cmd: (AT+CEREG?)
innblue > modem_info_string_get [443] > cmd: (AT+CEREG?)
innblue > modem_info_short_get [399] > cmd: (AT%XSYSTEMMODE?)
innblue > modem_info_short_get [399] > cmd: (AT%XSYSTEMMODE?)
innblue > modem_info_short_get [399] > cmd: (AT%XSYSTEMMODE?)
innblue > modem_info_string_get [443] > cmd: (AT+CCLK?)
[00:07:13.876,831] <err> modem_info_params: Link data not obtained: 20 -5
[00:07:13.884,094] <err> modem_info_params: Network data not obtained: -5
innblue > app__get_modem_info_params [186] > Unable to obtain modem parameters: -11

when sending via UART:

AT+CCLK?
[00:05:00.067,962] <err> at_host: Error while processing AT command: -8
ERROR

Parents
  • Hi.

     

    first of all: what is the best way to ask question for nrf91 nrf-connect?

     Here on DevZone.

    If the question is mostly related to Zephyr, you can also try to ask the Zephyr community. More details here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.1.0/zephyr/guides/getting-help.html

     

    the CCLK AT Command is causing a problem in the modem_info

     I am not able to reproduce this on my end. Do you have a minimal sample that shwos this behaviour?

    Also, was the device connected to the network when you tried to read the time?

    CCLK get the time from the network (if available), so you must be connected to a network that provides the time for CCLK to work.

    Best regards,

    Didrik

  • Hi and thank you!

    sorry, it was not visible on the log: but yes the lte was connected.



    innblue > mod_mqtt_connect [862] > get modem info parameters
    innblue > app__get_modem_info_params [181] > enter
    innblue > modem_info_params_get [134] > enter
    innblue > modem_info_params_get [138] > network
    innblue > modem_info_short_get [399] > cmd: (AT%XCBAND)
    innblue > modem_info_string_get [443] > cmd: (AT%XCBAND=?)
    innblue > modem_info_string_get [443] > cmd: (AT+CGDCONT?)
    innblue > modem_info_short_get [399] > cmd: (AT+CEMODE?)
    innblue > modem_info_string_get [443] > cmd: (AT+COPS?)
    innblue > modem_info_string_get [443] > cmd: (AT+CEREG?)
    innblue > modem_info_string_get [443] > cmd: (AT+CEREG?)
    innblue > modem_info_short_get [399] > cmd: (AT%XSYSTEMMODE?)
    innblue > modem_info_short_get [399] > cmd: (AT%XSYSTEMMODE?)
    innblue > modem_info_short_get [399] > cmd: (AT%XSYSTEMMODE?)
    innblue > modem_info_string_get [443] > cmd: (AT+CCLK?)
    [01:28:39.270,202] <err> modem_info_params: Link data not obtained: 20 -5
    [01:28:39.276,855] <err> modem_info_params: Network data not obtained: -5
    innblue > modem_info_params_get [163] > SIM
    innblue > modem_info_short_get [399] > cmd: (AT%XSIM?)
    innblue > modem_info_string_get [443] > cmd: (AT+CRSM=176,12258,0,0,10)
    innblue > modem_info_string_get [443] > cmd: (AT+CIMI)
    innblue > modem_info_params_get [177] > Device
    innblue > modem_info_string_get [443] > cmd: (AT+CGMR)
    innblue > modem_info_short_get [399] > cmd: (AT%XVBAT)
    innblue > modem_info_string_get [443] > cmd: (AT+CGSN)
    innblue > app__get_modem_info_params [194] >
         board: nrf9160_innblue21     app_version: v1.1.0-rc1-178-g6ce82a128156     app_name: PROJECT_NAME
         modem fw: mfw_nrf9160_1.1.0     modem battery: 3363
         current band: 20     operator: 26202     mcc: 262     mnc: 2    
         sim uicc:      sim iccid: 80000000000000000080
         current time:
    connect to mqtt broker


    as you can see all the commands are ok but the cclk is not working (I have also reported this in the previous release of the modem fw -- it was not working), with this as well. I hope that it is on my side :) and this would be easy to fix.

    Side question: could we get some more logging into modem_info? Debug level with all at-host and parser info? :-) not a big deal, but nice to debug...

    I would also add some bypass for debugging -- it is fine that is stops on the first error -- but in debug I would like to see all at-commands .

    And one more thing: the "sim uicc" is not visible, what should be added to get it?

    thank you!

  • Hi, and sorry for the late reply, but due to the fast-approaching Christmas time is a bit short at the moment.

     

    Oleh said:
    could we get some more logging into modem_info? Debug level with all at-host and parser info?

     Here is the logging I have turned on when debugging the modem_info library, with a custom application I have:

    CONFIG_LOG=y
    CONFIG_AT_CMD_LOG_LEVEL_DBG=y
    CONFIG_LOG_DEFAULT_LEVEL=4
    CONFIG_LOG_BACKEND_SHOW_COLOR=n
    CONFIG_LOG_IMMEDIATE=y

    Could you try to add the log from the at_cmd library as well (CONFIG_AT_CMD_LOG_LEVEL_DBG=y)?

     

    Oleh said:
    the "sim uicc" is not visible,

     How do you try to read the UICC, and how do you print it?

    Best regards,

    Didrik

  • Hi Didrik,

    could you confirm the cclk returns a time?

    on sim uicc my take was quite simple:

    printk("\t sim uicc: %s", local_modem_param_info.sim.uicc.value_string );
    printk("\t sim iccid: %s\n", local_modem_param_info.sim.iccid.value_string );

  • Yes, cclk returns a time for me(on Telenor's LTE-M network in Norway with an iBasis SIM card).

    I have attached a simple test program that reads both the time and UICC state, along with a log gotten by running said program.

    Note that the UICC state is returned as a number, not a string.

    ***** Booting Zephyr OS build v2.0.99-ncs1-rc1-783-g2c43bc81ea7b *****
    Flash region		Domain		Permissions
    00 0x00000 0x08000 	Secure		rwxl
    01 0x08000 0x10000 	Non-Secure	rwxl
    02 0x10000 0x18000 	Non-Secure	rwxl
    03 0x18000 0x20000 	Non-Secure	rwxl
    04 0x20000 0x28000 	Non-Secure	rwxl
    05 0x28000 0x30000 	Non-Secure	rwxl
    06 0x30000 0x38000 	Non-Secure	rwxl
    07 0x38000 0x40000 	Non-Secure	rwxl
    08 0x40000 0x48000 	Non-Secure	rwxl
    09 0x48000 0x50000 	Non-Secure	rwxl
    10 0x50000 0x58000 	Non-Secure	rwxl
    11 0x58000 0x60000 	Non-Secure	rwxl
    12 0x60000 0x68000 	Non-Secure	rwxl
    13 0x68000 0x70000 	Non-Secure	rwxl
    14 0x70000 0x78000 	Non-Secure	rwxl
    15 0x78000 0x80000 	Non-Secure	rwxl
    16 0x80000 0x88000 	Non-Secure	rwxl
    17 0x88000 0x90000 	Non-Secure	rwxl
    18 0x90000 0x98000 	Non-Secure	rwxl
    19 0x98000 0xa0000 	Non-Secure	rwxl
    20 0xa0000 0xa8000 	Non-Secure	rwxl
    21 0xa8000 0xb0000 	Non-Secure	rwxl
    22 0xb0000 0xb8000 	Non-Secure	rwxl
    23 0xb8000 0xc0000 	Non-Secure	rwxl
    24 0xc0000 0xc8000 	Non-Secure	rwxl
    25 0xc8000 0xd0000 	Non-Secure	rwxl
    26 0xd0000 0xd8000 	Non-Secure	rwxl
    27 0xd8000 0xe0000 	Non-Secure	rwxl
    28 0xe0000 0xe8000 	Non-Secure	rwxl
    29 0xe8000 0xf0000 	Non-Secure	rwxl
    30 0xf0000 0xf8000 	Non-Secure	rwxl
    31 0xf8000 0x100000 	Non-Secure	rwxl
    Non-secure callable region 0 placed in flash region 0 with size 32.
    
    
    SRAM region		Domain		Permissions
    00 0x00000 0x02000	Secure		rwxl
    01 0x02000 0x04000	Secure		rwxl
    02 0x04000 0x06000	Secure		rwxl
    03 0x06000 0x08000	Secure		rwxl
    04 0x08000 0x0a000	Secure		rwxl
    05 0x0a000 0x0c000	Secure		rwxl
    06 0x0c000 0x0e000	Secure		rwxl
    07 0x0e000 0x10000	Secure		rwxl
    08 0x10000 0x12000	Non-Secure	rwxl
    09 0x12000 0x14000	Non-Secure	rwxl
    10 0x14000 0x16000	Non-Secure	rwxl
    11 0x16000 0x18000	Non-Secure	rwxl
    12 0x18000 0x1a000	Non-Secure	rwxl
    13 0x1a000 0x1c000	Non-Secure	rwxl
    14 0x1c000 0x1e000	Non-Secure	rwxl
    15 0x1e000 0x20000	Non-Secure	rwxl
    16 0x20000 0x22000	Non-Secure	rwxl
    17 0x22000 0x24000	Non-Secure	rwxl
    18 0x24000 0x26000	Non-Secure	rwxl
    19 0x26000 0x28000	Non-Secure	rwxl
    20 0x28000 0x2a000	Non-Secure	rwxl
    21 0x2a000 0x2c000	Non-Secure	rwxl
    22 0x2c000 0x2e000	Non-Secure	rwxl
    23 0x2e000 0x30000	Non-Secure	rwxl
    24 0x30000 0x32000	Non-Secure	rwxl
    25 0x32000 0x34000	Non-Secure	rwxl
    26 0x34000 0x36000	Non-Secure	rwxl
    27 0x36000 0x38000	Non-Secure	rwxl
    28 0x38000 0x3a000	Non-Secure	rwxl
    29 0x3a000 0x3c000	Non-Secure	rwxl
    30 0x3c000 0x3e000	Non-Secure	rwxl
    31 0x3e000 0x40000	Non-Secure	rwxl
    
    Peripheral		Domain		Status
    00 NRF_P0               Non-Secure	OK
    01 NRF_CLOCK            Non-Secure	OK
    02 NRF_RTC1             Non-Secure	OK
    03 NRF_NVMC             Non-Secure	OK
    04 NRF_UARTE1           Non-Secure	OK
    05 NRF_UARTE2           Secure		SKIP
    06 NRF_TWIM2            Non-Secure	OK
    07 NRF_SPIM3            Non-Secure	OK
    08 NRF_TIMER0           Non-Secure	OK
    09 NRF_TIMER1           Non-Secure	OK
    10 NRF_TIMER2           Non-Secure	OK
    11 NRF_SAADC            Non-Secure	OK
    12 NRF_PWM0             Non-Secure	OK
    13 NRF_PWM1             Non-Secure	OK
    14 NRF_PWM2             Non-Secure	OK
    15 NRF_PWM3             Non-Secure	OK
    16 NRF_WDT              Secure		SKIP
    17 NRF_IPC              Non-Secure	OK
    18 NRF_VMC              Non-Secure	OK
    19 NRF_FPU              Non-Secure	OK
    20 NRF_EGU1             Non-Secure	OK
    21 NRF_EGU2             Non-Secure	OK
    22 NRF_DPPIC            Non-Secure	OK
    23 NRF_GPIOTE1          Non-Secure	OK
    24 NRF_REGULATORS       Secure		SKIP
    
    SPM: NS image at 0xc000
    SPM: NS MSP at 0x200293f0
    SPM: NS reset vector at 0xe361
    SPM: prepare to jump to Non-Secure image.
    ***** Booting Zephyr OS build v2.0.99-ncs1-rc1-783-g2c43bc81ea7b *****
    [00:00:00.380,401] <dbg> at_cmd.at_cmd_set_notification_handler: Setting notification handler to 0x0000fa35
    [00:00:00.396,301] <dbg> at_cmd.at_cmd_driver_init: Common AT socket created
    [00:00:00.403,076] <dbg> at_cmd.at_cmd_driver_init: Common AT socket processing thread created
    [00:00:00.411,499] <dbg> at_cmd.at_write: Sending command AT+CCLK?
    [00:00:00.417,449] <dbg> at_cmd.socket_thread_fn: AT socket thread started
    [00:00:00.424,194] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: ERROR
    
    [00:00:00.430,297] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:00.435,302] <err> app: modem info returned for DATE_TIME -5 I/O error
    [00:00:00.442,138] <dbg> at_cmd.at_write: Sending command AT%XSIM?
    [00:00:00.454,620] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: %XSIM: 0
    OK
    
    [00:00:00.461,334] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:00.466,400] <err> app: modem info returned for UICC -134 Not supported
    [00:00:00.473,266] <inf> app: connecting to network
    [00:00:00.477,905] <dbg> at_cmd.at_write: Sending command AT%XSYSTEMMODE=1,0,0,0
    [00:00:00.492,980] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: OK
    
    [00:00:00.498,840] <dbg> at_cmd.at_write: Bytes sent: 22
    [00:00:00.503,906] <dbg> at_cmd.at_write: Sending command AT+CEREG=5
    [00:00:00.516,510] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: OK
    
    [00:00:00.522,369] <dbg> at_cmd.at_write: Bytes sent: 10
    [00:00:00.527,496] <dbg> at_cmd.at_write: Sending command AT%XSYSTEMMODE=1,0,0,0
    [00:00:00.542,572] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: OK
    
    [00:00:00.548,431] <dbg> at_cmd.at_write: Bytes sent: 22
    [00:00:00.553,497] <dbg> at_cmd.at_write: Sending command AT+CFUN=1
    [00:00:00.596,038] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: OK
    
    [00:00:00.601,898] <dbg> at_cmd.at_write: Bytes sent: 9
    [00:00:15.160,095] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: +CEREG: 2,"75F9","01441602",7,0,0,"11100000","11100000"
    
    +CEREG: 2,"75F9","01441602",7,0,0,"11100000","11100000"
    [00:00:17.180,725] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: +CEREG: 5,"75F9","01441602",7,,,"11100000","11100000"
    
    +CEREG: 5,"75F9","01441602",7,,,"11100000","11100000"
    [00:00:22.196,136] <inf> app: Connected to network
    [00:00:22.200,683] <dbg> at_cmd.at_write: Sending command AT+CCLK?
    [00:00:22.207,275] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: +CCLK: "19/12/19,13:26:14+04"
    OK
    
    [00:00:22.215,820] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:22.220,886] <inf> app: DATE_TIME 19/12/19,13:26:14+04
    [00:00:22.226,318] <dbg> at_cmd.at_write: Sending command AT%XSIM?
    [00:00:22.232,635] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: %XSIM: 1
    OK
    
    [00:00:22.239,379] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:22.244,445] <err> app: modem info returned for UICC -134 Not supported
    [00:00:22.251,342] <dbg> at_cmd.at_write: Sending command AT%XSIM?
    [00:00:22.257,629] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: %XSIM: 1
    OK
    
    [00:00:22.264,373] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:22.269,409] <inf> app: UICC 1
    
    cclk_test.zip

  • HI Didrik,

    as I got the notification, so tried to re-read the thread...

    your log shows the same error "we" have --> 

    [00:00:00.403,076] <dbg> at_cmd.at_cmd_driver_init: Common AT socket processing thread created
    [00:00:00.411,499] <dbg> at_cmd.at_write: Sending command AT+CCLK?
    [00:00:00.417,449] <dbg> at_cmd.socket_thread_fn: AT socket thread started
    [00:00:00.424,194] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: ERROR

    [00:00:00.430,297] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:00.435,302] <err> app: modem info returned for DATE_TIME -5 I/O error

    ;-)

Reply
  • HI Didrik,

    as I got the notification, so tried to re-read the thread...

    your log shows the same error "we" have --> 

    [00:00:00.403,076] <dbg> at_cmd.at_cmd_driver_init: Common AT socket processing thread created
    [00:00:00.411,499] <dbg> at_cmd.at_write: Sending command AT+CCLK?
    [00:00:00.417,449] <dbg> at_cmd.socket_thread_fn: AT socket thread started
    [00:00:00.424,194] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: ERROR

    [00:00:00.430,297] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:00.435,302] <err> app: modem info returned for DATE_TIME -5 I/O error

    ;-)

Children
  • Oleh said:
    your log shows the same error "we" have

     Yes, before I am connected to the network:

    [00:00:00.411,499] <dbg> at_cmd.at_write: Sending command AT+CCLK?

    [00:00:00.424,194] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: ERROR

    [00:00:00.435,302] <err> app: modem info returned for DATE_TIME -5 I/O error

    ...

    [00:00:00.553,497] <dbg> at_cmd.at_write: Sending command AT+CFUN=1

    [00:00:17.180,725] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: +CEREG: 5,"75F9","01441602",7,,,"11100000","11100000"

    [00:00:22.200,683] <dbg> at_cmd.at_write: Sending command AT+CCLK?
    [00:00:22.207,275] <dbg> at_cmd.socket_thread_fn: at_cmd_rx: +CCLK: "19/12/19,13:26:14+04"
    OK

    [00:00:22.215,820] <dbg> at_cmd.at_write: Bytes sent: 8
    [00:00:22.220,886] <inf> app: DATE_TIME 19/12/19,13:26:14+04

    As you can see, the command returns the time when I am connected to the network.

Related