Commit Graph

5790 Commits

Author SHA1 Message Date
Aleksander Morgado
14bb687b94 iface-modem-cdma: fix use of uninitialized variable 2013-03-22 08:17:48 +01:00
Aleksander Morgado
215255d325 cli: show CDMA activation state info 2013-03-22 08:12:59 +01:00
Aleksander Morgado
3b66047d94 broadband-modem-qmi: implement automatic CDMA activation 2013-03-22 08:12:59 +01:00
Aleksander Morgado
6252df0bef broadband-modem-qmi: new generic power cycle action 2013-03-22 08:12:59 +01:00
Aleksander Morgado
3e5251cad7 broadband-modem-qmi: implement initial CDMA activation state loading 2013-03-22 08:12:59 +01:00
Aleksander Morgado
5cc98341ad iface-modem-cdma: load initial activation state during init 2013-03-22 08:12:59 +01:00
Aleksander Morgado
240dc12fd2 iface-modem-cdma: allow reporting activation state changes 2013-03-22 08:12:43 +01:00
Aleksander Morgado
685eb85534 api,enums: new `MM_MODEM_CDMA_ACTIVATION_STATE_UNKNOWN' value
Used initially when we don't know the current activation state.
2013-03-22 08:11:00 +01:00
Aleksander Morgado
3e33f1bc4d api,introspection: new `ActivationState' property in the CDMA interface 2013-03-22 08:11:00 +01:00
Aleksander Morgado
9367f239db api,introspection: minor updates in the CDMA interface descriptions 2013-03-22 08:11:00 +01:00
Aleksander Morgado
ad757bd3bc bearer-qmi: don't try to gather connection settings if we didn't connect 2013-03-21 17:31:11 +01:00
Aleksander Morgado
aa84ce98f7 blacklist: ignore Arduino devices
https://bugs.launchpad.net/bugs/910736
https://bugs.launchpad.net/bugs/1153632
2013-03-20 21:36:34 +01:00
Aleksander Morgado
0b39072b76 error-helpers: avoid crash when error is not recognized
Just remove the last element with NULL strings in the array of errors, as we're
safe using G_N_ELEMENTS() to iterate it.

