Commit Graph
975 Commits
Author SHA1 Message Date
Aleksander Morgado 884ba2bb09 build: place together samsung plugin compilation options 2011-06-14 12:58:36 +02:00
Aleksander Morgado abcffd1753 cinterion: check probed caps from supports task 2011-06-14 12:40:36 +02:00
Eric Shienbrood a35fc3a583 icera: report connected access technology when connected
The NWSTATE field reports both available access technology and the
actual access technology in-use when a PS connection is active, so
report the actual access tech when it's available.
2011-06-13 10:31:35 -05:00
Dan Williams 6657e45a1e core: trivial whitespace cleanup
Tabs -> spaces
2011-06-09 16:53:05 -05:00
Nathan Williams 9f8d42a994 core: handle udev 'change' events
That's what the udev replay gives us these days (as of udev-152).
2011-06-09 16:51:35 -05:00
Eric Shienbrood 509521d180 icera: request specific network error codes on connect errors
For connection failures, get additional error detail. Currently,
the only error codes that are mapped are the 3GPP TS 24.008 codes
for "Unknown or missing access point name" and "Requested service
option not subscribed" (which is sometimes returned for an invalid
APN).

(random fixes and cleanups by dcbw)
2011-06-09 16:45:08 -05:00
Eric Shienbrood 57a14da144 build: ensure Samsung plugin includes common Icera code
Otherwise make can't find build-time dependencies.
2011-06-09 16:41:09 -05:00
Eric Shienbrood 92159d9b0d icera: add more access technology strings 2011-06-09 16:40:11 -05:00
Eric Shienbrood 85aae2d8f1 samsung: disable should use CFUN=4
CFUN=4 disables the radios but still allows useful operations
like getting PIN lock status.  So use that instead.
2011-06-09 16:37:20 -05:00
Dan Williams 63b29b79f9 gsm: fix memory leak when grabbing a new port 2011-06-09 15:01:20 -05:00
Dan Williams e5c967508d ussd: fix leaked callback info in error cases 2011-06-09 14:46:03 -05:00
Aleksander Morgado f9f6d1dfdb plugins: propagate cached probing result to supports task
We need to ensure that the supports task always has the results of the probing,
no matter if the probing was just launched by the plugin grabbing the port, or
by a previous plugin. We do this during supports_port(), by propagating to the
supports task any possible previously cached probing results.
2011-06-06 17:21:47 +02:00
Aleksander Morgado 3921559901 cinterion: set modem disabled if 3 consecutive AT commands get timed out 2011-06-06 17:20:17 +02:00
Aleksander Morgado a2ba5c5e99 cinterion: enable reprobing on ports without cached capabilities 2011-06-06 17:20:17 +02:00
Aleksander Morgado 4cb039e34a cinterion: always sort last the plugin
This is because the cinterion plugin can handle RS232 modes, and checking
support for them needs to have the vendor ID probed with AT commands, so
probing is almost always issued in this plugin. By sorting last, we let
other plugins check support first.
2011-06-06 17:20:17 +02:00
Aleksander Morgado a9c93ec3ad cinterion: handle RS232 modems 2011-06-06 17:20:17 +02:00
Aleksander Morgado 22f15b87b5 base: disable the modem if up to N consecutive commands get timed out
This feature is initially disabled for all modems, but plugins can enable it by
setting a value greater than 0 for the "max-timeouts" property when creating the
modem object.
2011-06-06 17:20:17 +02:00
Aleksander Morgado f2ba435446 manager: protect ScanDevices() d-bus method with manager control policy rule 2011-06-06 17:20:17 +02:00
Aleksander Morgado c67cbcabef policy: new policy for manager control actions 2011-06-06 17:20:17 +02:00
Aleksander Morgado 3fb53d3348 manager: new ScanDevices() d-bus method to request a new device scan loop 2011-06-06 17:20:17 +02:00
Aleksander Morgado df0d9b480c plugin base: let plugins decide if they should be sorted last
Note that even if a plugin says it wants to be sorted last, the generic plugin
will always be the last one. Also, there is no order guaranteed between two
plugins that request to be sorted last.
2011-06-06 17:20:17 +02:00
Aleksander Morgado 5a2078a2a5 plugin base: include vendor ID and product ID retrieval during AT port probing
Port probing is extended to also query for Vendor ID and Product ID. This allows
plugins to check whether the reported IDs are expected, and thus we enable
plugins to handle modems connected via RS232 ports (where udev doesn't give any
vendor ID) or modems connected via a USB adapter (where udev gives the vendor ID
of the adapter).

