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

  • Martin, it is not good. as when that time fails -- other AT commands are not executed.

    and... you dont know what failed... more detailed error handling would be better.

  • Works for me. As Didrik sugested, I have set CONFIG_MODEM_INFO_ADD_DATE_TIME=n (so modem_info_params_get does not fail) and executed "AT+CCLK?" individually to get the modem time.

  • 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.

  • Oleh said:
    what you suggest is fine to "hide" the error... the issue is --> if one command fails all the rest is not processed, and this is the problem.

     Yes, you are correct that this is a weakness with the current implementation of the modem_info library.

    Which is part of the reason for why we are currently doing a re-write of the library.

    The new version will have individual functions for getting each piece of information, which also means that you will be able to handle any errors individually.

    Until the new version is available, CONFIG_MODEM_INFO_ADD_DATE_TIME=n is the best workaround.

Related