Commit Graph
100 Commits
Author SHA1 Message Date
Aleksander Morgado ff0136ed04 sim: load OperatorName during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado e3e3b32b0a sim: load OperatorIdentifier during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado bdd1d23ed2 sim: load IMSI during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado 87823387f4 sim: load SIM Identifier during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado e40d32ac94 core: new MMSim object, inherits from MmGdbusSim 2012-03-15 14:14:23 +01:00
Aleksander Morgado 1453f352bc iface-modem: relaunch init when being unlocked 2012-03-15 14:14:23 +01:00
Aleksander Morgado ca15a10629 iface-modem: new `State' property, bound to the one in the MmGDbusModem skeleton 2012-03-15 14:14:23 +01:00
Aleksander Morgado 48babcf976 iface-modem: load SupportedModes' and SupportedBands' during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado 7a20ad46d8 iface-modem: load UnlockRequired' and UnlockRetries' during init
And also allow being loaded upon user request, with
`mm_iface_modem_unlock_check()'.
2012-03-15 14:14:23 +01:00
Aleksander Morgado 9852433095 iface-modem: load EquipmentIdentifier' and DeviceIdentifier' during init 2012-03-15 14:14:22 +01:00
Aleksander Morgado 7a9b0d9fac iface-modem: load Manufacturer', Model' and `Revision' during init 2012-03-15 14:14:22 +01:00
Aleksander Morgado b35be61415 iface-modem: load MaxBearers' and MaxActiveBearers' during init 2012-03-15 14:14:22 +01:00
Aleksander Morgado b6539e9e13 iface-modem: load ModemCapabilities' and CurrentCapabilities' during init
When the interface gets initialized, start loading modem and current
capabilities.
2012-03-15 14:14:22 +01:00
Aleksander Morgado 88e6b0e4e6 iface-modem: set Device', Driver' and `Plugin' during init
Values taken from the MMBaseModem object, which are not expected to change
during the lifetime of the Modem object.
2012-03-15 14:14:22 +01:00
Aleksander Morgado 9e7cd2a345 core: new MMIfaceModem interface
This interface controls the availability of the DBus Modem interface, and
implements the actions that may be performed in the interface.
2012-03-15 14:14:22 +01:00
Aleksander Morgado 8069c751a0 base-modem: new enable()' and disable()' async methods
Users will be able to enable or disable modems using the DBus interface. We will
chain up the `Enable(boolean)' call from the DBus interface to these new methods
in the base modem class.
2012-03-15 14:14:22 +01:00
Aleksander Morgado b00c409978 base-modem: new virtual initialize() method
Whenever the first AT port is grabbed, we launch the initialize() method, which
must have been implemented by the corresponding modem subclass.
2012-03-15 14:14:22 +01:00
Aleksander Morgado 677e04be95 base-modem: new property to keep the Connection object 2012-03-15 14:14:22 +01:00
Aleksander Morgado d32b006cce base-modem: new properties for vendor and product IDs
These will be set during modem object creation.
2012-03-15 14:14:22 +01:00
Aleksander Morgado d5a0efc659 base-modem: getters for primary/secondary/qcdm ports 2012-03-15 14:14:22 +01:00
Aleksander Morgado 4a096c8c56 base-modem: set v1 serial parser always
CDMA modems used to use the v1_e1 serial parser; but we'll try to setup a common
one in all modems.
2012-03-15 14:14:22 +01:00
Aleksander Morgado 0d53a72d41 base-modem: new properties to handle Device, Driver and Plugin
They will be set when constructing the object.
2012-03-15 14:14:22 +01:00
Aleksander Morgado b6cb5bd6da base-modem: ported all port grabbing/releasing logic to the base object 2012-03-15 14:14:22 +01:00
Aleksander Morgado f39923c97d base-modem: expect a GDBusMethodInvocation as context of the auth request 2012-03-15 14:14:22 +01:00
Aleksander Morgado 9a72ac80d0 core: new MMBaseModem abstract type
Basically, a replacement of the MMModemBase type, being prepared to handle
multimode devices.

This object derives from a MmGdbusObjectSkeleton, which makes it suitable to be
controlled within the GDBusObjectManagerServer.
2012-03-15 14:14:21 +01:00
Aleksander Morgado f15daaf587 core: new AT command and sequence processors
This setup, allows:
 - Running a single command and processing its result.
 - Running a set of N commands, providing a global result after all have
   been executed.
 - Running a set of N commands out of M (N<M), where the global result is
   obtained without having executed all configured commands. This is useful
   when probing, for example.
2012-03-15 14:14:21 +01:00
Aleksander Morgado 07640b0c74 manager: make it export the Object Manager interface 2012-03-15 14:14:21 +01:00
Aleksander Morgado 0cc17ed82f manager: let it be initable
The MMManager object creation may fail due to environment reasons (i.e. no
plugins found, or problems exporting DBus interfaces), so we can use the
initable interface to properly handle those situations.
2012-03-15 14:14:21 +01:00
Aleksander Morgado bc78453d79 manager: keep the GDBus connection reference in a 'connection' property 2012-03-15 14:14:21 +01:00
Aleksander Morgado 68fcfa4530 manager: use G_TYPE_INSTANCE_GET_PRIVATE() just to create the private struct
A new 'priv' pointer is added in the MMManager struct, which will contain the
address of the private structure.
2012-03-15 14:14:21 +01:00
Aleksander Morgado 60c7f7d9ee core: implement the Manager1 DBus interface, based on GDBus
The MMManager object now derives from the gdbus-codegen-generated
MmGdbusOrgFreedesktopModemManager1Skeleton object, and implements the handlers
for the SetLogging() and ScanDevices() DBus methods.

The main program is also modified to be based on GDBus.
2012-03-15 14:14:21 +01:00
Aleksander Morgado a6d9bad4bd plugin-base: properly handle Core errors 2012-03-15 14:14:21 +01:00
Aleksander Morgado 7b687b4aae build: temporarily disable compilation of plugins 2012-03-15 14:14:21 +01:00
Aleksander Morgado c112e19896 port-probe: properly handle Core errors
Fixes compilation of the Port Probe object.
2012-03-15 14:14:20 +01:00
Aleksander Morgado 27e1d97aca port-probe: new cache of Port Probe results
Whenever a plugin has probed for some information in a given port, that data
should be available for any other plugin wanting it during its own probing
process. This new cache of Port Probe results allows to easily retrieve the
already probed information.
2012-03-15 14:14:20 +01:00
Aleksander Morgado a3ace206b0 port-probe: add comment explaining the probing process flow 2012-03-15 14:14:20 +01:00
Aleksander Morgado fa3fa38e0d port-probe: allow providing custom initialization AT commands 2012-03-15 14:14:20 +01:00
Aleksander Morgado 610bffc4e8 port-probe: enable probing for QCDM support 2012-03-15 14:14:20 +01:00
Aleksander Morgado b73fb8e8f2 port-probe: enable probing for Product 2012-03-15 14:14:20 +01:00
Aleksander Morgado 1f9fd9e0be port-probe: enable probing for Vendor 2012-03-15 14:14:20 +01:00
Aleksander Morgado 05f8493ee7 port-probe: enable probing for Capabilities 2012-03-15 14:14:20 +01:00
Aleksander Morgado 6816c2e61d port-probe: enable probing for AT support
We will initially probe for AT support in the port.
2012-03-15 14:14:20 +01:00
Aleksander Morgado d7238403c4 port-probe: new type to define commands used during probing
The new `MMPortProbeAtCommand' type defines what command will be sent to the
serial AT port, and also a response processor method to parse the string
returned by the port.

