Commit Graph

4336 Commits

Author SHA1 Message Date
Aleksander Morgado
8fcfae43e0 AUTHORS: update from git log
$ git shortlog -s -n
2014-08-22 16:54:11 +02:00
Dan Williams
0c6f1ae6c4 qmi: always use DHCP for IPv4 configuration instead of STATIC
Some newer modems (Huawei E1750, Sierra 73xx) provide what looks like
legitimate static IPv4 configuration through the WDSGetCurrentSettings
call, but when configured the interface does not pass traffic.  Running
DHCP on the same interface provides a slightly different IPv4
configuration but does allow traffic to pass.

Since QMI was switched to static originally for consistency with IPv6
and for speed of IP configuration (since DHCP takes a bit of time), but
not for any known problems with modems, let's switch back to DHCP until
we have time to figure out what's actually going on.
2014-08-18 09:47:59 -05:00
Aleksander Morgado
b03e1cfd58 bearer-qmi: allow forcing DHCP instead of static IP config 2014-08-18 09:47:14 -05:00
Ben Chan
4669611412 broadband-modem,plugins: fix GMatchInfo leaks 2014-08-12 09:45:50 +02:00
Aleksander Morgado
da933468c8 huawei: minor style fixes 2014-08-11 18:31:47 +02:00
David McCullough
bd0ffd24f1 huawei: improve support for network time on Huawei modules
Third revision of Huawei nwtime support.  Takes on feedback from the
mailing list including helpers,  some basic tests and use of the ^NTCT
command to determine network time support (^NWTIME).  Expanded test cases,
more use of g_assert and more logical helper return values/errors.

Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2014-08-11 18:31:46 +02:00
Dan Williams
8c4318d87a iface-mode: downgrade "access technology changed" message to debug
We have a report of a modem that switches access technologies frequently,
in this case almost every 10 seconds.  While that's unusual, it's not
unexpected depending on the RF environment.  We shouldn't spam syslog
with that info; if we need it we can get it with mmcli.
2014-08-11 10:45:41 -05:00
Dan Williams
31695a3912 build: INCLUDES -> AM_CPPFLAGS to quiet automake warning 2014-08-05 09:52:20 -05:00
Aleksander Morgado
3dd6f93133 build: require libmbim 1.10.0
We were depending on some new MbimNwError values defined at some point in the
1.9 development series. Depend on the new stable 1.10 version now that it's been
released.
2014-08-04 15:20:57 +02:00
David McCullough
b8138d93f5 libmbim-glib: handle explicit '+' on positive numbers 2014-07-29 14:16:31 -05:00
Aleksander Morgado
f203b1bf00 plugin: improve probing decision logic for QMI and MBIM
So, we may have modems with multiple /dev/cdc-wdm ports, like Ericsson modems,
where only 1 of them is MBIM. With the previous logic, we would probe all
/dev/cdc-wdm ports for MBIM as soon as one of the ports was handled by the
cdc_mbim driver. That is totally not optimal, as we are already know that they
are not MBIM (not handled by cdc_mbim).

Instead, fix the logic to just probe for MBIM or QMI if the actual driver
managing the port is MBIM or QMI.
2014-07-27 13:55:10 +02:00
Ben Chan
0284daf87e broadband-modem-mbim: increase timeout for powering modem up and down
It's been observed that some modems occasionally take a long time to
power down (which may be due to some shutdown sequence that involves
communicating with network). This patch increases the timeout for
powering modem up and down from 10s to 20s.
2014-07-17 16:09:31 -05:00
Ben Chan
8a56cd4c2a bearer-mbim: increase disconnect timeout
It's been observed that modems may take a long time to disconnect from
the network under certain network conditions. This patch increases the
timeout for the MBIM_CID_CONNECT set command in the disconnect sequence
from 10s to 30s.
2014-07-17 16:09:29 -05:00
Aleksander Morgado
c8572c8098 polkit: fix Location.Setup() authorization rules 2014-07-11 18:56:37 +02:00
Aleksander Morgado
e5920efe09 broadband-modem-mbim: VZ20M returns ERROR_PIN_REQUIRED in PIN query response
VID/PID: 258d:e000

