Commit Graph

304 Commits

Author SHA1 Message Date
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
Dan Williams
7daad80242 samsung: fix access technology detection
Need to send the MM allowed mode back to the caller, not the
Icera mode.  Simple typo in original plugin patch I think.
2011-03-27 15:45:29 -05:00
Dan Williams
791677ca40 samsung: make a few local functions private
No need for them to be public as they aren't used anywhere else.
2011-03-27 15:41:47 -05:00
Dan Williams
9d1c02f553 samsung: clean up modem detection
Use standard vendor/device id detection mechanisms and handle the
net port like other net ports are handled, by just claiming it.  Also
reject CDMA modems for now.
2011-03-27 15:26:55 -05:00
Dan Williams
35b3e348e6 samsung: drop PORT_TYPE_ECM
Isn't really needed since it's just the same as any other net
device port type.
2011-03-27 15:23:44 -05:00
Dan Williams
b76889c358 samsung: spacing, style, and build fixes
Clean up the spacing and use more consistent styling.
2011-03-27 15:18:09 -05:00
Aleksander Morgado
d66bfc7b11 samsung: fix compilation 2011-03-27 15:15:58 -05:00
Elly Jones
895aa99e6d zte: fix build dependency race with Icera utils bits (chromium-os:13398) 2011-03-24 12:22:51 -05:00
Jun Woo Lee
4ad0c01be0 modemmanager: Add support for Samsung Y3300 modem
BUG=chrome-os-partner:2394
TEST=gmerge modemmanager, watch logs, see detected as Samsung modem, connect to AT&T network

Review URL: http://codereview.chromium.org/6614026
Patch from Jun Woo Lee <jw86.lee@samsung.com>.

Change-Id: I913628ff4a1cd16c8180e3c808644b0134e69e31
2011-03-11 21:50:05 -06:00
Thomas Bechtold
b3b1d5309a core: allow plugins to handle custom init responses 2011-03-11 20:25:22 -06:00
Dan Williams
b0b9ea95cf simtech: add port tags for SCT U300 (Element Mobile) 2011-02-17 15:44:23 -06:00
Dan Williams
8f223f45f9 zte: fix handling of Icera simple connect process
Yay for GInterface.
2011-02-01 22:52:34 -06:00
Dan Williams
d1f4b07e0e icera: fix username and password ordering for authentication 2011-02-01 22:48:55 -06:00
Dan Williams
16039244bb core: rework logging
Make it more flexible, add logging to a file, and absolute and
relative timestamps.
2011-01-23 20:51:48 -06:00
Dan Williams
f85b014d84 build: fix distcheck 2011-01-23 20:42:32 -06:00
Dan Williams
d908389aff core: add modem reset/power-cycle command
Based on a patch by Elly Jones from Google.
2011-01-14 12:17:02 -06:00
Dan Williams
12b144e120 zte: add more ZTE port tags (LW272, others) 2011-01-12 15:30:23 -06:00
Dan Williams
63cb7f29a9 huawei: quiet annoying log message 2011-01-03 14:42:44 -06:00
Dan Williams
9733746dc1 icera: add complete support for generic Icera devices
Implement connect, disconnect, and IP4 config stuff.

Also fix handling of Icera private data.  After creation we
need to use MM_MODEM_ICERA_GET_INTERFACE(m)->priv to get the
private data instead of just dereferencing the MMModemIcera,
for reasons that I don't know.  If this isn't done, data
gets silently corrupted because writes to the private data
are going into a random location in the object.  This a
side-effect of the slightly hack-ish way that MMModemIcera
is a GInterface with private data.
2011-01-01 18:11:14 -06:00
Dan Williams
af9adab9cd icera: convert to GInterface
We'll need to store some private data later for authentication, and
this makes it easier and clearer to access that private data.
2011-01-01 14:12:07 -06:00
Dan Williams
b8a74490b2 zte: Icera devices use static IP configuration 2011-01-01 13:41:22 -06:00
Dan Williams
9d777763a2 icera: consolidate Icera check code into utility lib 2011-01-01 12:23:14 -06:00