The response processor gets as input either the text reply string or an error,
and it should give as output either a GValue (type depends on the probing kind
being done) or a new error (which will force the whole probing process to be
aborted.
2012-03-15 14:14:20 +01:00
Aleksander Morgado f7b1d99fa0 port-probe: allow cancelling the probing operation
The new `mm_port_probe_cancel()' will cancel the probing operation currently in
progress, if any. Note that we don't need to pass any argument to specify which
operation to cancel, as there can only be one.
2012-03-15 14:14:20 +01:00
Aleksander Morgado 1e79a2d292 build: install DBus service and data files for the new API 2012-03-15 14:14:19 +01:00
Aleksander Morgado 8d97538c72 build: setup all data (polkit, icon, dbus...) in the same `data' directory
Also fixed dist when not using polkit, the icon was no longer included in the
tarball.
2012-03-15 14:14:19 +01:00
Aleksander Morgado 6b69605633 build: chain up new 0.6 API and link against libmm-common
Also removed the MMSerialError implementation from `src/mm-errors.[h|c]', as it
is now included in the new `include/ModemManager-errors.h' header file. All the
other enums and errors without clashing names will be ported afterwards to the
new base code.
2012-03-15 14:14:19 +01:00
Aleksander Morgado 49bbaf8e31 build: disable autogeneration of the 0.5 API header file
But keep it around as a static file, while we do the migration to the new
interface.
2012-03-15 14:14:19 +01:00
Aleksander Morgado 3b976c4399 docs: added new man page for the modem-manager daemon 2012-03-15 14:14:19 +01:00
Aleksander Morgado 09f40c8369 docs: setup generation of gtk-doc based DBus API documentation
It includes gdbus-codegen generated API documentation, plus the common Enums,
Flags and Errors, which will also be used in libmm-glib.
2012-03-15 14:14:19 +01:00
Aleksander Morgado a57c3bcf36 docs: remove generation of previous DBus API documentation 2012-03-15 14:14:18 +01:00
Aleksander Morgado 23367c7186 libmm-common: include Errors type information
The code to handle the Errors type information is automatically built with
`glib-mkenums' and the new templates kept under `build-aux'.
2012-03-15 14:14:18 +01:00
Aleksander Morgado 0e9ed6e5fe libmm-common: include Enums and Flags type information
The code to handle the Enums and Flags type information is automatically built
with `glib-mkenums' and the new templates kept under `build-aux'.

Note: We currently skip the type information of `MMModemBand'. GFlagsValue
can hold only 32-bit types, and we're working with a 64-bit flag here.
See: https://bugzilla.gnome.org/show_bug.cgi?id=663054
2012-03-15 14:14:18 +01:00
Aleksander Morgado ade484826c libmm-common: setup new library, with the gdbus-codegen generated code
This library will not (probably) be installable, but will share the GDBus
and new Enum/Flag/Error type support between the core daemon and the new
libmm-glib library.
2012-03-15 14:14:18 +01:00
Aleksander Morgado da99e8ddad build: use common CPPFLAGS and LDFLAGS for all plugins
Also include $(top_srcdir)/generated and $(top_builddir)/generated in the
common preprocessor flags.
2012-03-15 14:14:18 +01:00
Aleksander Morgado bb7311f27c build: improve project bootstrapping
Align autogen.sh with the one in NM:
  * Just calling autoreconf once
  * Using autopoint from GNU gettext
  * Enabling the use of NOCONFIGURE
2012-03-15 14:14:18 +01:00
Aleksander Morgado 7e0f016c25 build: improve configure output report 2012-03-15 14:14:18 +01:00
Aleksander Morgado 917a13217a build: avoid using -Wfloat-equal compilation option
In order to compile code generated by gdbus-codegen.
2012-03-15 14:14:18 +01:00
Aleksander Morgado bc8010f792 build: avoid using -Wshadow compilation option
In order to compile code generated by gdbus-codegen.
2012-03-15 14:14:18 +01:00
Aleksander Morgado dbb06b6246 build: require GLib and GIO >= 2.30
gdbus-codegen is first available in the stable 2.30 release of GLib, see
http://mail.gnome.org/archives/gtk-devel-list/2011-September/msg00218.html

GIO and GIO-Unix are now required during the build.
2012-03-15 14:14:18 +01:00
Aleksander Morgado b5a1c38cc4 api: new `include/ModemManager1.h' as main header of the new API
Filename is temporary as we keep the old `include/ModemManager.h' around during
the transition to the new codebase.
2012-03-15 14:14:18 +01:00
Aleksander Morgado ff5ea7b76a build: setup autogeneration of names header for the new API
The `include/ModemManager-names.h' autogenerated header includes the list of
Interface, Method, Signal and Property names defined in the DBus API.
2012-03-15 14:14:18 +01:00
Aleksander Morgado 365b906a3e build: setup header generator in its own include/Makefile
Also move helper files to the new `build-aux' directory.
2012-03-15 14:14:18 +01:00
Aleksander Morgado 4643dca4a2 api,errors: implement all errors from the new API
Errors that will/may be reported via DBus are defined in the public interface
header.
2012-03-15 14:14:18 +01:00
Aleksander Morgado ff86bc9f4a api,enums: new enum for the USSD session state 2012-03-15 14:14:18 +01:00
Aleksander Morgado 55eb1f0c50 api,enums: new enum for the 3GPP network availability 2012-03-15 14:14:18 +01:00
Aleksander Morgado 4cdbaa5de3 api,enums: implement all enums and flags from the new API 2012-03-15 14:14:17 +01:00
Aleksander Morgado 8763576a34 api,dbus: rewrite Methods, Properties and Signals for gdbus-codegen 2012-03-15 14:14:17 +01:00
Aleksander Morgado 793c65705f api,dbus: Bearer interface not implemented by modems
Keep the Bearer interface out of the 'Modem' subtree in the interface hierarchy,
as it will be specific for Bearer objects, not implemented by Modem objects.
2012-03-15 14:14:17 +01:00
Aleksander Morgado 3599e396b9 api,dbus: SMS interface not implemented by modems
Keep the SMS interface out of the 'Modem' subtree in the interface hierarchy,
as it will be specific for SMS objects, not implemented by Modem objects.
2012-03-15 14:14:17 +01:00
Aleksander Morgado 592cd21f61 api,dbus: fix SignalQuality property signature so that it's a (ub) tuple 2012-03-15 14:14:17 +01:00
Aleksander Morgado 4fbe13a73f api,dbus: simplified the Manager API, as we will use the standard ObjectManager
The recent `org.freedesktop.DBus.ObjectManager' standard API defines a common
way to handle a list of objects in the interface. It allows getting all objects,
interfaces and properties in a single method call.

See:
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
2012-03-15 14:14:17 +01:00
Aleksander Morgado 89090013f2 api,dbus: let IMSI, OperatorIdentifier and OperatorName be properties in the SIM interface 2012-03-15 14:14:17 +01:00
Aleksander Morgado 35abbd6dd5 api,dbus: use long property names in the 3GPP DBus interface 2012-03-15 14:14:17 +01:00
Aleksander Morgado 432df3349f api,dbus: fix signature of the Scan() method in the 3GPP DBus interface
The Scan() method returns an array of dictionaries, where each dictionary is
defined by a string key plus a variant data (not a string data). This is to
handle the "status" and "access-tech" entries, which are given as unsigned
integers.
2012-03-15 14:14:17 +01:00
Aleksander Morgado f7390c328b api,dbus: use long property names in the CDMA DBus interface 2012-03-15 14:14:17 +01:00
Aleksander Morgado 60e824bd59 api,dbus: let UnlockRequired property be an enum instead of a string
We were already working with a fixed set of possible strings, so better to have
an enumeration for that.
2012-03-15 14:14:17 +01:00
Aleksander Morgado 022ceae0d8 api,dbus: new `Plugin' property in the Modem interface
Will hold the name of the plugin managing the modem.
2012-03-15 14:14:17 +01:00
Aleksander Morgado c164246642 tests: serial port tests don't need errors header 2012-03-15 14:14:17 +01:00
Aleksander Morgado 8e83a10c1e hso: disable echo removal
Built-in echo removal conflicts with _OWANCALL unsolicited messages, which are
not coming prefixed with <CR><LF>.

Fixes LP#953294
2012-03-13 20:14:58 +01:00
Aleksander Morgado 791e097ab5 at-serial-port: new property to control whether echo removal should be applied 2012-03-13 20:14:58 +01:00
Aleksander Morgado 7c9ba7faf2 samsung: remove unused variables 2012-03-05 16:59:52 +01:00
Aleksander Morgado bc118aa160 modem-helpers: plug memleak
g_match_info_fetch() returns always a heap-allocated string which should be
freed by the caller.
2012-02-29 16:51:50 +01:00
Aleksander Morgado 36ee1b9c76 build: include proper build dependencies for the polkit conf file
So that the final conf file is updated if the original one gets modified.
2012-02-26 22:10:48 +01:00
Aleksander Morgado b42ce2d8e6 charsets: plug memleak
The string passed to utils_bin2hexstr() needs to be freed afterwards.
2012-02-18 11:15:31 +01:00
Aleksander Morgado 7b8e9203f2 gsm: don't query PS network registration status if not supported 2012-02-17 13:25:03 +01:00
Aleksander Morgado f2af208f05 iridium: don't try to update signal quality if not registered
Seems that launching AT+CSQF when not registered ends up timing out. AT+CSQF
is meant to be the fast version to get the signal quality, and is expected to
return instantly with the last cached signal quality value. But if we never
got registered, there is no such cached value, so it probably waits to get the
first one.
2012-02-17 13:25:03 +01:00
Aleksander Morgado 5371cce11d iridium: ensure cached capabilities get checked 2012-02-17 13:25:03 +01:00
Aleksander Morgado fc88c53fad iridium: handle Motorola-branded Iridium modems 2012-02-17 13:25:03 +01:00
Aleksander Morgado 8b1016f4e1 iridium: close and open the port during disconnection
The Iridium modem doesn't seem to like only the port flashing during the
disconnection, so we fully close and open again the port.
2012-02-17 13:25:03 +01:00
Aleksander Morgado d52b38b1f2 iridium: set bearer service type to 9600bps V.110 2012-02-17 13:25:03 +01:00
Aleksander Morgado 707647da45 iridium: override generic initialization
We must send ATZ alone and once reply received, wait some time before sending
the next initialization commands. Otherwise, the next commands will receive
garbage as reply. The only way to handle this is to override the whole generic
initialization phase.

We will also avoid sending any power-up command, as not needed.
2012-02-17 13:25:03 +01:00
Aleksander Morgado c0f390470e iridium: allow up to 200s to configure IP 2012-02-17 13:25:03 +01:00
Aleksander Morgado 920fefa8e2 modem: new property to allow specifying longer timeouts when configuring IP
This IpTimeout property will be read by NetworkManager, and used as the time to
wait for pppd to establish the IP configuration.
2012-02-17 13:25:03 +01:00
Aleksander Morgado e6d085246f iridium: ensure 9600 baudrate is used 2012-02-17 13:25:03 +01:00
Aleksander Morgado 4b0cd28baf iridium: fix operator name and code to be reported 2012-02-17 13:25:02 +01:00
Aleksander Morgado 3a7f970931 gsm: let plugins override the operator name and code retrieval 2012-02-17 13:25:02 +01:00
Aleksander Morgado 26d69ca0f2 gsm: allow leading zeroes in numbers in CREG/CGREG responses 2012-02-17 13:25:02 +01:00
Aleksander Morgado 4ed3391859 iridium: PS network is not supported 2012-02-17 13:25:02 +01:00
Aleksander Morgado 40512451cc generic: only send CGACT if PS network is supported 2012-02-17 13:25:02 +01:00