In new kernels, updating expected LLP is a valid operation. If so, we prefer
changing the expected LLP in the kernel instead of in the device, because new
chipsets like the MC7455 only do raw-ip.
This update includes two main changes:
* The internal state file generated in /tmp is now named according to the
cdc-wdm control port in use; e.g. /tmp/qmi-network-state-cdc-wdm0
* A new --profile option is included, which allows specifying a custom path
from where to read the profile information.
After this change, qmi-network may be called for different modems in the same
machine just providing a different profile path (if needed), or even reusing
the same one if both modems need the same configuration. E.g.:
$ qmi-network --profile=/path/to/one.conf /dev/cdc-wdm1 start
$ qmi-network --profile=/path/to/two.conf /dev/cdc-wdm2 start
At any moment, you can know the WWAN interface associated to each /dev/cdc-wdm
port using either qmicli, e.g.:
$ qmicli -d /dev/cdc-wdm1 --get-wwan-iface
wwp0s29u1u6i8
$ qmicli -d /dev/cdc-wdm2 --get-wwan-iface
wwp0s29u1u6i10
Or, otherwise directly from sysfs:
$ ls /sys/class/usbmisc/cdc-wdm1/device/net
wwp0s29u1u6i8
$ ls /sys/class/usbmisc/cdc-wdm2/device/net
wwp0s29u1u6i10
The qmi-network script doesn't work properly because it uses a bash-specific
"source" command. In Ubuntu, /bin/sh is dash. The solution is to just change
"source" to a dot, which is the proper way to do a "source" in POSIX sh.
Bug report and original fix by Heath Kehoe <heath@digitalartefacts.com>
The qmi-network script used awk with a field separator of ":". The
output looked like key: 'value'. The second field in this case includes
a space at the beginning. This was making the 'status' command fail.
Now, we account for the space. It is now also not dependent on awk
(this can matter on embedded systems).