Commit Graph

661 Commits

Author SHA1 Message Date
Dan Williams
50ad39b28e core: protect against modem removal in critical callbacks (rh #553953)
There are more places to handle, but these are the most critical.  If
the modem is removed while a command is in-progress, the mm-callback-info
code will set info->modem to NULL.  Make sure we check for that in
callbacks and return a reasonable error.  Previous code would just
blindly forge ahead and die on a null dereference.
2010-01-19 03:18:10 -08:00
Dan Williams
73e10c77d3 cdma: prefer primary port unless it's connected 2010-01-18 23:59:54 -08:00
Dan Williams
b1992f903b probe: add note about Onda MT503HS (rh #551376) 2010-01-18 23:22:02 -08:00
Dan Williams
a1520465fd build: fix 'make clean' 2010-01-18 15:37:06 -08:00
Dan Williams
0cc9c1731c probe: add CPIN request during the probing process (bgo #604369)
Some devices (ZTE MF628) respond to everything except CPIN? with
ERROR unless the PIN has been sent.  Since no known CDMA devices
support AT+CPIN, assume that devices that return a CPIN response
are GSM devices.
2010-01-17 17:37:41 -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
a4fee864c2 release: bump version to 0.2.998 (0.3-rc2) 2010-01-12 09:29:36 -08:00
Dan Williams
eeb7807044 test: add Gobi COPS response testcase 2010-01-05 23:24:59 -06:00
Dan Williams
d3b5688d43 test: add Nokia 2720 COPS response testcase 2010-01-05 21:54:05 -06:00
Dan Williams
008c7e322d test: add Novatel XU870 and Option GT Ultra Express COPS response testcases 2010-01-05 21:47:40 -06:00
Dan Williams
f444533a74 test: add +COPS response testcases for E1550, MF622, and E226 2010-01-05 18:07:29 -06:00
Dan Williams
1faead71aa test: handle various missing operator strings if the modem doesn't report them 2010-01-05 18:07:12 -06:00
Dan Williams
c30f23e02c gsm: add testcase for invalid +COPS response 2010-01-05 15:03:06 -06:00
Dan Williams
3988f53d2e gsm: correctly parse Nokia N80 +COPS response 2010-01-05 14:57:30 -06:00
Dan Williams
216e49f8d8 gsm: split out +COPS response parsing and add testcases 2010-01-05 14:29:19 -06:00
Dan Williams
a06b3f20ca serial: prevent "hangs" by limiting EAGAIN retries on serial writes
MM would appear to hang sometimes when writing to serial devices but
in reality was just retrying the write too many times.  Make the
retry limit time-based so MM doesn't hang but times the attempt out
instead.
2010-01-01 20:52:15 -06:00
Dan Williams
5eed83cd75 gsm: ensure registration state is reset when disabling the modem 2009-12-23 02:19:26 -08:00
Dan Williams
b94627572f core: implement a PropertiesChanged signal for the MMModem class
At the moment only the Enabled property is exported.
2009-12-22 16:58:23 -08:00
Dan Williams
710986bd4b core: add Enabled property to org.freedesktop.ModemManager.Modem interface 2009-12-21 11:37:36 -08:00
Dan Williams
71cbcb834c build: don't require pppd headers to build
If they're not there, just ignore them and don't build the PPP-enabled
bits of the test tool.
2009-12-21 11:18:38 -08:00
Dan Williams
791faca8fa introspection: add missing mm-modem-gsm.xml 2009-12-21 11:17:59 -08:00
Dan Williams
36d8d328c7 test: add support for static IP configured devices (ie, 'hso') 2009-12-21 10:02:57 -08:00
Dan Williams
a8fc7ecd77 test: add ability to drive ppp for connection tests 2009-12-20 00:17:12 -08:00
Dan Williams
87ee623923 test: fix build warning 2009-12-20 00:16:45 -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
3ad172d150 cdma: fix quality parsing if modem doesn't prepend +CSQ:
Which some Huawei modems (EC168C) don't do.
2009-12-16 14:34:29 -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
eaf167bebd test: argument parsing and connect improvements 2009-12-11 12:53:50 -08:00
Dan Williams
41ea9a0e4b cdma: try +CSQ? if CSQ fails
Some modems want one, some modems want the other.  Try both.
2009-12-11 10:48:23 -08:00
Dan Williams
3d852435c6 cdma: accept SID 0 in some cases
Most AT command references allow modems to report SID 0, even though
SID 0 is not a valid SID and is not assigned to any CDMA network.
Some Sierra 5725 cards have been seen to report valid class and band
from the +CSS response but a SID 0.  Accept SID 0 when at least one
other element of the +CSS response indicates that the modem has service.
Otherwise, report "no service" as before.
2009-12-11 09:30:51 -08:00
Dan Williams
07114d4f43 release: bump version to 0.2.997 2009-12-07 22:07:58 -08:00
Dan Williams
dd057d28e4 Merge commit 'origin/states' 2009-12-07 22:04:28 -08:00
Dan Williams
a9e0624426 gsm: handle different +COPS response behavior
Some modems delay the +COPS response until registration is complete,
others return right away.  Make sure that both behaviors work
correctly.
2009-12-07 18:40:04 -08:00
Dan Williams
5a4a9a6239 core: add refcounts to MMCallbackInfo 2009-12-07 18:39:18 -08:00
Dan Williams
1157b59a18 core: pretty-print state changes 2009-12-02 14:59:26 -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
872fe9bf6b test: give some time before disconnecting 2009-12-02 14:42:58 -08:00
Dan Williams
bb6f997fb8 gsm: update for new states and state flow fixes 2009-12-01 16:46:23 -08:00
Dan Williams
7f1951fec8 core: fix ordering of DISABLING and DISABLED states 2009-12-01 16:44:07 -08:00
Dan Williams
bf13b4698f cdma: reset previous state if disconnect failed 2009-12-01 16:33:44 -08:00
Dan Williams
c169396c1b cdma: correctly handle state update after disconnection
We only want to ignore connected/connecting/disconnecting states
and update the state based on registration for unsolicited
registration changes.  Basically, when disconnecting, the modem
will be in DISCONNECTING state, but after the disconnect has finished
we want to update the modem's state based on the current
registration status.  But the previous check for >= DISCONNECTING
would prevent that from happening, so we need a slightly more specific
check in update_enabled_state().
2009-12-01 16:19:27 -08:00
Dan Williams
d438012f63 cdma: s/GSM/CDMA
Oops.
2009-12-01 16:01:20 -08:00
Dan Williams
02c7db7fcf cdma: handle interim enabling/disabling states better
Have to fall back to the previous state if the enable/disable
operation fails since we cannot assume anything about the new
modem state when a failure occurs.
2009-12-01 15:58:11 -08:00
Dan Williams
a295afdd2d cdma: update for new modem states and make connect actually work 2009-12-01 15:39:06 -08:00