FW: QMICLI tools examples and documentation for begginers
aleksander at aleksander.es
Thu Sep 23 07:27:16 UTC 2021
> 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 22.214.171.124
> 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?
When you detect that the interface can't ping 126.96.36.199, you should
probably not assume the WDS session is already fully disconnected,
because it may be an intermittent ping failure or something like that.
Instead, you can explicitly run --wds-stop-network using the session
ID returned in the start operation and also with --client-cid and the
CID returned in that same operation. And after, that stop network
command, try to --wds-start-network again re-using again the same WDS
The CID exhaustion happens because on every start network operation
you're allocation a full new WDS client; you should instead fully
understand what --client-no-release-cid and --client-cid=CID do, and
More information about the libqmi-devel