<div dir="ltr"><div>ok</div><div>i write to share where i'm arrived.</div><div><br></div><div>internetConnection():</div><div> if thereAreInternetConnection (use what you want (PING, SOCKET, HTTP Request, i use PING because use less data)<br></div><div> return true.</div><div> else</div><div> return false<br></div><div><br></div><div>while:</div><div> if
internetConnection():</div><div> print(you are connect)</div><div> else:</div><div> close old connection if exist an old connection (qmicli -d /dev/cdc-wdm0 -p --wds-stop-network="YOURPDH" --client-cid="YOURCID")</div><div><br></div><div> open new connection:</div><div> qmicli -d /dev/cdc-wdm0 -p --nas-force-network-search</div><div> qmicli -d /dev/cdc-wdm0 -p --device-open-"net=net-raw-ip|net-no-qos-header" --wds-start-network="apn=<a href="http://apn.fastweb.it">apn.fastweb.it</a>,ip-type=4" --client-no-release-cid</div><div> ip link set dev wwan0 down</div><div> echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip</div><div> ip link set dev wwan0 up</div><div><br></div><div> <br></div><div> <br>
</div><div> <br></div><div><br></div><div> <br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno gio 8 ott 2020 alle ore 11:38 Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br>
<br>
> also have this problem:<br>
> qmicli -d /dev/cdc-wdm0 -p --nas-get-signal-strength<br>
> error: couldn't create client for the 'nas' service: QMI protocol error (5): 'ClientIdsExhausted'<br>
><br>
<br>
That looks like you're running qmicli commands with<br>
--client-no-release-cid and so the client ids end up exhausted. You<br>
should reuse the QMI clients properly.<br>
<br>
It really looks like you should spend some time investigating and<br>
understanding how all this works. Don't ask a question for every<br>
problem you have, try to look for the answer yourself and only if you<br>
don't find it, come back asking in the mailing list ;)<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><strong style="margin:0px;padding:0px;border:0px none;font-family:"Open Sans";font-size:14px;font-stretch:inherit;line-height:18.5px;vertical-align:baseline;color:rgb(102,102,102)">Marco Salatin<br></strong><span style="color:rgb(102,102,102);font-family:"Open Sans";font-size:14px;line-height:18.5px">T. +39 388 1947558</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="color:rgb(102,102,102);font-family:"Open Sans";font-size:14px;line-height:18.5px">skype: marco.salatin</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="color:rgb(102,102,102);font-family:"Open Sans";font-size:14px;line-height:18.5px"><a href="mailto:marco.salatin@gmail.com" target="_blank">marco.salatin@gmail.com</a></span><br style="color:rgb(102,102,102);font-family:"Open Sans";font-size:14px;line-height:18.5px"><span style="color:rgb(102,102,102);font-family:"Open Sans";font-size:14px;line-height:18.5px">Sito web: <a href="http://www.salatin.eu" target="_blank">www.salatin.eu</a></span></p><div style="font-size:12.8px"><p><font color="#333333"><span style="font-size:7.5pt;font-family:Arial,sans-serif;color:black">Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, La invito ad eliminarlo senza copiarlo e a non inoltrarlo a terzi, dandomene gentilmente comunicazione. </span><span style="font-size:7.5pt;font-family:Arial,sans-serif;color:black" lang="EN-GB">Grazie.</span><span style="color:rgb(31,73,125)" lang="EN-US"></span><span style="font-size:7.5pt;font-family:Arial,sans-serif;color:black" lang="EN-GB"><br>Pursuant to Legislative Decree No. 196/2003, you are hereby informed that this message contains confidential information intended only for the use of the addressee. If you are not the addressee, and have received this message by mistake, please delete it and immediately notify us. You may not copy or disseminate this message to anyone. </span><span style="font-size:7.5pt;font-family:Arial,sans-serif;color:black">Thank you.</span></font></p><div><font color="#333333"><span style="font-size:7.5pt;font-family:Arial,sans-serif;color:black"><br></span></font></div></div></div></div></div></div></div></div></div>