Reported by Jose Maria Gonzalez Calabozo <jmgonzalezc@indra.es>
2013-03-20 18:16:10 +01:00
Aleksander Morgado
f27dbda4a7 iface-modem-cdma: fix checking support for manual activation 2013-03-20 09:50:34 +01:00
Aleksander Morgado
e6a5ad259c build: fix check for libqmi when newest QMI commands are enabled
Reported by Marius Kotsbak <marius.kotsbak@gmail.com>
2013-03-14 14:41:50 +01:00
Aleksander Morgado
b64fc4b588 blacklist: ignore West Mountain radio devices
https://bugs.launchpad.net/bugs/1154654
2013-03-13 17:06:10 +01:00
Dan Williams
671d34cf92 qcdm: add auto-LTE modes for GSM and CDMA
as in, CDMA+EVDO+LTE and GSM+UMTS+LTE which were missing before.
2013-03-13 10:31:06 -05:00
Aleksander Morgado
bee388098c build: ignore 'modepref' test 2013-03-13 11:17:45 +01:00
Dan Williams
dd4be407b2 qcdm: modepref: reset device after setting mode preference
Otherwise it doesn't actually take until you unplug/replug.
2013-03-12 16:50:49 -05:00
Dan Williams
974471e295 build: distribute autogen.sh 2013-03-12 15:46:33 -05:00
Dan Williams
e390d21075 qcdm: add modepref utility
Sets and gets the NV "mode pref" item for allowed access
technologies.
2013-03-12 13:01:31 -05:00
Dan Williams
5efb1ceb5e qcdm: fix up NV Mode Pref item handling
While the QCDM and DIAG_NV are the same, in reality they shouldn't
be and there should be a mapping between them.  That wasn't happening,
so fix that up and add a few missing modes to the NV item defines.
2013-03-12 13:01:31 -05:00
Dan Williams
30fb4e9da7 wmc: add get functionality to uml290mode 2013-03-12 13:01:31 -05:00
Aleksander Morgado
66c5416e3c broadband-modem-qmi: fix logic to include GSM/WCDM acquisition order preference 2013-03-12 18:50:20 +01:00
Aleksander Morgado
4e6400d3c8 zte: add port type hints for the ZTE MF195
https://bugzilla.gnome.org/show_bug.cgi?id=691480
2013-03-12 18:48:45 +01:00
Aleksander Morgado
5758fafaf5 modem-helpers-qmi: fix allowed mode translation from QMI to MM
Which actually fixes allowed mode switching in MM...
2013-03-12 12:22:22 +01:00
Aleksander Morgado
4b2577fe29 broadband-modem-qmi: fix initial operating mode loading 2013-03-12 11:01:27 +01:00
Aleksander Morgado
2bcc647d3e broadband-modem-qmi: handle 'UimUninitialized' error when checking unlock status
QMI modems without SIM may report 'UimUninitialized' QMI protocol errors, so
catch those and use them as 'SIM failure' so that they get reported to the user.
2013-03-12 10:59:14 +01:00
Ben Chan
0dea5b5d72 broadband-modem: fix enable flag in UnsolicitedRegistrationEventsContext 2013-03-06 09:37:51 +01:00
Aleksander Morgado
14c03f98ad mbm: fix 3gpp dialling sequence when result comes through polling 2013-03-05 20:47:58 +01:00
Aleksander Morgado
144cc7011e mbm: tag the ttys instead of the parent usb device
We can just tag the ttys instead of the parent usb device, so that the core
logic which looks in the plugin-specified port tags works properly. There is no
need to explicitly tag the net port, as the probing for this port ends when a
plugin suggestion comes from another port probing on the same device.
2013-03-05 20:32:03 +01:00
Aleksander Morgado
3ebc8413b0 udev: tag all devices from idVendor 0x0711 as manual-scan-only
Magic Control Technology Corp (0x0711) manufacturers several USB<->RS232
adapters.
2013-03-05 19:41:08 +01:00
Aleksander Morgado
8450b7b2a3 core: don't automatically probe ports of USB<->serial adapters
We should not automatically probe ports marked as coming from USB to serial
adapters, as we're not sure that a modem is behind the adapter. Still, let the
user request a manual scan and have these devices probed in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=647556
https://bugzilla.gnome.org/show_bug.cgi?id=691076
2013-03-05 19:41:08 +01:00
Ben Chan
3678ae5378 iface-modem-3gpp: handle non-deferrable registration state updates
This patch changes MMIfaceModem3gpp to differentiate between deferrable
and non-deferrable 3GPP registration state updates. Periodic or
unsolicited registration state updates are deferrable, while internal
updates, e.g. due to modem being disabled, are non-deferrable.
2013-03-05 19:31:17 +01:00
Ben Chan
1e67312aaf broadband-modem: fix disabling of unsolicited registration events 2013-03-05 19:16:05 +01:00
Gerald Richter
113916beb5 sierra: add MC8790 to APP1 PPP whitelist 2013-03-04 08:32:23 -06:00
Aleksander Morgado
9ee9845b1e iface-modem-3gpp: avoid re-setting deferred registration update while disabling
Don't clear the current deferred registration update until having disabled
and cleaned up unsolicited registrations state messages, or we may end up
re-setting the deferred registration update again meanwhile
2013-03-01 18:21:19 +01:00
Ben Chan
f93bba25f2 iface-modem-3gpp: clear deferred registration state update when disabling 2013-03-01 08:44:43 +01:00
Aleksander Morgado
c79d266e62 udev: update all udev rules to always match both VID/PID together
If the rules to tag specific USB interface numbers only apply on the PID, we'll
end up seeing that if the port has a parent with another PID, and that other
PID also has a rule, port will get tagged multiple times. Easier to see with an
example:

The ZTE MF637 (VID 0x19D2, PID 0x0121) had the following rules:

ATTRS{idProduct}=="0121", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_ZTE_PORT_TYPE_MODEM}="1"
ATTRS{idProduct}=="0121", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_ZTE_PORT_TYPE_AUX}="1"

In our ZTE rules we also have some for the device with PID 0x0002, like:

ATTRS{idProduct}=="0002", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_ZTE_PORT_TYPE_MODEM}="1"
ATTRS{idProduct}=="0002", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_ZTE_PORT_TYPE_AUX}="1"

And it seems that we can grab multiple PIDs from a single port, i.e. from the
parent objects in the hierarchy:

udevadm info -a -n /dev/ttyUSB4 | grep idProduct
    ATTRS{idProduct}=="0121"
    ATTRS{idProduct}=="0020"
    ATTRS{idProduct}=="0002"

