Closed
Description
Hi all, the 1.8.7 version of the IDE doesn't show the timestamp in each line when the following sketch is running on a MKRGSM board:
#include <MKRGSM.h>
const char PINNUMBER[] = "";
const char GPRS_APN[] = "Your_APN";
const char GPRS_LOGIN[] = "";
const char GPRS_PASSWORD[] = "";
GSMClient client;
GPRS gprsAccess;
GSM gsmAccess(true);
String response = "";
String okmsg = "ok";
String errormsg = "error";
void setup() {
delay(3000);
Serial.begin(115200);
int i;
//setted a timeout of 180 s for the GPRS and GSM operation
gprsAccess.setTimeout(30000);
gsmAccess.setTimeout(30000);
for (i = 0; i < 5; i++) {
Serial.print("Connecting GSM network...");
if ((gsmAccess.begin() != GSM_READY) &&
(gprsAccess.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD) != GPRS_READY)) {
Serial.println("error");
Serial.println(i);
} else {
Serial.println("connected");
break;
}
delay(1000);
if (gsmAccess.status() != GSM_READY) {
Serial.println("loop");
while (true);
}
}
}
void loop() {
Serial.println("Connecting GSM network...");
if (Serial) Serial.println("Attaching to GPRS with your APN...");
if ((gsmAccess.begin() != GSM_READY) &&
(gprsAccess.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD) != GPRS_READY)) {
Serial.println("error");
} else {
Serial.println("connected");
}
gsmAccess.shutdown();
Serial.println("sleeping");
delay(10000);
}
A portion of the serial monitor where the issue occur is reported following:
11:28:57.813 -> +CREG: 0,0
11:28:57.813 ->
11:28:57.813 -> OK
AT+CREG?
11:28:58.013 -> +CREG: 0,5
11:28:58.013 ->
11:28:58.013 -> OK
AT+UCALLSTAT=1
11:28:58.212 -> OK
11:28:58.212 -> connected
AT+CPWROFF
11:29:03.899 -> OK
11:29:03.899 -> sleeping
Connecting GSM network...
11:29:13.905 -> Attaching to GPRS with your APN...
⸮AT
11:29:17.992 -> OK
AT+IPR=921600
11:29:18.025 -> OK