Instead of returning success and the PIN type + PIN status + Remaining attempts,
this modem returns a plain ERROR_PIN_REQUIRED error, so try to handle that...
2014-07-11 11:54:25 +02:00
Aleksander Morgado
6062462dcb broadband-modem-mbim: reset strings to NULL, not 0 2014-07-09 11:58:46 +02:00
kuonirat
0be8808cbd broadband-modem-mbim: update_registration_info immune to null pointers passed 2014-07-09 11:57:45 +02:00
Aleksander Morgado
5358d6fea0 sim: rename 'MMSim' to 'MMBaseSim'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 16:55:29 +02:00
Aleksander Morgado
a29382be70 sms: rename 'MMSms' to 'MMBaseSms'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 16:55:29 +02:00
Aleksander Morgado
3ca267b01f bearer: rename 'MMBearer' to 'MMBaseBearer'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 16:55:29 +02:00
Aleksander Morgado
ff478e301e manager: rename 'MMManager' to 'MMBaseManager'
Just so that we don't have same header names in src/ and /libmm-glib.
2014-07-06 13:23:37 +02:00
David McCullough
07fd7faea5 huawei: enable GPS_UNMANAGED for Huawei modems
Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2014-07-04 19:51:56 +02:00
Aleksander Morgado
054c77224d option,hso: add missing GPS unamanged capability 2014-07-04 09:52:19 +02:00
Aleksander Morgado
b7cf21dc24 huawei: close GPS port once GPS has been disabled 2014-07-04 09:47:49 +02:00
Aleksander Morgado
f6b0fd3f7b libqcdm: new 'reset' tester
Just like 'modepref', but not doing any mode changes, just OFFLINE+RESET.
2014-07-03 16:21:31 +02:00
David McCullough
d73b633639 huawei: GPS support for MU609/MU909
Implement GPS support on the MU609 and MU090 Huawei modules.
Its highly likely the commands are the same for other Huawei modems
and it just needs to be activated via udev rules that flag the GPS port
with ID_MM_HUAWEI_GPS_PORT=1.

There are a lot of options that can be tweaked on the Huawei GPS setup,
this code just chooses a simple default for unassisted, standalone GPS
operation.

Signed-off-by: David McCullough <david.mccullough@accelecon.com>
2014-07-03 16:01:02 +02:00
Aleksander Morgado
09eb87f899 cinterion: allow 'unmanaged' GPS setup 2014-07-02 12:28:56 +02:00
Aleksander Morgado
40cdf3bac4 option,hso: print port type before parsing 2014-07-02 12:28:56 +02:00
Aleksander Morgado
d43363ef14 option,hso: allow 'unmanaged' GPS setup 2014-07-02 12:28:56 +02:00
Aleksander Morgado
ad67d68179 location: new 'unmanaged' GPS setup
Standard GPS setup (raw/nmea) will both enable the GPS module and take full
control of the GPS port. This prevents other processes from reading the NMEA
traces from e.g. a tty. In order to handle this, a new 'unmanaged' GPS location
source is introduced, which will just enable/disable the GPS module, without
reading anything from the GPS port. Of course, both raw/nmea and unmanaged
setups cannot be enabled at the same time.
2014-07-02 12:28:56 +02:00
Dan Williams
915a5beac0 bearer-mbim: ignore empty DNS server addresses 2014-07-01 16:38:34 -05:00
Aleksander Morgado
15a3ebbd35 cinterion: enable GPS location reporting for the PHS8 in QMI-mode
The PHS8 in QMI-mode doesn't support GPS location retrieval via QMI, so we will
fallback to use the AT-based setup and the TTY for reading NMEA traces.
2014-07-01 15:46:57 +02:00
Aleksander Morgado
ce5c3f5af6 ifaces: always include <libmm-glib.h>
As they all use the 'MMSimpleStatus' type.
2014-07-01 15:42:21 +02:00
David McCullough
83c8db8819 huawei: avoid AT^GETPORTMODE in Huawei MU609
The MU609 modems from Huawei have a bug (confirmed by Huawei) that causes
the modem to reset if AT^GETPORTMODE is issued.

I have provided and example udev rule I use to disable this command as a
patch,  feel free to drop that if its not acceptable.  Since I cannot tell
the modem type from within the udev rules this is less specific than my
previous code based patch,  but much simpler ;-)

I have two modems that share the same USB ID,  however,  neither supports the
^GETPORTMODE command (and one of them crashes when it is issued).  Perhaps
someone with a Huawei that supports ^GETPORTMODE can check their USB ID's
and see if they clash.

Here is a comment from the Huawei devs:
> We confirmed this is a issue. This is Qualcomm baseband command at Data
> Card. We didn’t delete and block it. We will fix this issue in next FW.
> Thank you very much.

