FW: QMICLI tools examples and documentation for begginers
dominik.lastovcic at x-logic.net
dominik.lastovcic at x-logic.net
Thu Sep 23 06:43:54 UTC 2021
Thank you for your quick response Aleksander. This is the set of commands I use for setting up the network.
sudo qmicli -p -d /dev/cdc-wdm0 --dms-set-operating-mode='online'
sudo ip link set wwan0 down
echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip
sudo ip link set wwan0 up
sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='m2m.tele2.com',ip-type=4" --client-no-release-cid
sudo udhcpc -S -n -i wwan0 (-S = log to sysfile, -n = exit if lease not obtained)
These commands are executed every time the wwan0 interface can’t ping 8.8.8.8
The problem I faces with running these commands in a loop was CID exhaustion. Do you think I could simply avoid that problem with restarting the modem every time it is unable to ping?
I have tried:
sudo qmicli -p -d /dev/cdc-wdm0 --dms-set-operating-mode='reset'
But sometimes I get this error:
couldn't create client for the 'dms' service: CID allocation failed in the CTL client: Transaction timed out
Is there a better way to restart the modem?
If you could help me on this topic it would mean a lot.
Thank you.
Best regards,
Dominik Lastovčić / Software engineer
X-LOGIC d.o.o.
Zagreb Innovation Center
Avenija Dubrovnik 15, 10000 Zagreb, Croatia
Pavilion: 12 / 1st floor / Office: 16
<http://www.x-logic.net/> www.x-logic.net
<http://www.linkedin.com/company/x-logic-ltd/> www.linkedin.com/company/x-logic-ltd
From: Aleksander Morgado <aleksander at aleksander.es <mailto:aleksander at aleksander.es> >
Sent: Wednesday, September 22, 2021 1:31 PM
To: dominik.lastovcic at x-logic.net <mailto:dominik.lastovcic at x-logic.net>
Cc: libqmi (development) <libqmi-devel at lists.freedesktop.org <mailto:libqmi-devel at lists.freedesktop.org> >
Subject: Re: QMICLI tools examples and documentation for begginers
Hey Dominik,
I am currently working with Simcom SIM7500E module and I am using qmicli to set the network for the modem. Could you please recommend me a good guide for beginners who work with qmicli commands? I have read the qmicli man page and I have seen some examples from forums on how to use the commands, but I haven’t found that detailed enough.
I agree there is not much documentation or many examples on how to use qmicli; who has time for that? :P
A good example on how to use qmicli, e.g. with the options to allocate CIDs once and reuse them over and over, is the qmi-network program itself: <https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/blob/master/utils/qmi-network.in> https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/blob/master/utils/qmi-network.in
Other than that, I'm not sure there are other public examples that make use of qmicli.
If anyone would like to work on documenting qmicli or adding some step-by-step examples on how to use it, please do so by collaborating in the <http://modemmanager.org> modemmanager.org doc website contents: <https://modemmanager.org/docs/libqmi/> https://modemmanager.org/docs/libqmi/ Anyone can send merge requests for that website here: <https://gitlab.freedesktop.org/mobile-broadband/mobile-broadband.pages.freedesktop.org> https://gitlab.freedesktop.org/mobile-broadband/mobile-broadband.pages.freedesktop.org
--
Aleksander
https://aleksander.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20210923/515082b5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3999 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20210923/515082b5/attachment-0001.jpg>
More information about the libqmi-devel
mailing list