aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem.c
AgeCommit message (Collapse)Author
2012-03-16build: remove obsolete filesAleksander Morgado
This will very likely create lots of conflicts until the branch gets merged into master, but anyway...
2012-03-16Revert "core: avoid using DBusGMethodInvocation in auth API"Aleksander Morgado
This reverts commit 013fd179f458d87bba9fd7657ffe1bd90169f231. We will start using GDBus-only based code from now on.
2012-03-15core: avoid using DBusGMethodInvocation in auth APIAleksander Morgado
While porting to GDBus, use opaque pointers. This allows us to include either a DBusGMethodInvocation or a GDBusMethodInvocation in the 'context' pointer. Once fully ported to GDBus, we can safely change it back to make the context be a GDBusMethodInvocation.
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.
2012-02-17modem: new property to allow specifying longer timeouts when configuring IPAleksander Morgado
This IpTimeout property will be read by NetworkManager, and used as the time to wait for pppd to establish the IP configuration.
2012-02-07core: plug leaks when passing GValueArrays to dbus_g_method_return()Aleksander Morgado
The ownership of the GValueArray is not transferred.
2011-11-16core: keep track of all PIN retry countsEric Shienbrood
Added a PinRetryCounts property on org.freedesktop.ModemManager.Modem. This is dictionary that records the number of PIN tries remaining for each of the possible PIN code types for which the modem is capable of reporting the count. Also, these counts are kept up to date across ChangePin and EnablePin operations, not just when an unlock is attempted.
2011-08-19api: use common ModemManager.h for API, core and pluginsAleksander Morgado
2011-06-05core, plugins: if modem removed don't process responseAleksander Morgado
We try to avoid a memory leak when info->error is reset, as well as a second re-schedule of the info.
2011-03-31core: make modem StateChanged signal consistent with API documentationJason Glasgow
The new and old state arguments were flipped.
2011-01-23core: rework loggingDan Williams
Make it more flexible, add logging to a file, and absolute and relative timestamps.
2011-01-14core: add modem reset/power-cycle commandDan Williams
Based on a patch by Elly Jones from Google.
2010-11-29core: allow setting IP method after constructionDan Williams
Some modems might not know their IP method until after the modem object has been created.
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-21core: add DeviceIdentifier propertyDan Williams
This is computed before any PIN is entered, and thus before we can usually get IMEI or MEID/ESN out of the device in many cases. It's therefore not the same as EquipmentIdentifier. This is intended to be used by UI programs for matching devices with PIN numbers for automatic unlocking. While the PIN number is actually *SIM* specific, no modems allow access to the IMSI before the PIN is entered, and thus we cannot actually match the PIN with the SIM. The device ID is the next best thing we can use and should allow auto unlocking in most cases.
2010-06-22core: add FactoryReset methodDavid Rochberg
Cleanups and authorization checks by me (dcbw).
2010-06-22core: EquipmentIdentity -> EquipmentIdentifierDan Williams
2010-06-22core: add modem EquipmentIdentity property to report IMEI/ESN/MEIDTorgny Johansson
2010-06-22gsm: add UnlockRetries propertyTorgny Johansson
Which reports the # of attempts remaining for the current PIN required by the device or SIM. Some modifications/cleanups by dcbw.
2010-05-07core: fix memory leaksDan Williams
Since MMModem is an interface and doesn't store stuff like the modem's physdev internally (since it's an interface) these things are handled via GObject properties. And since g_object_get() returns allocated values, we need to free the returned value from mm_modem_get_device() after we're done with it.
2010-04-29core: timestamp debug statementsDan Williams
2010-03-13core: move charset enum/string conversion to it's own fileDan Williams
2010-03-13gsm: add character set get/set supportDan Williams
2010-02-27core: implement optional PolicyKit-based authenticationDan Williams
2010-02-27core: simply authentication request objectsDan Williams
2010-02-26core: add authorization providers and optional PolicyKit supportDan Williams
When the support is complete, use --with-polkit to enable PolicyKit support. It's not there yet, but this commit adds an authorization provider framework which will be extended to allow hooking into PolicyKit.
2010-01-31core: add an UnlockRequired property that provides lock status (bgo #604551)Norbert Frese
Clients can check the property to determine lock/unlock status and thus unlock the modem before trying to connect if required. Bits of the patch by dcbw (see the bug).
2010-01-19core: fix mm_modem_check_removed() to return errors correctlyDan Williams
Make sure all errors actually get returned, not just removal errors.
2010-01-19core: protect against modem removal in critical callbacks (rh #553953)Dan Williams
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.
2009-12-21core: add Enabled property to org.freedesktop.ModemManager.Modem interfaceDan Williams
2009-12-02core: pretty-print state changesDan Williams
2009-12-01core: fix ordering of DISABLING and DISABLED statesDan Williams
2009-12-01core: use modem states to protect against double operationsDan Williams
2009-12-01core: schedule enabled/disabled callbacks to avoid infinite recursionDan Williams
2009-10-27core: initial implementation of modem statesDan Williams
Needs more work for GSM, but should be reasonably complete for CDMA.
2009-09-23core: split generic modem enable/disable operationsDan Williams
2009-08-06license: add license header to all files and set copyright based on git logAlexander Sack
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-19modem: move GetInfo from GsmCard -> Modem interfaceDan Williams
It's generic, everything implements some variant of +GMM, +GMR, and +GMI.
2009-06-18udev: move device probing and detection to udevDan Williams
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-02-06Extend org.freedesktop.ModemManager.Modem interface.Tambet Ingo
* Add IpMethod property with known values ppp (default), static, DHCP. * Rename DataDevice property to Device. * Add GetIP4Config method. It should be implemented only when IpMethod==static. * Update org.freedesktop.ModemManager.Modem.Gsm.Sms interface based on Pablo Martí Gamboa's suggestions. * Adjust MBM and HSO interfaces to take advantage of the generic Modem interface.
2008-12-09Lots of random fixes:Tambet Ingo
Rework the MMCallbackInfo callback invocation. Always use g_error_literal() where it makes sense. Replace sleep() calls, with timeouts to not block the whole MM.
2008-09-11Rewrite serial device communications.Tambet Ingo
Instead of vague "send something, wait something" the responses are now analyzed by (overridable) parsers. Makes all the modem implementations much easier since each caller knows without any code whether the call succeeded or failed. Another thing that makes modem code simpler (and the whole thing more robust), is the queueing of sent commands. Each queued command has a command and a callback which is quaranteed to get called, even if sending failed. Define and implement error reporting.
2008-08-21Implement per modem type DBus interfaces.Tambet Ingo
A major code reorganization.
2008-07-31Initial commit.Tambet Ingo