Details/sequence/order of allocate_client calls? Allocate client for WDA fails...
Martin Maurer
martin.maurer at mmeacs.de
Fri Sep 29 07:46:24 UTC 2023
Hello,
I have a question about allocating clients. I use this (based on python
example in repo):
def open_ready(qmidev,result,user_data=None):
print("open_ready")
try:
qmidev.open_finish(result)
except GLib.GError as error:
sys.stderr.write("Couldn't open QMI device: %s\n" % error.message)
main_loop.quit()
return
qmidev.allocate_client(Qmi.Service.DMS, Qmi.CID_NONE, 10, None,
allocate_client_DMS_ready, None)
qmidev.allocate_client(Qmi.Service.WDA, Qmi.CID_NONE, 10, None,
allocate_client_WDA_ready, None)
qmidev.allocate_client(Qmi.Service.WDS, Qmi.CID_NONE, 10, None,
allocate_client_WDS_ready, None)
This gives me:
open_ready
allocate_client_DMS_ready
allocate_client_DMS_ready: successful
CID 4
allocate_client_WDA_ready
Couldn't allocate QMI client WDA: QMI protocol error (3): 'Internal'
device_close
device_close_ready
Query done
allocate_client_WDS_ready
Couldn't allocate QMI client WDS: CID allocation failed in the CTL
client: Transaction timed out
I am using:
$ qmicli --version
qmicli 1.33.8
Copyright (C) 2012-2023 Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$
Why it fails to allocate a simple WDA client? Does it need more, so that
I can allocate it successfully? Or order important?
And even when it fails, why does WDS fail afterwards?
When I comment out "WDA" it behaves correctly:
open_ready
allocate_client_DMS_ready
allocate_client_DMS_ready: successful
CID 5
allocate_client_WDS_ready
allocate_client_WDS_ready: successful
CID 21
Or do I need to wait for an answer from this
qmidev.allocate_client(Qmi.Service.DMS, Qmi.CID_NONE, 10, None,
allocate_client_DMS_ready, None)
before calling
qmidev.allocate_client(Qmi.Service.WDA, Qmi.CID_NONE, 10, None,
allocate_client_WDA_ready, None) ?
PS: How can I query used libqmi version in Python?
PS2: And how I can I enable debug (like -v) in Python? Some Python call?
Or must I use some environment variable?
Many thanks!
Best regards,
Martin
More information about the libqmi-devel
mailing list