<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">What do you guys think we should do?</span></blockquote><div><br></div><div>My two cents is that CME's in the AT doc that are the results from SWWAN test would always equate to a disconnected modem state. That being said would there a way the at_command_finish() could result in an error that was not due to the AT response it's self, as an error like that I don't think should necessarily cause a disconnect. Given the next bit below, I can understand if others want a different direction and we can always tweak special needs of ours in our repo.</div><div><br></div><div>I agree that pulling the SIM is a bad idea, but for us, we have our modems bolted to 25 megagram heavy machines with super strong impact & g-forces. In addition to designing for this, it's good at the software layer to know if a card has wiggled it's way out in near real time and thus the machine no longer as a data connection. That may not be a fair requirement to all though x). I've been wanting to give a little more info on what we are using MM for at Trimble and as soon as they make the formal product announcement I will give you the scoop, if you want to add that to any MM in industry write ups or something then you'll have that nice little bit :)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 22, 2016 at 2:10 AM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Dec 21, 2016 at 5:14 PM, matthew stanger <<a href="mailto:stangerm2@gmail.com">stangerm2@gmail.com</a>> wrote:<br>
>> What's the output of the SWWAN status check when the SIM is gone? is<br>
>> it saying "ERROR"?<br>
><br>
><br>
> response = mm_base_modem_at_command_<wbr>finish (modem, res, &error);<br>
><br>
> if (!response) {<br>
><br>
> mm_dbg ("response:'%s' error:'%s'", response, error->message);<br>
><br>
><br>
> Taking SIM out during connection produced:<br>
><br>
> ModemManager[9779]: <debug> [1482336593.250840] [mm-port-serial-at.c:459]<br>
> debug_log(): (ttyACM1): --> 'AT^SWWAN?<CR>'<br>
> ModemManager[9779]: <debug> [1482336593.274427] [mm-port-serial-at.c:459]<br>
> debug_log(): (ttyACM1): <-- '<CR><LF>+CME ERROR: 10<CR><LF>'<br>
> ModemManager[9779]: <debug> [1482336593.274506] [mm-serial-parsers.c:364]<br>
> mm_serial_parser_v1_parse(): Got failure code 10: SIM not inserted<br>
> ModemManager[9779]: <debug> [1482336593.274541]<br>
> [cinterion/mm-broadband-<wbr>bearer-cinterion.c:108] swwan_check_status_ready():<br>
> response:'(null)' error:'SIM not inserted'<br>
> ModemManager[9779]: <warn> [1482336593.274563] [mm-base-bearer.c:165]<br>
> load_connection_status_ready()<wbr>: checking if connected failed: SIM not<br>
> inserted<br>
<br>
</span>Thanks.<br>
<br>
So now we have to decide how to handle this in the "connection status<br>
checks" we do. Right now the checks return either: connected,<br>
disconnected or error. In the case of error we do nothing, just log<br>
it, but maybe we should trigger a disconnection right away as well? Or<br>
just handle those errors in the checker method itself and return<br>
"disconnected" without error?<br>
<br>
If we decide that the generic plugin should treat some errors as fatal<br>
(i.e. report disconnected after the error) and some not (just log the<br>
error message), we'd need to decide which error is which. E.g. of<br>
non-fatal errors could be a modem that doesn't support the specific<br>
command being used to check connectivity (e.g. while other devices of<br>
the same vendor do), or also the errors we currently get when trying<br>
to check connection status on a modem with one single AT port (as<br>
there's no free port to run the AT command during connection).<br>
<br>
What do you guys think we should do?<br>
<br>
P.S.: or just don't take out the SIM while connected... :)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></div><br></div>