Commit Graph

899 Commits

Author SHA1 Message Date
Dan Williams
a8c7bba19e serial: refactor MMSerialPort into a base class and an AT-capable serial port
For QCDM devices we want most of what MMSerialPort does, but not
the AT command handling stuff since the commands and responses
aren't AT commands nor are they even strings.  So convert everything
that MMSerialPort does into a GByteArray, and let MMAtSerialPort
handle the conversion to strings when necessary.
2010-02-20 14:55:10 -08:00
Dan Williams
dcedb5273c mbm: add new C3607w device ID 2010-02-19 11:34:47 -08:00
Dan Williams
1a7be4a379 huawei: ignore CSS on EVDO-capable modems (rh #553199)
Since CSS doesn't reliably determine EVDO-only registration state.
2010-02-11 08:12:41 -08:00
Dan Williams
953095466d sierra: ignore +PACSP0 on GSM devices 2010-02-09 22:14:06 -08:00
Dan Williams
33c63a6681 zte: quite ZUSIMR messages for PIN-enabled devices too
Normally this would get done by the prober, but if the device
has a PIN enabled it'll reject almost all commands so the +CPMS?
in the prober will fail.  Thus we have to do it after we've unlocked
the device.
2010-02-08 12:37:06 -08:00
Dan Williams
9eb376d782 longcheer: add more port tags 2010-02-03 18:37:24 -08:00
Dan Williams
8e3406bf74 longcheer: tag ChinaBird PL68 (pid 0x9000) ports (bgo #608668) 2010-02-03 15:19:36 -08:00
Dan Williams
053db1d27c misc: fix FSF address in license headers 2010-01-22 14:11:24 -08:00
Dan Williams
e984014404 anydata: whitespace cleanup 2010-01-19 13:56:53 -08:00
Dan Williams
e4439d399a anydata: capture some unsolicited messages 2010-01-19 13:56:07 -08:00
Dan Williams
7fc53d29cc anydata: remove unused code 2010-01-19 13:48:21 -08:00
Dan Williams
f6a09050af cdma: allow plugins to override AT+CSS? during registration checking (rh #547294)
Some modems key the AT+CSS? response off their 1X state, so if the
modem has EVDO service but no 1X service, AT+CSS? will provide incorrect
registration state information and the registration checking will
end too early.  Allow modems that can handle more specific registration
checking to skip the AT+CSS? part.
2010-01-19 13:46:07 -08:00
Dan Williams
19c988d92b anydata: add plugin for AnyData CDMA devices (rh #547294) 2010-01-19 13:19:55 -08:00
Dan Williams
f4d2e30525 huawei-cdma: robustify SYSINFO parsing
Shouldn't happen since the number of matches was already
verified, but doesn't hurt to make sure we don't pass NULL
to strtol().
2010-01-19 12:27:54 -08:00
Dan Williams
82eecfca92 sierra: prefer primary port for status 2010-01-19 11:53:45 -08:00
Dan Williams
73e10c77d3 cdma: prefer primary port unless it's connected 2010-01-18 23:59:54 -08:00
Dan Williams
4cb58b8f5f zte: ignore SIM Build Main Menu requests (rh #551376) 2010-01-16 15:59:29 -08:00
Dan Williams
23727a5b10 longcheer: install udev rules 2010-01-15 11:48:35 -08:00
Dan Williams
621d9e8751 longcheer: don't try to use untagged ports on known devices 2010-01-15 11:45:43 -08:00
Dan Williams
471d8a70a9 longcheer: new plugin for Longcheer (Alcatel etc) devices (bgo #606550)
Anything with vendor ID 0x1c9e really; like Alcatel X020, X030,
X060s, etc.  Longcheer appears to make the actual hardware that all
the devices with vendor ID 0x1c9e use.  You'll see it in .INF files
with "CMLONG" as part of the USB interface definition.

If the ports are not correctly detected, we need to get the driver's
.INF files to determine what the ports should be, and add them to
the udev rules file.
2010-01-15 01:37:26 -08:00
Dan Williams
db7214c202 sierra: fix CDMA registration detection in some cases
It turns out that "Modem is [NOT] registered" is not a good indicator
of whether the card has service or not; instead some of the AT!STATUS
response is needed to really determine registration state or not.
2009-12-18 19:44:48 -08:00
Dan Williams
8d42094608 zte: handle unsolicited messages during probe
This implements the same fixes that NetworkManager's 0.7 branch
implemented in commits f38ad328acfdc6ce29dd1380602c546b064161ae and
1235f71b20c92cded4abd976ccc5010649aae1a0.  Many ZTE devices will
spam the port with messages about waiting voicemail/SMS which buffer
up and cause the device to eventually crash if not suppressed.
2009-12-16 15:26:05 -08:00
Dan Williams
30a2a20207 sierra: use at!pcstate on CDMA modems for power control
at!pcstate is what Sierra CDMA modems use instead of AT+CFUN for
powering the radio on and off.  It doesn't turn the modem off completely
like AT+CFUN=0 does for many GSM devices though, so it's quite a lot nicer.
2009-12-16 14:20:24 -08:00
Dan Williams
2fc0c039e6 option: always pick the right data port
This is the MM equivalent of NM commit 9d7f5b3d084eee2ccfff721c4beca3e3f34bdc50;
Genuine Option NV devices are always supposed to use USB interface 0 as
the modem/data port, per mail with Option engineers.  Only this port
will emit responses to dialing commands.
2009-12-11 16:30:25 -08:00
Dan Williams
488baa1330 mbm: ensure various unsolicited responses are turned off when disabling
If the modem wasn't connected when disable is called, the generic GSM
code doesn't need to shut anything down and thus closes the serial
port immediately.  That means the mbm plugin's CREG=0 and CMER=0 won't
get sent because the port is closed.  mbm needs to ensure that it's
commands actually get sent to the modem by really sending them and
waiting for the response before chaining up to the parent's disable.
2009-12-11 13:19:21 -08:00
Dan Williams
5bdabaabec gsm: implement enable/connecting/disconnecting state handling
And consolidate generic port enable code in one place since pretty
much every modem needs that.
2009-12-02 14:43:09 -08:00
Dan Williams
bb6f997fb8 gsm: update for new states and state flow fixes 2009-12-01 16:46:23 -08:00
Dan Williams
76facd6891 mbm: update state after enabling the device 2009-12-01 12:58:25 -08:00
Dan Williams
b46ac89ff6 zte: add missing ZTE device aux port tags 2009-12-01 10:02:47 -08:00
Dan Williams
c87b4dcc77 zte: add additional device port tags
Don't know the aux port yet but we'll figure that out;
and in the mean time the autoprobing should tag the
port as a secondary port anyway.
2009-11-30 17:42:37 -08:00
Dan Williams
f205c814b5 hso: ensure authentication works again after auth errors 2009-11-30 09:47:39 -08:00
Dan Williams
028c6a5e4e hso: fix up connection issues and error ignorance
Should have ignored errors when cleaning up old contexts that
may or may not exist.  Rename hso_disable() to something more
appropriate since it's actually part of the enable/connect path,
not the disable path.
2009-11-29 22:45:28 -08:00
Dan Williams
c8fdb592e3 hso: send authentication info correctly for Icera-based Option modems
Icera-based modems use AT_OPDPP instead of AT$QCPDPP.
2009-11-29 18:58:56 -08:00
Dan Williams
8bd10ebda2 huawei: sometimes reports BOOT with two LFs, not LF+CR 2009-11-24 13:04:21 -08:00
Dan Williams
3218b94376 cdma: handle 1x and EVDO quality separately 2009-11-24 12:57:44 -08:00
Dan Williams
ac9cae2bc8 zte: retry init strings once on timeout
Some ZTE devices (MF626 for example) will emit the ZPASR unsolicited
response right after MM opens the port, and they will just throw the
init string away. So retry the init string once; the ZTE devices will
see it the second time and continue as normal.

This is the MM version of NM commit 861e9689c513cbd61fa75205a681a69d4ba8236c
2009-11-24 12:16:14 -08:00
Dan Williams
9e92bceb07 hso: consolidate PDP context activate/deactivate operations
And rename the function to make it clearer.  disable() wasn't using
the common activate/deactivate code so switch it to do so.
2009-11-24 00:19:27 -08:00
Dan Williams
e5b5c83394 hso: disconnect the PDP context that was active (if any)
Instead of always disconnecting context #1.
2009-11-23 23:32:01 -08:00
Torgny Johansson
74f679acdb mbm: add USB IDs for C3607w 2009-11-04 13:11:23 -08:00
Dan Williams
678f07a1e2 gobi: don't override generic init commands
The default ones seem to work just fine.
2009-10-30 16:16:36 -07:00
Dan Williams
49b5ffd076 core: use G_DEFINE_TYPE_* instead of rolling our own
Use the macro; save some trees.
2009-10-26 17:56:48 -07:00
Jeroen Elebaut
6bc4f0ae8c hso: handle OWANCALL response better 2009-10-16 14:41:12 -07:00
Alexander Sack
acd785bfa4 mbm: use generic get_signal_quality implementation rather than our own CIND based one 2009-10-15 01:24:24 +02:00
Alexander Sack
139741d140 mbm: implement AT*ENAP polling 2009-10-15 01:22:20 +02:00
Alexander Sack
6885505dea mbm: flip order in which we send enap/e2nap to modem to make f3507g happier 2009-10-15 01:22:14 +02:00
Alexander Sack
6ddd97e81c mbm: send ENAP=0 on init to set modem back to sane state and ignore CIND errors 2009-10-15 01:22:00 +02:00
Dan Williams
ea29dc8044 mbm: fix disable after 3b19a85727
C & P error in enable/disable split.
2009-10-14 13:36:59 -07:00
Alexander Sack
0bcdf6a7c1 nokia: fix class property overrides to stop modemmanager from sending AT+CFUN (lp:450256) 2009-10-13 15:14:14 +02:00
Dan Williams
6f65ad7682 sierra: handle non-EVDO roaming indication for older cards
Like the AC580
2009-10-12 11:45:20 -07:00
Dan Williams
942b5ff826 sierra: add CDMA device subclass and implement registration state handling 2009-10-12 10:56:53 -07:00