Skip to content

Commit 56eaf98

Browse files
committed
Use write command for querying operator instead of retry
1 parent 4f388a0 commit 56eaf98

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/lte.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,8 @@ static void connectionStatus(char *buffer) {
6161

6262
is_connected = true;
6363

64-
// Guard for the first time the LTE modem is connected and we check the
65-
// time synchronization. We don't want to fire the callback to the user
66-
// before we have made sure that the time is synchronized
67-
if (!got_ntp_sync) {
68-
return;
69-
}
70-
7164
LedCtrl.on(Led::CELL, true);
65+
7266
} else {
7367

7468
if (is_connected) {
@@ -281,7 +275,9 @@ String LteClass::getOperator(void) {
281275

282276
SequansController.clearReceiveBuffer();
283277
SequansController.retryCommand(AT_COMMAND_QUERY_OPERATOR_SET_FORMAT);
284-
SequansController.retryCommand(AT_COMMAND_QUERY_OPERATOR);
278+
279+
SequansController.clearReceiveBuffer();
280+
SequansController.writeCommand(AT_COMMAND_QUERY_OPERATOR);
285281

286282
ResponseResult response_result =
287283
SequansController.readResponse(response, sizeof(response));

0 commit comments

Comments
 (0)