Commit Graph

5661 Commits

Author SHA1 Message Date
Aleksander Morgado
a7b8cbb71d port-probe: don't reschedule next probing step when serial port buffer full
When the serial port buffer gets full of non-AT garbage during port probing,
we were re-scheduling the next probing step, which is completely wrong, as we
then would be processing the same probing task twice. If we get a buffer full,
just cancel the AT probing cancellable, which would cancel not only the possible
AT probings, but also the custom init if there is any.

Also, make sure that the custom_init() of the plugins out there don't return an
error if the GCancellable is cancelled. Cancelling the GCancellable means we
should just stop the custom_init(), and actually sending an error in
custom_init() means that the port should be set as unsupported by the plugin, so
completely different things.

Should fix https://bugzilla.gnome.org/show_bug.cgi?id=696695
2013-03-29 12:33:20 +01:00
Aleksander Morgado
1e71647927 broadband-modem: plugins may disable parent's access tech loading 2013-03-28 20:48:42 +01:00
ori inbar
633708b364 serial: add support to optionally send line-feed at the end of AT commands. 2013-03-28 20:15:58 +01:00
ori inbar
98772f2ec9 iface-modem-3gpp: handle access technology change in operator_loading state
This patch fixes a problem of disregarding CEREG/CGREG/CREG reported
access technology since we are in "registering" state - meaning we are
loading operator name+code. now even in this transition state the ACT
is updated.
2013-03-28 20:13:20 +01:00
Aleksander Morgado
effd574a63 option: don't apply both vendor and product filters at the same time
The probing logic expects either one or the other right now. In this case, it is
just simpler to include the Nozomi-related VID in the vendor filter, and remove
the product filter.
2013-03-28 20:06:53 +01:00
Dan Williams
2bbe2f8327 device: read PCI VID/PID
Nozomi devices are old Option NV CardBus devices with the ttys (nozX)
hanging directly off the PCI device.  We need to read the vendor and
product IDs off them too.  It appears that udev screws up the ID_MODEL_ID
field (at least on F17, its set to the device path and not the PCI ID)
so just skip looking at the TTY itself and read the PCI parent, where
we're 100% sure to find the PCI IDs we want.
2013-03-28 20:06:53 +01:00
Aleksander Morgado
e33fc37ec2 option: ignore PH_SIM facility lock in 'nozomi' based modems
https://bugzilla.gnome.org/show_bug.cgi?id=696593
2013-03-28 20:06:53 +01:00
Aleksander Morgado
d9cf4fe91c iface-modem-3gpp: let plugins ignore facility locks
Plugins may decide which facility locks can be completely skipped from the list
being checked.
2013-03-28 20:06:53 +01:00
Dan Williams
fea5b7a670 broadband-modem-icera: make CME 3 errors fail power-up (bgo #696742)
+CME ERROR: 3 (Not Allowed) means airplane mode, at least for the
Samsung Yxxxx devices that I've got.  And if we get this error
on any other devices, chances are they'll fail to power up too.
2013-03-28 12:35:32 -05:00
Aleksander Morgado
d6ac6508d9 plugin: explicitly request QMI probing
Plugins which may support QMI ports need to explicitly request QMI probing
in cdc-wdm devices. This should also avoid probing cdc-wdm ports when we know
that the plugin doesn't support them (e.g. with Ericsson MBM devices).

https://bugzilla.gnome.org/show_bug.cgi?id=696701
2013-03-28 17:33:08 +01:00
Aleksander Morgado
b76dc134bf novatel: try to flip secondary ports to AT as soon as possible
So do it during port probing. If we send this command early enough in the
first AT port being probed, it should flip the secondary ports to AT mode
before their port probing is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=696696
2013-03-28 17:05:48 +01:00
Dan Williams
ca97f0e79f broadband-modem-sierra: fix trivial copy & paste error 2013-03-27 18:02:50 -05:00
Dan Williams
190eb73bf9 broadband-modem: prefer specific access tech checks over generic +CGREG access tech (bgo #696705)
If the modem has specific access technology checks, don't override them
with the generic access technology from +CGREG responses, since that
doesn't have the granularity that specific checks do.  For example, the
+CGREG response only indicates UMTS, and cannot indicate HSDPA, HSUPA,
HSPA, HSPA+, DC-HSPA, etc.
2013-03-27 15:02:40 -05:00
Dan Williams
9119962e12 broadband-modem: remove debugging code
Slipped in while debugging Nozomi stuff; not caught in review.
2013-03-27 08:31:18 -05:00
Aleksander Morgado
b377a62377 iface-modem: never try to create a SIM in a CDMA-only modem
CDMA modems without LTE capabilities will usually not have a SIM, so just skip
loading a SIM object if so.

https://bugzilla.gnome.org/show_bug.cgi?id=696582
2013-03-27 08:27:30 -05:00
Dan Williams
7f1bea5fbf broadband-modem-qmi: zero-pad ESN to 8 characters
It's very likely to already be 8 characters, but if by some
chance it's 7, zero-pad like we do for AT+GSN responses in
the generic CDMA code.
2013-03-27 08:25:13 -05:00
Dan Williams
3b3326bdf0 broadband-modem: parse +GSN response for IMEI, MEID, and ESN (bgo #696596)
+GSN response differs widely between modems.  Some prefix the
MEID and/or ESN with 0x, some have leading zeros, some return the
MEID and the ESN, and some append the serial number to the end of
the IMEI.  Handle that and make the ESN, MEID, IMEI, and
EquipmentIdentifier parsing consistent.
2013-03-27 08:23:52 -05:00
Aleksander Morgado
f299a05571 sms-part: use correct printf modifier for gsize
This is the port to git master of the following commit:

    commit 294a91d9f6390d532399be35ddbf6a2b8d136576
    Author: Thomas Bechtold <thomasbechtold@jpberlin.de>
    Date:   Mon Mar 25 14:28:03 2013 +0100

        sms-utils: use correct printf modifier for gsize
2013-03-26 12:34:52 +01:00
Dan Williams
fcbaa43555 broadband-modem: minimally verify QCDM MDN before using it
Sometimes it's garbage, and we don't like garbage.
2013-03-25 16:18:28 -05:00
Dan Williams
95b46c16f1 broadband-modem-sierra: add after-sim-unlock delay
Older devices may crash if asked to connect right after sending the
PIN and unlocking the SIM; they simply stop responding to AT commands
around the first request for access technology and then reboot.  A
delay seems prevents this behavior.

Since it's not uncommon to require a delay after SIM unlock, add one
for newer sierra_net devices as well, even though we're not quite
sure if they need one or not.  It doesn't hurt, at least.
2013-03-25 15:49:08 -05:00
Dan Williams
8ebce66f96 sierra: fix time check warnings for modems that don't support time
'result' may be NULL even if no error is set.  Errors aren't set
because we want to continue the !TIME/!SYSTIME sequence regardless
of errors, so we can figure out which command the modem supports.

Trying to get a uint32 out of a NULL GVariant makes glib complain,
and it's wrong, so don't do that.
2013-03-25 15:08:31 -05:00
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