@@ -70,7 +70,7 @@ static void connectionStatus(char *buffer) {
7070 }
7171}
7272
73- void LteClass::begin (void ) {
73+ bool LteClass::begin (void ) {
7474
7575 // If low power is utilized, sequans controller will already been
7676 // initialized, so don't reset it by calling begin again
@@ -104,7 +104,7 @@ void LteClass::begin(void) {
104104 if (result != ResponseResult::OK) {
105105 Log.error (" Checking SIM status failed, is the SIM card inserted?" );
106106 SequansController.retryCommand (AT_COMMAND_DISCONNECT);
107- return ;
107+ return false ;
108108 }
109109
110110 char sim_status[16 ] = " " ;
@@ -114,14 +114,14 @@ void LteClass::begin(void) {
114114
115115 Log.error (" Failed to extract value from command response during SIM "
116116 " status check" );
117- return ;
117+ return false ;
118118 }
119119
120120 // strncmp returns 0 if the strings are equal
121121 if (strncmp (sim_status, " READY" , 5 )) {
122122 Log.errorf (" SIM card is not ready, error: %s\r\n " , sim_status);
123123 SequansController.retryCommand (AT_COMMAND_DISCONNECT);
124- return ;
124+ return false ;
125125 }
126126
127127 // Enable the default callback
@@ -134,6 +134,8 @@ void LteClass::begin(void) {
134134 if (isConnected () && connected_callback != NULL ) {
135135 connected_callback ();
136136 }
137+
138+ return true ;
137139}
138140
139141void LteClass::end (void ) {
0 commit comments