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
  • Did this issue get resolved eventually? I have a similar issue with modem firmware 1.2.3.

    When send AT command "AT+CCLK?", at_cmd_write() returns -8 (-ENOEXEC) and at_cmd_state is 1 (AT_CMD_ERROR).

    at_cmd_write("AT+CCLK?", buf, sizeof(buf), &at_state)

    I am connected (lte_lc_init() and lte_lc_connect(), LTE_LC_EVT_NW_REG_STATUS: 5) to a German LTE-M network.

  • Hi ,

    I believe there are two problems here:

    1. The network doesn't provide the time. This is why the AT command fails, and there is nothing we can do about it.

    2. modem_info_params_get() returns an error if any of the AT commands it uses fails.

    This second issue can be worked around by setting CONFIG_MODEM_INFO_ADD_DATE_TIME=n. The modem info library will then not try to get the time from the modem, which means that the AT command will not fail (because it is never sent), and modem_info_params_get() will not return an error. But if the Kconfig option is set, then yes, you can still run into the second problem.

    However, the modem_info library is currently undergoing a mayor re-write where we are going away from one big function to gather all the data to many small. The solution then will simply be to not request the time, or handle that failure individually.

    Best regards,

    Didrik

  • Hi Didrik,

    thank you for the update. My impression from other forum posts was that the modem will report a 2015 time when no network time is found. From your response I get that that behavior has changed and now the modem reports an error instead of a misleading time. This is actually good and we can handle this.

    Best Regards

    Martin

  • Hi Didrik,

    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. Not time in itself, but the atomic execution.

    I feel, it should be then slit in several calls:

    - get part one

    - get part two (which can fail)

    so we know how to react...

    what do you think?

Reply Children
  • 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