How to autoconnect?
Aleksander Morgado
aleksander at aleksander.es
Mon Feb 21 08:53:31 UTC 2022
Hey,
>
> I've got a data connection working with --wds-start-network and that's
> fine. But are there any examples to show how to use QMICLI to
> autoconnect, including reconnecting if the signal is lost? I'm not
> sure if this is just the WDS autoconnect commands or requires a
> profile, etc.
>
The autoconnect settings instruct the modem to keep the connection up,
you basically start the connection with autoconnect enabled, and the
modem will try to keep it. In this case you may need to keep track of
the IP settings agreed with the network, and reapply them if they
change. The modem may also get disconnected if the connection cannot
be kept up by the modem (e.g. out of coverage).
If autoconnect is disabled, any time there is a network initiated
disconnection, or a disconnection due to being out of coverage, the
modem will be disconnected. You would need to monitor the status of
the connection, and manually launch a new connection attempt if the
connection is disconnected.
There is no support to manage all that with qmicli, qmicli is just a
"one command per supported QMI message" tool, but you can definitely
build something up based on that tool.
qmi-network is able to start the connection, but it also doesn't do
any monitoring on top; I don't really recommend qmi-network for
anything, though, it has a lot of missing pieces.
If you want a full setup that takes care of automatically reconnecting
and automatically setting up IP addresses and all that,
libqmi+ModemManager+NetworkManager could do that for you (or
libqmi+ModemManager+netifd in openwrt, although there are still some
missing pieces there w.r.t. properly autoreconnect.
--
Aleksander
https://aleksander.es
More information about the libqmi-devel
mailing list