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

AT+CFUN=0 is not confirned with "OK"

The nRF9160 v1.2.0 does not respond "OK" after AT+CFUN=0 !!!

2020-05-07T12:21:07.489Z DEBUG modem >> at+cfun=0\x0D\x0A
2020-05-07T12:21:08.489Z ERROR Error: 'at+cfun=0

Parents
  • Hi.

    Could you provide a bit more context around what is happening?

    Are you sending the command from a computer, or from the application?

    Where does the error line in your log come from? The Link Monitor? Your application?

    If the error message comes from your application, under what conditions is it printed, i.e. which test fails?

    When I test this myself with the at_client sample, sending the command from the Link Monitor, I do get an "OK" reply from the modem. However, the modem will not send the reply before you are disconnected from the network, which might not happen immediately. Therefore, if you have a short timeout before you report an error, you might not wait long enough.

    Finally, in order to really be able to tell what is happening on the modem side, I will need a modem trace.

    Best regards,

    Didrik

  • Hi Didrik,
    the error message is shown in the LTE Link Monitor (v1.1.1) and comes from either the nRF9160 firmware (v1.2.0) or from the application "Serial LTE Modem" (SLM) v1.2, which is under development by your Nordic colleagues:
    2020-05-07T13:25:48.431Z DEBUG modem >> AT+CGMR\x0D\x0A
    2020-05-07T13:25:48.539Z DEBUG modem << mfw_nrf9160_1.2.0\x0D\x0A
    2020-05-07T13:26:37.054Z DEBUG modem >> AT#XSLMVER\x0D\x0A
    2020-05-07T13:26:37.059Z DEBUG modem << #XSLMVER: 1.2\x0D\x0A

    Best regards
    Thomas

Reply
  • Hi Didrik,
    the error message is shown in the LTE Link Monitor (v1.1.1) and comes from either the nRF9160 firmware (v1.2.0) or from the application "Serial LTE Modem" (SLM) v1.2, which is under development by your Nordic colleagues:
    2020-05-07T13:25:48.431Z DEBUG modem >> AT+CGMR\x0D\x0A
    2020-05-07T13:25:48.539Z DEBUG modem << mfw_nrf9160_1.2.0\x0D\x0A
    2020-05-07T13:26:37.054Z DEBUG modem >> AT#XSLMVER\x0D\x0A
    2020-05-07T13:26:37.059Z DEBUG modem << #XSLMVER: 1.2\x0D\x0A

    Best regards
    Thomas

Children
  • Ok, I have now been able to reproduce the bug on the NCS master branch and informed our developers.

    I also took a modem trace of the test, and it shows that the modem behaves as it should. The problem is that the serial_lte_modem sample does not forward all the output from the modem to the terminal.

    I will keep you informed about our progress in finding the source and fixing this bug.

  • Hi.

    We are in the process of upgrading the at_cmd library to also support asynchronous command handling, and a PR was just added.

    After having tried the serial_lte_modem sample with the PR, I am no longer able to reproduce the bug.

    Could you try the PR as well, to see if it solves the problem for you as well?

    You can use the following commands to try the PR:

    cd <your NCS folder>/nrf
    git fetch origin pull/2264/head:pr-2264
    git checkout pr-2264
    west update

    Note that you must be using West v0.7.0 or newer to be able to work with the master branch.

    Best regards,

    Didrik

Related