Commit Graph

14 Commits

Author SHA1 Message Date
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
49097b6de5 core: prefer CDMA capabilities over GSM for dual-mode devices (bgo #621815)
For devices like the UMW190 that appear to be dual-mode without needing a
firmware reload (unlike Gobis, which are dual-mode but require a reboot with
different firwmare) prefer CDMA capabilities since that's where these devices
will most likely be used more often.  In the end we'll need to change MM to
advertise a "capabilities" attribute on the modem class and modify devices
such that they can implement both GSM and CDMA semantics at the same time.
2010-09-21 14:56:47 -05: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
bcfb75d88d core: grab probed QCDM ports for plugins where they are useful 2010-03-23 01:36:00 -07: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
e5441115a2 bluetooth: recognize rfcomm devices
Two hacks here:
1) rfcomm ports don't have an easily accessible driver name, so we just
match the parent's subsystem to 'bluetooth' and use that

2) libgudev doesn't seem be be able to get the rfcomm device's device file,
which would normally be /dev/rfcommX.  Oh well, we don't use the device file
yet anyway
2009-10-02 22:31:16 -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
e3eef316a5 generic: remove unused code 2009-06-29 16:51:06 -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
88bdb5d29a plugin: add a base class to handle modem tracking 2009-06-19 11:55:31 -04:00
Dan Williams
832b43cab5 generic: misc fixes 2009-06-18 22:35:58 -04:00
Dan Williams
924814c101 udev: move device probing and detection to udev
Get rid of dependency on HAL, using libgudev instead.  Fix up the plugin API
to no longer use either HAL or udev defines, but let plugins use whatever
mechanism they want for getting more information out of the device given the
subsystem and device node name.

Modems are now defined as "master" devices which "own" a one or more ports.
A port could be a serial tty device or a network device or whatever.  The
plugin figures out whether it supports a given port or not and then assigns
it to a new or existing modem.  Modems now have a 'valid' property that
should be set to TRUE when the modem has enough ports to operate correctly.
For devices (ex. 'hso') that use a network device for data transfer, the
modem would need to grab at least one TTY and the network device associated
with that physical device to be 'valid'.

Also move the generic modem support code to a plugin like other modem plugins,
and change the I-support-this-device mechanism to return a number indicating
the level of support.  For example, the generic plugin would return a quite
low number if the device indicates via probing that it can do GSM or CDMA, but
a more specific plugin can indicate better support for the device, and thus
the more specific plugin would win control.
2009-06-18 14:25:30 -04:00