Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
7ae8ffe21b core: use hardware IDs as part of DeviceIdentifier
Pass the device's hardware IDs through modem creation and use them
when calculating the device's identifier.  Add a bunch of testcases
for real hardware to ensure we don't break the device ID in the
future unless we really want to.
2010-10-22 11:06:48 -05:00
Dan Williams
a9152f21ff huawei: fix potential double-free on error (rh #632516) 2010-10-06 23:09:06 -05:00
Dan Williams
a60216f5f4 huawei: use g_timeout_add_seconds() 2010-06-22 01:58:41 -07:00
Dan Williams
720e38aec0 core: move physical device checking into the manager
It turns out that the manager needs to know about the physical
device so we can prevent multiple plugins from claiming ports on
the same modem.
2010-03-30 14:50:40 -07:00
Dan Williams
fe69ab4210 huawei: ensure modem ports get claimed even if probe fails
Previously there was an issue where if the probe failed, because
we can't really probe huawei secondary ports for various reasons,
the Generic plugin would eventually come around and try actively
probing the secondary port after the Huawei plugin said "I don't
support this port".  Which resulted (potentially) in two MMModem
objects for the same device (one driven by Huawei, the other by
Generic).
2010-03-28 09:12:17 -07:00
Dan Williams
bcfb75d88d core: grab probed QCDM ports for plugins where they are useful 2010-03-23 01:36:00 -07:00
Dan Williams
f3721a5674 Merge remote branch 'origin/master' into qcdm 2010-03-08 20:01:22 -08:00
Dan Williams
29a67e9d89 huawei: unify GSM device probing
Using the USB product ID to direct certain modems to the generic
driver is wrong since even new modems like the E1550 are 0x1001
after the modeswitch.  Instead, lets assume that most current modes
use the Huawei-specific AT command set.
2010-03-08 18:04:14 -08:00
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
8bd10ebda2 huawei: sometimes reports BOOT with two LFs, not LF+CR 2009-11-24 13:04:21 -08:00
Dan Williams
958b9048a3 cdma: split 1x and EVDO registration states
Like UMTS vs. GSM, EVDO and 1x are separate networks and technologies
and have separate registration state.  You can even be roaming on
EVDO while in your home 1x network.  Handle that.
2009-10-12 10:06:53 -07:00
Dan Williams
81163b3032 huawei: add CDMA device subclass and implement registration state handling 2009-10-11 11:27:29 -07:00
Dan Williams
21391286fc huawei: rename MMModemHuawei -> MMModemHuaweiGsm 2009-10-11 11:19:00 -07:00
Dan Williams
52da9990ee plugins: allow plugins to more easily suggest port types
ZTE modems need to use udev rules to assign port type hints,
so generalize that and port all the plugins over to suggested
port types in the MMModem interface's grab_port() function.
2009-07-02 13:48:30 -04:00
Dan Williams
6077763d90 asynchronous and deferred port detection
Allow plugins to perform asynchronous port detection, and to defer port detection
until later.  This moves the prober bits into MMPluginBase so that all plugins
can take adavantage of it only when needed; the probing is not done at udev time.
Furthermore, plugins like Novatel can flip the secondary ports over the AT mode
through	deferred detection, by deferring the secondary ports until the main port
has been detected and AT$NWDMAT	has been sent.

This commit also finishes the port of the rest of the plugins (except mbm) over
to the new port detection methods and plugin API.
2009-06-28 14:05:05 -04:00
Dan Williams
05ab7b2a7c plugins: implement mm_plugin_base_get_device_ids()
We'll need it in more than one place, so make it generic.
2009-06-20 18:18:08 -04:00
Dan Williams
d5a43aa862 udev: modem port refactor; convert 'hso' to udev
Create a base MMPort class to handle both tty and net ports generically,
and move plugins over to that.  Also port the 'hso' plugin to udev.
2009-06-20 10:49:09 -04:00
Dan Williams
73e536c3c3 huawei: convert to udev and new API 2009-06-19 22:59:43 -04:00
Tambet Ingo
9b5425cdd9 Turn off carrier detection for all Huawei modems.
Find the monitoring device for Huawei modems by usb interface number.
2009-05-25 10:16:12 +03:00
Tambet Ingo
6018ff81ba Implement DCD disabling for serial base class.
Turn DCD detection off for certain Huawei modems that don't report it
correctly.
2009-01-13 11:27:41 +02:00
Tambet Ingo
6f9adb1980 Get the monitoring device from HAL. 2008-09-17 11:54:46 +03:00
Tambet Ingo
cc31458b18 Initial commit. 2008-07-31 09:43:00 +03:00