You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with the example sketch TestGPRS, the modem will not complete more than one loop unless line 58 is changed from these values:
if (nbAccess.begin("") != NB_READY) {
....
to these values:
if (nbAccess.begin("", false, true) != NB_READY) {
....
this occurs in all versions since MKRNB v1.4.0, and appears to be related to fix #55
Mike
The text was updated successfully, but these errors were encountered:
calvino80
changed the title
nbAccess.begin fails on second loop of gprs.test example sketch
nbAccess.begin hangs on second loop of gprs.test example sketch
Jan 14, 2021
calvino80
changed the title
nbAccess.begin hangs on second loop of gprs.test example sketch
nbAccess.begin fails on second loop of gprs.test example sketch
Jan 14, 2021
calvino80
changed the title
nbAccess.begin fails on second loop of gprs.test example sketch
nbAccess.begin fails on second loop of TestGPRS example sketch
Jan 14, 2021
I think that the "hanging" is a result of the code entering a "while(true);" statement in case of failure to connect.
From TestGPRS.ino:
if (nbAccess.begin(PINNUMBER,"wireless.dish.com") != NB_READY) {
Serial.println(errortext);
while (true);
}
Serial.println(oktext);
I am currently diagnosing issues with connection to my provider, so running the example sketch with this code always results in the error condition and loop hanging. I do not know if this is also the case for @calvino80, but if so, I think the real issue is with the example sketch as coded.
My recommendation is to use the connection loop from the SendSMS example sketch (or similar). If the modem needs to be restarted in between "failure-to-connects", then simply set a boolean "restart" variable that gets passed in on subsequent connection attempts. Example below:
Serial.print("Connecting NB IoT / LTE Cat M1 network...");
bool connected = false;
bool restart = false;
while (!connected) {
if (nbAccess.begin(PINNUMBER,"",restart,true) == NB_READY) {
connected = true;
} else {
Serial.println("Error - could not connect");
restart = true;
delay(1000);
}
}
Serial.println(oktext);
PR #72 causes a modem restart on first execution of the NB begin(). I do not know if this is necessary, since (at least in my case), the first execution of begin() occurs at startup, so it may be considered redundant unless I am misunderstanding something.
arduino model: MKR NB 1500
modem model: SARA-R410M rev. 02B-00
modem firmware: 05.08
MKRNB library version: 1.5.1
with the example sketch TestGPRS, the modem will not complete more than one loop unless line 58 is changed from these values:
if (nbAccess.begin("") != NB_READY) {
....
to these values:
if (nbAccess.begin("", false, true) != NB_READY) {
....
this occurs in all versions since MKRNB v1.4.0, and appears to be related to fix #55
Mike
The text was updated successfully, but these errors were encountered: