Commit Graph
775 Commits
Author SHA1 Message Date
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 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
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 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
Dan Williams 6e9b11a047 simtech: tag ports on Prolink PH-300 2011-05-27 09:57:47 -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 00e00bf9e7 longcheer: ensure the plugin on handles devices it's supposed to
Other devices from the same vendor (x220) need to be handled by
the x22x plugin, so Longcheer can't just rely on the vendor ID
match to know whether it should handle the modem.
2011-05-04 15:11:37 -05:00
Dan Williams 82cee08875 samsung: lock plugin to Y3300 to exclude other Samsung USB modems
Like the SGH-Z810/SCH-U209 which are a different chipset, don't
have pseudo-ethernet ports, and just wouldn't work with this
plugin.
2011-05-02 18:35:50 -05:00
Aleksander Morgado 863dbca631 wavecom: enable usage of MM_MODEM_GSM_BAND_ANY in SetBand() 2011-04-29 12:31:14 +02:00
Aleksander Morgado fc1f35baf6 samsung: allow getting more than one band 2011-04-29 12:31:12 +02:00
Aleksander Morgado bb827c3ef7 samsung: allow setting a single band only 2011-04-29 12:31:11 +02:00
Aleksander Morgado a0c902bdb5 huawei: enable getting and setting more than one band 2011-04-29 12:31:09 +02:00
Dan Williams dc89c0a42d huawei: rework probing and detection
Long ago there were problems where certain Huawei devices would
stop responding on various ports, and sometimes would crash
randomly.  The theory at the time was that touching the secondary
ports made the device angry, thus the plugin simply opened the
ports and listened for unsolicited messages.  But if the device
didn't send any during that 7 second period, MM would not detect
and secondary ports at all.  Plus, it was always a hack.

Instead, the new theory is that the device crashes if unsolicited
messages are enabled (^CURC=1), the secondary port gets touched,
*and* then closed and left for a while.  Fix that by turning
unsolicited messages off at probe time, on when the device is
enabled, and off again when the device is disabled like happens
for other modems.  Thus when MM first detects the modem, it turns
off unsolicited messages and the serial buffer on the secondary
port doesn't fill up and crash the modem.

Second, this allows us to simplify the probing logic quite a bit
so that we can probe all ports we find, but we still wait to probe
the first port so we can turn off unsolicited messages and get
hints about what port is the secondary.
2011-04-27 10:50:32 -05:00
Dan Williams 1cf7a4da44 plugins: allow multiple custom init commands in sequence
Huawei will need this.
2011-04-26 23:44:56 -05:00
Dan Williams 0befde3ce9 plugins: simplify custom init commands
Instead of having two places that custom init stuff got processed
(a hook in the MMPluginBase class itself and a callback too) just
use a callback, and simplify it somewhat so that the plugin tracks
how many tries it cares about and what to do based on the response
or error.
2011-04-26 19:43:40 -05:00
Marius B. Kotsbak 0b757465ff mbm: add MBM device IDs for Lenovo F5521gw module 2011-04-21 11:03:27 -05:00
Dan Williams 2a5cf2978b zte: only dispose Icera data once 2011-04-19 11:07:46 -05:00
Dan Williams 76bdc658d3 samsung: use common Icera code
Port the differences over to the common Icera code (there were only
two) and remove the duplicate code from  the Samsung plugin.  The
Icera NWSTATE regex had to be adjusted to capture "-1" in the first
element which wasn't handled before but which I've seen on the
Samsung Y3300 before the card has registered.
2011-04-18 22:48:05 -05:00
Dan Williams 8333fb657a icera: fix abuse of GInterface
The GInterface structure for MMModemIcera isn't instance data, thus we
shouldn't be storing an instance pointer in it.  Instead, make implemtors
store the intstance data in their private structure, and have them
implement an accessor for the Icera-private data.  This makes everone
(especially GObject) happy.  It's a bit of additional indirection, but
we still get to use the MM_MODEM_ICERA_GET_PRIVATE() and we still
get to cast the passed-in GInterface MMModemIcera into the various
GSM MMModem subclasses, which is all we ever wanted anyway.
2011-04-18 22:08:19 -05:00
Aleksander Morgado 765da63ad2 wavecom: set and get bands
Use AT+WMBS for devices in 2G mode, and AT+WUBS for devices in 3G mode.
2011-04-11 10:04:28 +02:00
Aleksander Morgado d1453b0e19 wavecom: ensure full functionality status
Check the current functionality status with AT+CFUN? and make sure its '1',
otherwise, RF may be switched off.
2011-04-11 10:04:27 +02:00
Aleksander Morgado e93f01f201 wavecom: set and get allowed mode
For 3G devices in Class A, AT+WWSM can be used to get or set the allowed mode:
 *   +WWSM: 0    (2G only)
 *   +WWSM: 1    (3G only)
 *   +WWSM: 2,0  (Any)
 *   +WWSM: 2,1  (2G preferred)
 *   +WWSM: 2,2  (3G preferred)

