<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MODEM_EVT_ERROR causes a boot loop when the SIM card is missing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88084/modem_evt_error-causes-a-boot-loop-when-the-sim-card-is-missing</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 May 2022 12:40:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88084/modem_evt_error-causes-a-boot-loop-when-the-sim-card-is-missing" /><item><title>RE: MODEM_EVT_ERROR causes a boot loop when the SIM card is missing</title><link>https://devzone.nordicsemi.com/thread/369283?ContentTypeID=1</link><pubDate>Tue, 24 May 2022 12:40:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b43051bb-0e08-4a07-a1fc-13c8c97499c2</guid><dc:creator>Alpo Leinonen</dc:creator><description>&lt;p&gt;Thanks Markus,&lt;/p&gt;
&lt;p&gt;With this information, I will be able to continue the development work.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;case LTE_LC_EVT_NW_REG_STATUS:
		if (evt-&amp;gt;nw_reg_status == LTE_LC_NW_REG_UICC_FAIL) {
			LOG_ERR(&amp;quot;No SIM card detected!&amp;quot;);
			SEND_ERROR(modem, MODEM_EVT_ERROR, -ENOTSUP);
			break;
		}
&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Alpo&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MODEM_EVT_ERROR causes a boot loop when the SIM card is missing</title><link>https://devzone.nordicsemi.com/thread/368830?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 12:14:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae278eb1-23cf-43bd-838b-faef71e3c603</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Alpo &amp;amp; Niclas,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="AlpoLe"]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where does the application get information that the SIM card is missing?&lt;/p&gt;[/quote]
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;The modem will report an UICC failure during connect, see &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.9.1/applications/asset_tracker_v2/src/modules/modem_module.c#L187"&gt;lte_evt_handler()&lt;/a&gt; in Asset Tracker v2. Additional information can be requested using &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/access_uicc/xsim.html"&gt;%XSIM&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MODEM_EVT_ERROR causes a boot loop when the SIM card is missing</title><link>https://devzone.nordicsemi.com/thread/368772?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 09:31:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b304434-4ef9-401e-91db-7aa34a8b5d48</guid><dc:creator>nWre</dc:creator><description>&lt;p&gt;Hi, I wish to tag a long for this. Sometimes my sensors won&amp;#39;t have signal and will require separate code to be run. Is there anyway to check if the sim card is inserted or not? This would provide a nice way of telling what mode should be run. If not, is there a way to check for connectivity and then decide?&lt;br /&gt;&lt;br /&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MODEM_EVT_ERROR causes a boot loop when the SIM card is missing</title><link>https://devzone.nordicsemi.com/thread/368757?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 09:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5118a443-1e2b-41f8-b71e-f09da84506e5</guid><dc:creator>Alpo Leinonen</dc:creator><description>&lt;p&gt;Hello Markus,&lt;/p&gt;
&lt;p&gt;I want to make the application so that the lack of a SIM card does not cause a reset request. But the application remains in a fault state to flash the red LED.&lt;/p&gt;
&lt;p&gt;Where does the application get information that the SIM card is missing?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Alpo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MODEM_EVT_ERROR causes a boot loop when the SIM card is missing</title><link>https://devzone.nordicsemi.com/thread/368725?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 07:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b781202d-abe1-48ce-9fce-befeb8ef72ba</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p style="line-height:100%;margin-bottom:0;" lang="en-GB"&gt;Hello Alpo,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]The question is how do I know that now the SIM card is missing?[/quote]
&lt;p style="line-height:100%;margin-bottom:0;"&gt;I’m not sure if I understand your question and use case.&lt;br /&gt;&lt;br /&gt;&lt;span lang="en-GB"&gt;Since you removed the SIM card and as a result, Asset Tracker v2 sends a reset request, you should be aware of that your device doesn’t operate with a SIM card at that time?&lt;br /&gt;&lt;br /&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p style="line-height:100%;margin-bottom:0;"&gt;&lt;span lang="en-GB"&gt;Markus&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>