aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-plugin-huawei.c
AgeCommit message (Collapse)Author
2012-08-06huawei: plugin fully portedAleksander Morgado
2012-02-28core: rework port grabbing and organizationDan Williams
Make port roles more flexible. We have modems that do PPP on interfaces other than the primary interface, and that wasn't possible with the old code. So clean up all that logic and move the port organization code into the core so we can reduce code in the plugins. In the new world order, the plugins say whether the port is a QCDM port, an AT port, or ignored. If it's an AT port the plugins get to tag it as primary, secondary, or PPP, or any combination of the 3. This allows for modems where PPP should really be done on the secondary port (Huawei E220, Sierra devices) so that the primary port stays open for command and status. Modem subclasses no longer get asked to handle port grabbing themselves. Instead, that's now done by the generic classes (MMGenericCdma and MMGenericGsm) and the plugins are notified when a port is grabbed so they can add unsolicited response handlers for it. After all ports are grabbed by the generic classes, they get "organized", which assigns various ports to the roles of PRIMARY, SECONDARY, DATA, and QCDM based on specific rules and hints that the plugin provided (which are expressed as MMAtPortFlags). The plugins then have a chance to perform fixups on the primary port if they choose. The plugin code is responsible for determining the port hints (ie MMAtPortFlags) at probe time, instead of having a combination of the plugin and the modem class do the job. This simplifies things greatly for the plugins at the expense of more complicated logic in the core.
2011-10-12huawei: Gobi devices should be driven by gobi not huawei (bgo #660998)Dan Williams
2011-06-06plugins: propagate cached probing result to supports taskAleksander Morgado
We need to ensure that the supports task always has the results of the probing, no matter if the probing was just launched by the plugin grabbing the port, or by a previous plugin. We do this during supports_port(), by propagating to the supports task any possible previously cached probing results.
2011-06-05core: allow plugins to stop probing and not support a modemDan Williams
Previously plugins could only stop probing, *or* stop probing and indicate support for a device. For the Alcatel X200/X060s debacle we need to stop probing and indicate that the plugin does not support the device at all.
2011-04-27huawei: rework probing and detectionDan Williams
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-08serial: allow plugins to specify probe-time send_delayDan Williams
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-01-23core: rework loggingDan Williams
Make it more flexible, add logging to a file, and absolute and relative timestamps.
2010-10-22core: use hardware IDs as part of DeviceIdentifierDan Williams
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-06huawei: fix potential double-free on error (rh #632516)Dan Williams
2010-06-22huawei: use g_timeout_add_seconds()Dan Williams
2010-03-30core: move physical device checking into the managerDan Williams
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-28huawei: ensure modem ports get claimed even if probe failsDan Williams
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-23core: grab probed QCDM ports for plugins where they are usefulDan Williams
2010-03-08Merge remote branch 'origin/master' into qcdmDan Williams
2010-03-08huawei: unify GSM device probingDan Williams
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-02-20serial: refactor MMSerialPort into a base class and an AT-capable serial portDan Williams
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.
2009-11-24huawei: sometimes reports BOOT with two LFs, not LF+CRDan Williams
2009-10-12cdma: split 1x and EVDO registration statesDan Williams
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-11huawei: add CDMA device subclass and implement registration state handlingDan Williams
2009-10-11huawei: rename MMModemHuawei -> MMModemHuaweiGsmDan Williams
2009-07-02plugins: allow plugins to more easily suggest port typesDan Williams
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-06-28asynchronous and deferred port detectionDan Williams
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-20plugins: implement mm_plugin_base_get_device_ids()Dan Williams
We'll need it in more than one place, so make it generic.
2009-06-20udev: modem port refactor; convert 'hso' to udevDan Williams
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-19huawei: convert to udev and new APIDan Williams
2009-05-25Turn off carrier detection for all Huawei modems.Tambet Ingo
Find the monitoring device for Huawei modems by usb interface number.
2009-01-13Implement DCD disabling for serial base class.Tambet Ingo
Turn DCD detection off for certain Huawei modems that don't report it correctly.
2008-09-17Get the monitoring device from HAL.Tambet Ingo
2008-07-31Initial commit.Tambet Ingo