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

nRF9160 modem states 20, 21, 30, 31, 44

The modem reports that it supports states 0, 1, 4, 20, 21, 30, 31, 44 when I give the "AT+CFUN=?" command.

Using the at_client sample, or other software like asset_tracker, and now that I know to not check "Automatic requests" in LTE Link Monitor, the only states I can read back
using "AT+CFUN?" are 0, 1, and 4, even if I issue the command "AT+CFUN=x" where x is one of 20, 21, 30, 31, or 44. How do I get to states 20, 21, 30, 31, and/or 44? Thanks.

Parents
  • Hello, 

    The modem reports that it supports states 0, 1, 4, 20, 21, 30, 31, 44 when I give the "AT+CFUN=?" command.

     Yes, this is correct and according to our AT documentation.

    the only states I can read back
    using "AT+CFUN?" are 0, 1, and 4, even if I issue the command "AT+CFUN=x" where x is one of 20, 21, 30, 31, or 44. How do I get to states 20, 21, 30, 31, and/or 44?

    AT+CFUN? will read the current functional mode, however, setting e.g. AT+CFUN=21 will also give the reply +CFUN=1. The GPS will/should not be activated.

    AT+CFUN?+CFUN: 0
    OK
    AT+CFUN=21
    OK
    AT+CFUN?
    +CFUN: 1
    OK

    I have not verified if this is how the modem should respond. Will get back to you. 

    Kind regards,

    Øyvind

  • Hello again, 

    I have verified that this is how the modem will report its status. If you have enabled LTE but not GPS, the SW should report that GPS is not available.

    Kind regards,
    Øyvind

  • Thank you, Oyvind. I have tried many combinations of enabling/disabling with 21,20,31,30,and 44 (as in AT+CFUN=21 for example.) And everything is logical except for one sticking point: if I have enabled LTE but not GPS, or vice versa if I have enabled GPS but not LTE, I cannot find a software mechanism that will indicate status that one but not both modems is ON. Please give me the software procedure, presumably AT commands, that will allow me to determine such.

Reply
  • Thank you, Oyvind. I have tried many combinations of enabling/disabling with 21,20,31,30,and 44 (as in AT+CFUN=21 for example.) And everything is logical except for one sticking point: if I have enabled LTE but not GPS, or vice versa if I have enabled GPS but not LTE, I cannot find a software mechanism that will indicate status that one but not both modems is ON. Please give me the software procedure, presumably AT commands, that will allow me to determine such.

Children
  • Yes, CFUN will return 1 (In our documentation: The active mode is either LTE or GNSS, or both. Which is set by 3GPP).

    The only way to see if GPS or LTE is enabled is by looking at the sockets found in our BSD Library. I'm not sure if we have any samples of how this is done, but you could have a look at our GPS sample.

    Kind regards,

    Øyvind

  • Okay, Oyvind, it sounds like when I am programming, I should not concern myself whether LTE or GNSS is currently on: if I am not sure about the state, and I know, for example, that I want LTE on, I should just go ahead and issue AT+CFUN=21. I am sure that will work -- I just wanted to know that I was not missing any secret status indicator. I will go ahead and close this ticket out next.

  • Hi Øyvind,

    If you send AT+CFUN=20 twice, the modem responds with an error. That means there is not only no way to check which parts of the modem are on or not, but no way enforce them either. 

    For example:

    Device has GPS on with AT+CFUN=31. Device tries to turn modem on with AT+CFUN=21, but gets an error. The Device now can't check what state the modem is in, and any attempts to call AT+CFUN=20 return an error, but the device doesn't know if that is because it is already off or because of some other reason.

    Should't calls to AT+CFUN=30 and AT+CFUN=20 return OK if they are already off?

    Kind regards,

    Thomas

Related