Commit Graph

31 Commits

Author SHA1 Message Date
Aleksander Morgado c3d6ed463c qmi-network: avoid more bashisms when comparing strings 2016-06-30 18:02:00 +02:00
Aleksander Morgado 1fabdc9841 qmi-network: avoid bashisms when checking arguments 2016-06-19 14:14:28 +02:00
Aleksander Morgado 2243caaa86 qmi-network: don't explicitly quote start network argument 2016-03-04 13:33:06 +01:00
Aleksander Morgado 88502bef52 qmi-network: support APN user/password 2016-03-04 12:52:02 +01:00
Aleksander Morgado e6ab0885ea qmi-network: update checks of variable contents
Use -z and -n consistently.
2016-03-04 12:52:02 +01:00
Dan Williams 3465107153 trivial: whitespace fixes 2016-03-03 13:26:44 -06:00
Aleksander Morgado c2fa617177 qmi-network: if kernel allows updating LLP, prefer device-reported LLP
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.
2016-01-24 16:56:25 +01:00
Aleksander Morgado ff8dd9e75c qmi-network: fix indentation 2015-12-29 17:19:39 +01:00
Aleksander Morgado 83a06c3c43 qmi-network: update it to work with more than one device
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
2015-08-02 09:32:17 +02:00
Aleksander Morgado 4fbbfa903f qmi-network: fix indentation 2015-02-26 13:04:16 +01:00
Aleksander Morgado 4a82bb9be8 qmi-network: try to update LLP before connecting if the wrong one found 2015-02-26 13:01:17 +01:00
Aleksander Morgado dcb6aa3f39 qmi-network: add missing proxy option when stopping network 2015-02-26 12:40:07 +01:00
Aleksander Morgado e02d9a35b6 qmi-network: allow running with the qmi-proxy
The qmi-proxy setup will be used by default if the profile has the following
setting:

    PROXY=yes
2015-02-23 20:22:11 +01:00
Aleksander Morgado 8a5ba606b1 qmi-network: improved --help output with more detailed information 2015-02-23 20:01:00 +01:00
Marius B. Kotsbak 8afb82b9a5 Fix bashism, as the script uses "sh", not "bash".
See downstream bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772328
2014-12-30 10:48:08 +01:00
Aleksander Morgado 739fc4f183 qmi-network: fix bashisms
Equivalent to the fix done in mbim-network, see:
https://bugs.freedesktop.org/show_bug.cgi?id=87093
2014-12-08 13:58:39 +01:00
Aleksander Morgado 9bcf031b39 qmi-network: use dot instead of 'source' to load the profiles
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>
2013-09-13 19:21:05 +02:00
Aleksander Morgado 32b3b3243f qmi-network: implement --help and --version 2013-09-13 17:41:53 +02:00
Aleksander Morgado a8d8a6e751 utils,qmi-network: program is GPLv2+ 2013-08-14 15:40:01 +02:00
Shawn J. Goff d106b89b7b qmi-network: Fix grabbing output from lines with spaces
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).
2013-02-15 15:12:12 -06:00
Shawn J. Goff 2a9bb58bd2 qmi-codegen python3: fix dict.has_key('key') to 'key' in dict
Python 3 no longer supports the has_key() method.

sed regex:
s/\([^ ]\+\)\.has_key(\([^)]*\))/\2 in \1/g
2012-12-17 16:59:48 -06:00
Aleksander Morgado 091c83884b cli,qmi-network: `--start-network' now requires the APN passed as a string 2012-08-23 16:15:03 +02:00
Aleksander Morgado 4b8910554d qmi-network: add missing copyright header 2012-07-03 16:08:58 +02:00
Aleksander Morgado 7e4f4380ab qmi-network: avoid double brackets on if statements 2012-07-03 16:08:52 +02:00
Aleksander Morgado a5bf4b74d5 qmi-network: don't issue error if clearing already cleared state 2012-07-03 16:08:52 +02:00
Aleksander Morgado 674a242bdc qmi-network: if network start fails, release CID 2012-07-03 16:08:52 +02:00
Aleksander Morgado be46ed88d6 qmi-network: stopping while already stopped won't issue an error 2012-07-03 16:08:52 +02:00
Aleksander Morgado e2ce1ab21d utils,qmi-network: try to use /bin/sh instead of /bin/bash 2012-07-03 16:08:52 +02:00
Aleksander Morgado f0758c3b10 utils,qmi-network: always compare strings in if() conditions 2012-07-03 16:08:52 +02:00
Aleksander Morgado 15a8cd9566 utils: new `qmi-network' script which helps starting/stopping the network 2012-07-03 16:08:52 +02:00
Aleksander Morgado 85b380fcb5 core: moved Gobi API sources and utils to their own subdirectories 2012-07-03 15:41:02 +02:00