Where that 0x0002 idProduct is not from the modem, but from the EHCI Host
Controller (with idVendor 0x1d6b in my case).

So... we end up seeing that both set of rules will apply to the ports, and we
misleadingly get:

    (ttyUSB3) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    ZTE: AT port 'tty/ttyUSB2' flagged as primary
    (ttyUSB2) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    ZTE: AT port 'tty/ttyUSB1' flagged as secondary
    (ttyUSB1) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    ZTE: AT port 'tty/ttyUSB4' flagged as primary
    b_port(): (ttyUSB4) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB2 at (primary)
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB1 at (secondary)
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB2 data (primary)
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB0 qcdm

Which is wrong, as ttyUSB4 should have been our primary port, not ttyUSB2.

With this patch on, the rules apply only to the VID/PID pair, and we end up
getting what we really wanted:

    (ttyUSB3) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    (ttyUSB2) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    ZTE: AT port 'tty/ttyUSB1' flagged as secondary
    (ttyUSB1) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    ZTE: AT port 'tty/ttyUSB4' flagged as primary
    b_port(): (ttyUSB4) type 'at' claimed by /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB4 at (primary)
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB1 at (secondary)
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB4 data (primary)
    (/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) tty/ttyUSB0 qcdm

https://bugzilla.gnome.org/show_bug.cgi?id=694759
2013-02-26 23:22:00 +01:00
Aleksander Morgado
89461cf7b3 iface-modem: allow falling back to 'failed' state
Allow mm_iface_modem_update_state() receive 'MM_MODEM_STATE_FAILED', and treat
it as any other change to failed state, but with
'MM_MODEM_STATE_FAILED_REASON_UNKNOWN'.
2013-02-26 21:17:43 +01:00
Aleksander Morgado
3f3950bd12 plugins: log about all port type hints received from udev 2013-02-26 21:02:12 +01:00
Aleksander Morgado
8d74b11bd3 plugin-manager: cancelled tasks are no longer deferred-until-suggested
The deferred-until-suggested tasks specify tasks that are open/ongoing;
cancelled tasks shouldn't have this flag set.

https://bugzilla.gnome.org/show_bug.cgi?id=694603
2013-02-25 15:28:47 +01:00
Ben Chan
8488782e14 iface-modem-3gpp: defer registration state update when registration is lost
This patch defers the update of 3GPP registration state by 15 seconds
when the registration state changes from 'registered' (home / roaming)
to 'searching'. This allows a temporary loss of 3GPP registration to
recover itself when relying on ModemManager to explicitly disconnect and
reconnect to the network.
2013-02-25 09:10:56 +01:00
Colin Walters
980ad52a47 build: Look for generated file in builddir, not srcdir 2013-02-25 08:51:50 +01:00
Aleksander Morgado
3f8b11e3f0 broadband-modem: fix CUSD response parsing
When reading the string reply in a +CUSD indication, don't blindly split
using whitespace or comma as field separator, as the string may be a text string
with both whitespaces and commas, e.g.:

+CUSD: 0,"hey hey, something here<LF>***<LF>and something more here"

Also, skip reading the encoding field for now, as we don't use it yet.
2013-02-22 21:54:57 +01:00
Aleksander Morgado
c19ee43cbe broadband-modem: avoid reading already freed memory in USSD operations 2013-02-22 21:49:19 +01:00
Aleksander Morgado
9976625f94 broadband-modem: USSD response may come even before finishing our request
MBM devices seem to include the '+CUSD: 0' indication before even returning OK to our '+CUSD=1'

(ttyACM0): --> 'AT+CUSD=1,"*111#",15<CR>'
(ttyACM0): <-- '<CR><LF>+CUSD: 0,"reply here"<CR><LF>'
(ttyACM0): <-- '<CR><LF>OK<CR><LF>'
2013-02-22 21:49:19 +01:00
Aleksander Morgado
b1bb8e30b4 broadband-modem: don't assume the returned string is always hex-encoded 2013-02-22 19:43:49 +01:00
Aleksander Morgado
ca49af0c5d mbm: fix CFUN result parsing 2013-02-22 17:54:16 +01:00
Aleksander Morgado
b22bba509a broadband-modem: increase default AT command timeout for USSD operations
May really take more than 3s.
2013-02-22 17:47:25 +01:00