<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thankyou, and sorry for the late answer.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I don't think this should be a workaround, can you make new command for that ? Or maybe that the QMI protocol doesnt allow that ?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Maybe you could make a command to return the last used handler and one for the last used cid ? because (I think) 70% of the users will only need to connect and disconnect one connection.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So in short, you sayd:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<font size="2"><span style="font-size:11pt">- 0xFFFFFFFF</span></font> , will close one connection (in hexadecimal?).</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
- <font size="2"><span style="font-size:11pt">qmicli -d /dev/cdc-wdm0 -p --dms-set-operating-mode=low-power , will close all connections</span></font></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt">- qmicli -d /dev/cdc-wdm0 -p --device-open-sync --dms-noop , will close all the clients</span></font></span></font></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt"><br>
</span></font></span></font></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt">I tryed the second and the third, it works but I can't reconnect then. Afterall I didn't
<font size="2"><span style="font-size:11pt">--empty-timeout=5 cause it says invalid command...</span></font> So i think i havent restarted the proxy i think...</span></font></span></font></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt">Thanks.<br>
</span></font></span></font></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt"><br>
</span></font></span></font></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt">--- Original messagge ---<br>
</span></font></span></font></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt"></span></font></span></font></div>
Hey,<br>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText"><br>
> In qmicli, wds,<br>
> is there a way to disconnect from any connection and close any client ?<br>
> Just to avoid the painfull command:<br>
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wds-stop-network=MYHANDLE --client-cid=MYCID<br>
><br>
<br>
I was trying to think of different ways to do this (e.g. trying with<br>
0xFFFFFFFF handle if you lost MYHANDLE), but if you just want to close<br>
all connections that may have been opened, I guess you can just set<br>
the modem in low-power mode as that will perform the disconnection of<br>
all contexts, plus IMSI detach procedure from the network; e.g.:<br>
$ qmicli -d /dev/cdc-wdm0 -p --dms-set-operating-mode=low-power<br>
<br>
I understand this may not be what you're really looking for, though,<br>
because you also talk about closing any client.<br>
<br>
In libqmi there is no explicit way to close all clients, because<br>
libqmi itself doesn't track which clients are open: once a client is<br>
open, the ownership of the object associated to the client is<br>
transferred to the user of the application. In qmicli this translates<br>
into needing to keep track of the CID in all qmicli calls until the<br>
last qmicli call to the service is done without using<br>
"--client-no-release-cid". But, hey, if you are able to keep track of<br>
the CIDs of all the QMI clients you have allocated, including the one<br>
for the WDS service, closing the WDS Client CID will also explicitly<br>
disconnect the connection that was started with that client. So, I'd<br>
suggest you try that; keeping track of the CIDs you've opened should<br>
be something you're already doing anyway.<br>
<br>
qmicli also supports yet another way of attempting this, which may<br>
also fit your needs better, which is with the "--device-open-sync"<br>
option. If you run e.g. qmicli -d /dev/cdc-wdm0 -p --device-open-sync<br>
--dms-noop, a message is sent to the modem to "reset" all allocated<br>
clients. But this is overkill, because I'm not sure the qmi-proxy will<br>
cleanly handle that operation yet. If you kill the proxy right after<br>
doing that, you may "start clean" again.<br>
<br>
> And after that, how can I close all the qmicli related processes ?<br>
<br>
Once all the client CIDs have been released, the qmi-proxy should<br>
detect it and kill itself after some time without being used (300s).<br>
There are 2 ways to modify this behavior: with --no-exit (to disable<br>
the timeout) or with --empty-timeout=[SECS] to modify the default<br>
timeout. The qmi-proxy is the only "qmicli related process" that may<br>
be around.<br>
<br>
-- <br>
Aleksander<br>
</div>
</span></font></div>
</div>
</body>
</html>