-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process 'CEREG: 0' URCs on R410M #2119
Conversation
23e68b9
to
a279b4a
Compare
d80bd77
to
dc5b5c2
Compare
hal/src/electron/modem/mdm_hal.cpp
Outdated
@@ -1606,7 +1613,7 @@ bool MDMParser::getCellularGlobalIdentity(CellularGlobalIdentity& cgi_) { | |||
} | |||
|
|||
void MDMParser::_setBandSelectString(MDM_BandSelect &data, char* bands, int index /*= 0*/) { | |||
char band[5]; | |||
char band[6]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this band change shouldn't be in this PR?
_attached = false; | ||
HAL_NET_notify_disconnected(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: spelling on "Registration"
Should && *reg == REG_NONE
be && (*reg != REG_HOME) && (*reg != REG_ROAMING)
since that's what we define as REG_OK()
.... or simply !REG_OK(*reg)
_attached_urc = (*reg == REG_NONE) ? 0:1;
would also not need to be tested, just set to 0, and also then no need to test for if (!_attached_urc)
.
Perhaps also put the && !strcmp(s, "CEREG:")
last, as it will chew up more cycles.
We can also test && reg == &_net.eps
instead of strcmp() again?
27fa19d
to
73d305c
Compare
abe8cc8
to
7e949e1
Compare
f2fa171
to
fdd7d9c
Compare
Problem
A registration URC like
CEREG: 0
is not processed by Electron LTEs, and hence even though aCEREG: 0
is received by the device, the device still blinks cyan assuming it's connected to cloud, and does not attempt a disconnection process.Solution
Read and process reg URCs for
CxREG :0
to notify a disconnectionSteps to Test
Example App
After a successful cloud connection, remove antenna or trigger (somehow) a loss of registration, by which you will see a
CEREG: 0
on the module. When this happens, notice that the device should go back to blinking green, signaling a new connection attempt.References
ch36648
Completeness