For 2G devices, there is no such command, so we will default to Any and allow
2G-only and 2G-preferred setups.
2011-04-11 10:04:27 +02:00
Aleksander Morgado c7119f0341 wavecom: ensure the modem uses the highest possible mobile class
These modems can be configured to use different mobile classes. For each kind of
modem, the best mobile class is the highest one in the following order:
 - Class A  (3G only mode)
 - Class B  (PS or CS, GPRS/EDGE or GSM)
 - Class CG (PS only, GPRS/EDGE)
 - Class CC (CS only, GSM)
2011-04-11 10:04:27 +02:00
Aleksander Morgado acf65de3b8 wavecom: query network technology capabilities 2011-04-11 10:04:27 +02:00
Aleksander Morgado 23649549bb wavecom: enable RTS/CTS flow control instead of XOFF/XON 2011-04-11 10:04:27 +02:00
Aleksander Morgado 1fb0b9d79b wavecom: disable default power up command 2011-04-11 10:04:27 +02:00
Aleksander Morgado 262edb96d5 wavecom: handle READY without OK in CPIN? reply 2011-04-11 10:04:27 +02:00
Aleksander Morgado f91ee7af7d wavecom: add initial dummy plugin 2011-04-11 10:04:27 +02:00
Dan Williams f4a26ec2b6 hso: use zero send_delay since Option firmware is generally excellent 2011-04-08 16:20:43 -05:00
Dan Williams ed5aefb3cb serial: allow plugins to specify probe-time send_delay
Let modems we know don't suck use a zero send-delay at probe time,
which greatly reduces time required to probe AT-compatible ports.
2011-04-08 16:19:36 -05:00
Dan Williams 273f4203d4 serial: send entire command in one write if send_delay is 0 (chromium:13506)
Avoids additional USB latency and groups the whole command into one
USB packet.

BUG=chromium-os:13506
2011-04-08 15:42:28 -05:00
Elly Jones 2640baefa4 samsung: add Reset and UnlockRetries.
BUG=chromeos-partner:2999, chromeos-partner:3215
TEST=network_LockedSIM

Change-Id: I17c25c52fa5cf4cffa94e73bd827eaae9e687df0
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Jun Woo Lee <jw86.lee@samsung.com>
2011-04-08 15:30:58 -05:00
Dan Williams 68038cb926 samsung: fix style of samsung_call_control() name 2011-03-27 16:03:22 -05:00
Dan Williams 29b7ac3ddb samsung: fix up disconnect
Two issues here, first we dont' need to chain up to the parent
because it's not doing anything we need (it's mainly for PPP-based
devices) and second we need to wait a bit for the disconnect command
to complete by specifying a callback, otherwise the command may get
discarded when the port is shut down afterward.
2011-03-27 16:01:10 -05:00
Dan Williams 4b15737f8d samsung: streamline enable/init process
Don't need init retries since the modem seems pretty sane, and we
also don't need to call AT+CFUN=1 twice.  Just once should be
fine.  We also don't need any "flashing" since the modem doesn't
really do PPP and thus shouldn't need any of the serial port
carrier stuff to get its attention, since we'll never be using
PPP on any of its ports.
2011-03-27 15:59:27 -05:00
Dan Williams 3593094eb7 samsung: remove debug code 2011-03-27 15:47:08 -05:00