Commit Graph
1937 Commits
Author SHA1 Message Date
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
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
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
Aleksander Morgado 14bb687b94 iface-modem-cdma: fix use of uninitialized variable 2013-03-22 08:17:48 +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 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 b64fc4b588 blacklist: ignore West Mountain radio devices
https://bugs.launchpad.net/bugs/1154654
2013-03-13 17:06:10 +01: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 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 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
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 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 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
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 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
Aleksander Morgado 75d20c15d4 api: notify in the interface about the reason why the modem is FAILED
We currently implement 'SIM missing' and 'SIM error', which are probably the
most common ones.
2013-02-22 16:35:56 +01:00
Aleksander Morgado a18140e8ed plugin: avoid using uninitialized variable
Reported by: Jose Maria Gonzalez <jmgonzalezc@indra.es>
2013-02-21 11:15:37 +01:00
Aleksander Morgado 0377ccaa59 manager: during initial scan, add new ports in idles
Treat each port independently in its own idle, as if we're receiving independent
udev events, otherwise, GSources may not be properly scheduled in the main loop.
2013-02-20 19:16:05 +01:00
Aleksander Morgado 5b072b9198 plugin: plug memleak
A new reference to probe was acquired through mm_device_get_probe(), just unref it
when no longer needed. Note that mm_port_probe_run() will take its own reference
for as long as required to complete the operation.
2013-02-20 17:00:14 +01:00
Aleksander Morgado 688bb2cb3a plugin: plug memleaks
This is really just to have a nice valgrind/memcheck output report, no big deal
if they were never freed.
2013-02-20 16:48:41 +01:00
Aleksander Morgado 000bb64225 serial-port: allow specifying some wait time between closing and reopening
We will now by default wait some time (1s) between port getting fully closed and
the port being reopened again. This logic seems to work for multiple modems
where there is a single port for both AT and data, like my Nokia C7 and Iridium
modems. If this wait time is not applied, the port ends up returning EAGAIN for
every write that we try to do afterwards.
2013-02-20 15:54:54 +01:00
Aleksander Morgado 9a6fce0a08 serial-port: remove unneeded property name
Was incorrectly included in a previous commit
2013-02-20 11:41:53 +01:00
Aleksander Morgado 2267fb0480 plugin: plug memleaks 2013-02-20 09:59:20 +01:00
Aleksander Morgado f27737e031 bearer: plug memleak 2013-02-20 09:53:14 +01:00
Aleksander Morgado 061760a4f8 broadband-modem: plug memleak 2013-02-20 09:50:04 +01:00
Ben Chan bb73ce0aaf iface-modem: fix modem state consolidation upon bearer disconnection
Patch "iface-modem: fix invalid modem state consolidation" (commit
69aff6183a) incorrectly consolidates the
modem state upon the disconnection of a bearer. The modem state remains
'connected' after the last bearer is disconnected. This patch fixes
that.
2013-02-20 09:17:08 +01:00