Sign-off-by: David McCullough <david.mccullough@accelecon.com>
2014-07-01 11:08:47 +02:00
Aleksander Morgado
8f837b830d cinterion: enable GPS location reporting for the PHS8 in AT-mode
This enables support for GPS location reporting when the PHS8 is NOT used in QMI
mode.
2014-06-27 13:18:29 +02:00
Aleksander Morgado
e0f3716d26 modem-helpers: don't return any result if an error happens when parsing CPMS=?
We shouldn't rely on the caller to cleanup intermediate results when returning
an error.
2014-06-27 09:20:40 +02:00
Aleksander Morgado
4406b1e6ec modem-helpers: improve +CMTI indication regex
Allow whitespaces added in several places, like between the comma and the index,
which is what the Cinterion PHS8 does:
  <CR><LF>+CMTI: "MT", 5<CR><LF>
2014-06-25 17:40:06 +02:00
Aleksander Morgado
9637c1ed38 cinterion: update default setting for new SMS indications
The setup in Cinterion modems goes as follows:
  AT+CNMI=<mode>[, <mt>[, <bm>[, <ds>[, <bfr>]]]]

For each field, several setups are available, so we could use a default value,
as we were doing until now (+CNMI=2,1,2,2,1).

BUT, not every Cinterion modem allows the same set of settings. For example, the
new PHS8 only allows '0' for the <ds> value:
  AT+CNMI=?
  +CNMI: (0,1,2),(0,1),(0,2),(0),(1)

So, instead of hardcoding the setup, try to find the best suitable one for each
modem. We'll parse the +CNMI=? test response to know which values are supported
during the messaging support check, which is run once during initialization.
2014-06-25 15:39:45 +02:00
Aleksander Morgado
58d2806f4c cinterion: new 'AT+CNMI=?' parser helper 2014-06-25 15:04:09 +02:00
Aleksander Morgado
08ecc14722 base-modem: quicker find matching cdc-wdm QMI or MBIM ports 2014-06-23 18:12:27 +02:00
Aleksander Morgado
b520503686 huawei: quicker find matching cdc-wdm AT port
Without using a new GUdevClient.

Based on a patch from Dan Williams <dcbw@redhat.com>
2014-06-23 18:12:27 +02:00
Aleksander Morgado
7c347aa3ec port: store parent sysfs path in each MMPort 2014-06-23 18:12:27 +02:00
Aleksander Morgado
7752c9920d huawei: flag /dev/cdc-wdm as primary if no primary found already 2014-06-23 18:12:27 +02:00
Aleksander Morgado
e9d016f088 huawei: setup unsolicited message handlers also in the AT cdc-wdm ports 2014-06-23 18:12:27 +02:00
Aleksander Morgado
75a5c48345 huawei: use the cdc-wdm port dialing if available
With the new 'huawei-cdc-ncm' driver in the kernel, we now may get a
/dev/cdc-wdm AT-capable port exposed by the Huawei device. If so, we must use
this port for NDISDUP dialling in order to get the network interface connected.
2014-06-23 18:12:27 +02:00
Aleksander Morgado
293b032149 build: ignore test files 2014-06-22 18:24:38 +02:00
Aleksander Morgado
a691eec6ca build: avoid using 'INCLUDES' in Makefile.am
Avoids warnings during build; e.g.:
    warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2014-06-22 18:24:21 +02:00
Prathmesh Prabhu
9e93e22482 bearer-mbim: fix disconnect error handling case split
The first case, with no error, needs to check that there was no original error.
Currently, if an error occurs and the resulting NwError is parsed correctly, the
case split treats it as a no-error case.
2014-06-20 12:54:39 -05:00
Prathmesh Prabhu
699a25b802 modem-helpers-mbim: map more MbimNwError to MMMobileEquipmentError
Commit 55e40ea b1ae81a in libmbim ("libmbim-glib: add additional GMM
cause codes to MbimNwError") added one more GMM cause code to
MbimNwError. This patch maps that to MMMobileEquipmentError.

This patch requires libmbim >= 1.9.0
2014-06-19 18:05:48 +02:00
Prathmesh Prabhu
6491d82655 bearer-mbim: disconnect attempt should succeed if bearer is already disconnected
When trying to disconnect bearer, if the modem responds with
MBIM_STATUS_ERROR_CONTEXT_NOT_ACTIVATED, take it to mean that the bearer has
already been disconnected.
2014-06-18 10:05:39 -05:00