This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MODEM_EVT_ERROR causes a boot loop when the SIM card is missing

I am testing the Asset_tracker_v2 application on thingy-91. I took the SIM card out so the device goes into the boot loop.

The on_state_init () function has the condition MODEM_EVT_ERROR which happens here. As a result, a reboot is performed.

The question is how do I know that now the SIM card is missing?

Can I check based on sim-id (iccid)? That is zero in this situation.

Best Regards

-Alpo

Parents Reply
  • Thanks Markus,

    With this information, I will be able to continue the development work.

    case LTE_LC_EVT_NW_REG_STATUS:
    		if (evt->nw_reg_status == LTE_LC_NW_REG_UICC_FAIL) {
    			LOG_ERR("No SIM card detected!");
    			SEND_ERROR(modem, MODEM_EVT_ERROR, -ENOTSUP);
    			break;
    		}
    

    Regards,

    -Alpo

Children
No Data
Related