Modem 30 minute lockup

This is driving me totally nuts. There are inconsistent pieces of information in documents and code. I am getting a modem reset loop problem. The documentation says the timer does not run when the modem has no power. That tells me I have to leave power on in order to get out of this ridiculous mess that cuts me off from any and all LTE-M and NB-IoT networks. The message from some asset tracker code tells me I can get out by doing a power reset, but that does not work.

How in blazes do I get out of this fricking mess????? This is at least one day down the drain.

How about 5 minutes rather than 30 minutes. How about something that simply restores the modem?

Did I put a bug into the code? I can't imagine how, although I do put in printfs.

Thanks.

Burt S.

Parents
  • I eventually was able to get out of the mess. It began when I tried adding this to asset_tracker_v2 prj.conf

    CONFIG_LWM2M_CARRIER_PDN_IPV4=y
    CONFIG_LWM2M_CARRIER=y
    CONFIG_LWM2M_CARRIER_SETTINGS=y
    CONFIG_LWM2M_CARRIER_CUSTOM_APN="iot.nb"

    in an attempt to do the equivalent of

    AT+CGDCONT=1,"IP","iot.nb"

    as indicated by the clowns at https://www.twilio.com/docs/iot/wireless/network-configuration#how-do-i-set-the-apn-with-at-commands. Not only did I lock up the modem but I wasn't configuring any "iot-nb" because I don't know how to set auto_startup to 1 in lwm2m_settings.c. It involves a modem key but I have no idea how to create a simple modem key appropriate for the purpose. It seems like this is another complicated topic involving security knowledge. Please help.

    I also tried setting

    CONFIG_PDN_DEFAULTS_OVERRIDE=y
    CONFIG_PDN_DEFAULT_APN="iot.nb"
    CONFIG_PDN_DEFAULT_FAM_IPV4=y
    CONFIG_PDN_LOG_LEVEL_DBG=y
    CONFIG_NVS=y
    CONFIG_MODEM_KEY_MGMT=y
    CONFIG_SMS=y

    and although that did not break anything, it did not solve the problem whereby Twilio SIMs will not connect to T-Mobile. Can you tell me why they cannot just keep things simple like Soracom and the rest of the world?

    I guess you have people who know all the tricks and I hope you can help me get back on my feet again. Thanks. Oh, yeah,

    Burt

  • I guess I misread that Twilio web page. I thought they were telling me that I needed to configure the APN somewhere in order to connect/register to the network; like I had to copy the APN that the SIM uses to somewhere else in order to establish an NB-IoT connection. Anyway, I have a ticket open with KORE Wireless/Twilio and they opened a secondary ticket with T-Mobile. I don't think those KORE Wireless folks have any clue about the company Twilio that they purchased; not on a technology level, at least.

  • Another thing I find a bit strange: in the pdn library, they enable CNEC_ESM events to appear in the log but not CNEC_EMM events. Here is what I get if I enable simple printing of EMM events:

    +CEREG: 2,"F460","00F536C9",9
    [00:00:05.461,456] <dbg> modem_module: lte_evt_handler: LTE cell changed: Cell ID: 16070345, Tracking area: 62560
    [00:00:05.461,608] <inf> app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
    +CSCON: 1
    [00:00:05.527,862] <dbg> modem_module: lte_evt_handler: RRC mode: Connected
    +CNEC_EMM: 6

    +CNEC_EMM: 6
    +CEREG: 0
    [00:00:06.663,574] <dbg> modem_module: lte_evt_handler: LTE cell changed: Cell ID: -1, Tracking area: -1

    You see, even if I gray out the debug level messages, I mean, if you imagine they are not present, I would have seen really quickly that an EMM 6 happened. A quick perusal of the AT Commands Reference and following their suggestion to look it up in 3GPP 24.301 would show me quickly that using this SIM, the network is rejecting my IMEI (turns out KORE Wireless support informed me that Twilio only accepts the TAC for old B0 devices; I am using B1).

    Burt

  • Hi Burt, I apologize for not being fully switched on, you are right in regards to the EMM events. I was too focused on the modem reset issue that I overlooked these messages in the modem trace. 

    I'm not familiar with the Twilio SIM, I think you will need to reach out to your local sales rep for more information on this. The SIM must support LTE-M and NB-IoT, but from what I understand only US based NB-IoT is supported.

  • Thanks, Oyvind. Yeah, I guess it's unfortunate that I opened the ticket with the "30-minute lockup" title. This was only one issue that arose while trying to work with Twilio SIM cards.

    I think I had a few extra questions for you. The one that sticks out in my mind: will AT%XFACTORYRESET=0 wipe out my certificates? In case I want to use it for clearing a reset loop, I want to know how much pain to expect.

    Oh, more questions, I saw the NS white paper about the reset loop restriction. I found that they did not define clearly what is meant by modem initialization and modem reset. I usually think of modem initialization in terms of the software (lte_lc.c). Reset refers to power reset, soft reset, WDT reset, and that class of events? Or is there something that can reset the modem that happens independently of a full nRF9160 reset and I won't see in the log? [Maybe dumb questions but because I cannot see when the counter is climbing up to 7 I don't know what got me there.]

    Thanks, Oyvind.

    Burt

  • Oyvind,

    I want to correct my statement that AT%XFACTORYRESET=1 was the "trick" to have the Soracom SIM + nRF9160 combination register quickly with the network. What sped up the registration to under 10 seconds was the AT+CFUN=0 that I preceded the XFACTORYRESET with.

    Having said that, please help me understand why issuing AT+CFUN=0 prior to power resetting my nRF9160 is correcting "something." And note that I only have to issue the +CFUN=0 once; then I can do multiple power resets with quick registrations (although I did not have the system powered on for more than a few minutes at a time in this testing).

    Burt

  • From the nrf9160_at_commands_v2.4.pdf, page 72.

    "The proprietary %XFACTORYRESET command resets the modem to factory settings. This operation is
    allowed only when the modem is not activated."

    Therefore you need AT+CFUN=0

Reply Children
No Data
Related