File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ bool LteClass::begin(const bool print_messages) {
115115 char response_buffer[48 ] = " " ;
116116 char value_buffer[32 ] = " " ;
117117
118+ // Wait for CEREG URC before checking SIM
119+ SequansController.waitForURC (CEREG_CALLBACK);
120+
118121 // We check that the SIM card is inserted and ready. Note that we can only
119122 // do this and get a meaningful response in CFUN=1 or CFUN=4.
120123 if (SequansController.writeCommand (AT_CHECK_SIM,
@@ -139,7 +142,7 @@ bool LteClass::begin(const bool print_messages) {
139142 }
140143
141144 if (strncmp (value_buffer, " READY" , 5 ) != 0 ) {
142- Log.error (" SIM card is not ready" );
145+ Log.errorf (" SIM card is not ready, status: %s " , value_buffer );
143146 Lte.end ();
144147
145148 return false ;
You can’t perform that action at this time.
0 commit comments