Commit Graph

1037 Commits

Author SHA1 Message Date
Nathan Williams
b7820cf6e1 gsm: handle case of entirely empty SPN correctly
BUG=none
TEST=Insert a SIM with a present but empty (all 0xFF) SPN and check
the system log for a (lack of) assertion errors from mm_charset_gsm_unpacked_to_utf8().

Change-Id: I1250494b9757c9bfdce56402a4471c598f41223f
Reviewed-on: http://gerrit.chromium.org/gerrit/3139
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Nathan J. Williams <njw@chromium.org>
2011-06-30 12:23:10 -05:00
Aleksander Morgado
7e69d2cf30 cinterion: always try to use RTS/CTS flow control
Otherwise, power-up after going to standby will not work properly
2011-06-22 16:00:58 +02:00
Aleksander Morgado
39abb023ed serial: new property to enable RTS/CTS flow control 2011-06-22 15:53:37 +02:00
Aleksander Morgado
eae5d6c41b cinterion: enable power-off command to go to sleep/standby mode
AT+CFUN=4 will be used when available to go to standby mode. If not supported,
(as in EGS5) AT+CFUN=7 will be used instead, which enables a CYCLIC SLEEP mode.

Flow control setup was updated to RCS/CTS so that waking up from sleep mode
works properly.
2011-06-22 13:11:39 +02:00
Aleksander Morgado
56db818901 sierra: do not send power-up command if not needed 2011-06-22 13:11:39 +02:00
Aleksander Morgado
34b5635f84 wavecom: enable power-off command to go to sleep/standby mode
AT+CFUN=4 will be used to go to standby mode.
2011-06-22 13:11:38 +02:00
Aleksander Morgado
ab485bd66a wavecom: try to power-up without rebooting
Using AT+CFUN=1,0 so that we request to avoid resetting (<rst>=0). Works
properly when powering up after having put the modem in standby mode with
AT+CFUN=4.

Note that the power-up command will only be sent if the check to see if power-up
is needed requests it.
2011-06-22 13:11:38 +02:00
Aleksander Morgado
255525a5a2 wavecom: do not send power-up command if not needed 2011-06-22 13:11:38 +02:00
Aleksander Morgado
6e9d980e8c gsm: allow plugins to check if they need to issue the power-up command
Some modems only like the power-up command if not already in full functionality
mode. If the power-up is sent while already in full functionality mode, they get
rebooted and reseted.

With this changes, plugins can check whether they need the power-up and ask
the generic gsm code base to skip the command or not.

By default, power-up command (if any given) is never skipped.
2011-06-22 13:08:53 +02:00
Dan Williams
895f0f2ea3 doc: add notes about Pantech UML290 and the WMC protocol
WMC is a proprietary protocol observed on various Verizon devices
and implemented by the UML290.
2011-06-17 16:25:45 -05:00
Dan Williams
51c409d1eb ussd: fix reception, network notifications, and network requests
Because the code was sending the USSD request with a "notify me via
unsolicited result code" tag, the response could come from any port,
and in was coming from other ports on various devices.  But the code
expected the response on the main port, thus it got lost.

So turn the USSD response processing into an unsolicited command handler
instead, which allows us to process the response no matter where it
comes from.  This patch also enables network-initiated USSD
notifications and requests since that's easy to add once the first thing
here is done.
2011-06-15 13:06:37 -05:00
Dan Williams
77fa848820 serial: warn when open/close take longer than 7 seconds
Due to kernel bugs and such.
2011-06-15 12:50:35 -05:00
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