Note that this effectively means that a plugin which expects these kind of modem
connections will end up always launching port probing as they won't only rely on
the vendor ID reported by udev.
2011-06-06 17:20:17 +02:00
Aleksander Morgado 9578e1b9ca cinterion: override CMER enabling command 2011-06-06 17:20:17 +02:00
Aleksander Morgado de5eb41a70 cinterion: override SMS indications setup commands 2011-06-06 17:20:17 +02:00
Aleksander Morgado 0b8f86534a cinterion: if modem removed don't process response 2011-06-06 17:20:17 +02:00
Aleksander Morgado 998b622611 cinterion: set and get bands 2011-06-06 17:20:16 +02:00
Aleksander Morgado ade9fe8d30 cinterion: set and get allowed mode
The 2G-preferred and 3G-preferred modes are not supported on dual
2G/3G cinterion modems.
2011-06-06 17:20:16 +02:00
Aleksander Morgado 8d8888bc63 cinterion: query supported networks to detect if 2G or 3G device 2011-06-06 17:20:16 +02:00
Aleksander Morgado 795de12050 cinterion: query network technology capabilities
We try to look for 'psinfo' indication in AT^SIND? output (available in 3G
devices from Cinterion), and if that is not available, we try to use the
AT^SMONG GPRS monitor (available in 2G devices from Cinterion).
2011-06-06 17:20:16 +02:00
Aleksander Morgado c6060e8c0f cinterion: add initial dummy plugin 2011-06-06 17:20:16 +02:00
Aleksander Morgado 668726dbd7 charsets: new utf8_to_hex() method 2011-06-06 17:20:16 +02:00
Aleksander Morgado 1e507824c6 gsm: let plugins use their own command for CMER enabling 2011-06-06 17:20:16 +02:00
Aleksander Morgado 85569f77e9 gsm: let plugins use their own commands for SMS indications and storage configuration 2011-06-06 17:20:16 +02:00
Aleksander Morgado 8c1430763f introspection: indentation fixes 2011-06-06 17:20:16 +02:00
Dan Williams c45df27ca0 x22x: add support for the Alcatel X200
Same USB IDs as the X060s which is driven by Longcheer, but uses the
X22X command set so we have to do a little dance and make sure we
don't claim the X060s here.
2011-06-05 20:58:23 -05:00
Dan Williams 1936979f11 longcheer: ensure the Alcatel X200 is not claimed
The X200 shares the same USB VID and PID as the X060s but the X200
does not use the same AT command set; it uses the X22X plugin
instead.  Since both modems also report the same +GMM and +GMI
responses, we have to fall back to using +GMR even though that's
a pretty sketchy way to tell them apart if the firmware ever changes.
2011-06-05 20:58:18 -05:00
Dan Williams b122938ab5 core: allow plugins to stop probing and not support a modem
Previously plugins could only stop probing, *or* stop probing and
indicate support for a device.  For the Alcatel X200/X060s debacle
we need to stop probing and indicate that the plugin does not
support the device at all.
2011-06-05 20:58:13 -05:00
Dan Williams d81fa43c1d x22x: support access technology reporting 2011-06-05 18:29:00 -05:00
Aleksander Morgado da55d11e72 plugins: use MMCallbackInfo instead of custom DisableInfo
Implemented using a custom invoke method which doesn't call the callback, and
instead calls parent disable passing the callback as argument.

This fix ensures that if a modem gets removed, no invalid modem reference is
passed to the parent disable, as info->modem would be set to NULL and we can
detect it in the custom invoke method.
2011-06-05 17:51:05 +02:00
Aleksander Morgado d37dbaca2a core: ensure ERROR_REMOVED error is used in MMCallbackInfo when detecting modem removal 2011-06-05 17:51:03 +02:00
Aleksander Morgado 9323daec01 core, plugins: if modem removed don't process response
We try to avoid a memory leak when info->error is reset, as well as a second
re-schedule of the info.
2011-06-05 17:51:00 +02:00
Nathan Williams f7dff81eec gsm: free the string allocated by utils_hexstr2bin().
Change-Id: I1f7dabc8209d9757b573a59abb788a2346f72ad5
2011-06-02 17:50:47 -05:00
Nathan Williams a1378ae8e8 Spec out and implement a command to get a GSM SIM SPN value.
Using a SIM with a SPN, run the following command:
dbus-send --system --dest=org.freedesktop.ModemManager --print-reply /org/freedesktop/ModemManager/Modems/0 org.freedesktop.ModemManager.Modem.Gsm.Card.GetSpn

Change-Id: I8f36c8432f40fa4e3cb3f8c6ceef16b2bdadf2a1
Reviewed-on: http://gerrit.chromium.org/gerrit/1464
Reviewed-by: Nathan J. Williams <njw@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
2011-06-02 17:45:56 -05:00
Nathan Williams dfab00bf1e sms_decode_address(): Add a leading "+" on international numbers.
BUG=chromium-os-partner:4278
TEST=Send SMS from phone (to get +... format) and from AIM-SMS gateway
(to get raw-digit format).

Change-Id: I36eb9f1432a432435578180dfdb315b0e7ee5744
2011-06-02 17:42:20 -05:00
Aleksander Morgado 6d69432a85 serial-parser: allow 0 or more whitespaces before error code in regular expresions 2011-06-02 16:49:53 +02:00
Nathan Williams b8cb764d08 sms: use correct start and length for alphanumeric data
sms_parse_pdu(): Protocol ID doesn't actually affect decoding, so
don't fret about its value.

ChromeOS:
Change-Id: Ia4cb20c415aed1026bb7b8dd4daa8ae53dd749e8
2011-05-27 10:26:01 -05:00
Dan Williams 6e9b11a047 simtech: tag ports on Prolink PH-300 2011-05-27 09:57:47 -05:00
Nathan Williams 52bd7646e8 gsm: correctly set registration status when disabling
Chromium:
Change-Id: I0629706985f273832ac3662acb260388d0e6ed83
2011-05-19 15:45:22 -05:00
Nathan Williams 97ea7dca8a samsung: split initialization sequence to ensure echo is off
Split the Samsung initialization sequence from "ATZ E0 V1" to "ATZ"
and "ATE0 V1" - the modem is allowed to ignore the rest of the line
after Z, so echoing was not being turned off, leading to getting
"AT+CIMI\n\n" as part of the IMSI when it is retrieved at startup.

Chromium:
Change-Id: Icfd767174e779e472f8cde419acb163128e4715d
2011-05-19 15:01:34 -05:00
Dan Williams e28946841d ussd: formatting and spacing cleanups 2011-05-19 10:44:03 -05:00