Commit Graph

1627 Commits

Author SHA1 Message Date
Aleksander Morgado
776cc66e2c iface-modem: implement all bearer list operations in the interface
Bearer list operations, except for Bearer creation, are so generic that the
interface itself can implement it for every object implementing the interface.
This implementation is based on a new MMBearerList object.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
0793522d28 errors: new TOO_MANY and NOT_FOUND core errors 2012-03-15 14:14:33 +01:00
Aleksander Morgado
667e3edfbd bearer: ensure only valid bearers are exported
We setup bearer export in DBus only if the input properties are the expected
ones.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
e00d3127d5 cli: implement bearer creation, deletion and listing 2012-03-15 14:14:33 +01:00
Aleksander Morgado
6a07753ba0 libmm-glib: handle bearer creation, deletion and listing 2012-03-15 14:14:33 +01:00
Aleksander Morgado
82693cf523 cli: enable printing modem info 2012-03-15 14:14:33 +01:00
Aleksander Morgado
4624846015 libmm-glib: return NULL instead of empty strings 2012-03-15 14:14:33 +01:00
Aleksander Morgado
6246944510 cli: allow option groups to force async/sync operations
Some operations are clearly asynchronous (e.g. monitoring modem state), while
others are clearly synchronous (e.g. printing modem info). So just allow option
groups to force the operation to be async or sync based on the detected action.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
ec8da67921 libmm-glib: new API method to build a string of capabilities from a bitmask 2012-03-15 14:14:33 +01:00
Aleksander Morgado
4d594c50e8 libmm-common: capabilities string builder moved from core
Keep in libmm-common the capabilities string builder.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
0384483121 nokia: start porting the Nokia plugin to the new codebase 2012-03-15 14:14:33 +01:00
Aleksander Morgado
88cc35b850 cinterion: ignore non-AT ports 2012-03-15 14:14:33 +01:00
Aleksander Morgado
68b0ac6e19 broadband-modem: by default only send init command once
Will handle sending it twice only for Nokia phones.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
c15181ae37 port-probe: always complete probing task in idle 2012-03-15 14:14:33 +01:00
Aleksander Morgado
ed83d54087 port-probe: plug small leak when reporting error in AT command response 2012-03-15 14:14:33 +01:00
Aleksander Morgado
6a3e91ee83 cli: use the new libmm-glib API fixes 2012-03-15 14:14:33 +01:00
Aleksander Morgado
7acacbbfd7 libmm-glib: simplify handling of interfaces
Avoid trying to merge all interfaces into the same set of APIs, and keep having
a specific object (proxy) for each interface handled by the GDBusObjects
reported listed by the GDBusObjectManager.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
838f38ec8c api: minor fixes in OperatorCode' and OperatorName' documentation 2012-03-15 14:14:32 +01:00
Aleksander Morgado
92cb17be4d cli: fix sync operations, initialize context 2012-03-15 14:14:32 +01:00
Aleksander Morgado
77ff2758b3 cli: logging improvements 2012-03-15 14:14:32 +01:00
Aleksander Morgado
95675e3e54 libmm-glib: fix macro implementing async ready callbacks 2012-03-15 14:14:32 +01:00
Aleksander Morgado
85a542b5c8 cli: new `--verbose' to dump debug logging 2012-03-15 14:14:32 +01:00
Aleksander Morgado
e1cba4a533 broadband-modem: implement bearer creation, deletion and listing
Currently do not limit the number of bearers that can be created.
2012-03-15 14:14:32 +01:00
Aleksander Morgado
4f4bb6b54b bearer: fix object export/unexport 2012-03-15 14:14:32 +01:00
Aleksander Morgado
a7acdcd071 sim: only unexport object if currently exported
Avoid trying to unexport the object if it was never exported before.
2012-03-15 14:14:32 +01:00
Aleksander Morgado
7030bbc586 iface-modem-3gpp: bind connection property right away 2012-03-15 14:14:32 +01:00
Aleksander Morgado
8725fe5346 iface-modem: bind connection property right away 2012-03-15 14:14:32 +01:00
Aleksander Morgado
ad1c7d8dec sim: bind connection property right away 2012-03-15 14:14:32 +01:00
Aleksander Morgado
b435012eb1 sim: make sure we unexport the SIM object when destroying it
Usually, if not always, the connection stored in the SIM object never exists
when disposing it, as we clear the connection property in the Modem object
before destroying it, and both properties are bound. But just in case, in order
to avoid ending up with a zombie object in DBus, we make sure we unexport it.
2012-03-15 14:14:32 +01:00
Aleksander Morgado
a2f0814fc5 bearer: keep properties given as input, and avoid async creation
No need to create this object asynchronously.
2012-03-15 14:14:32 +01:00
Aleksander Morgado
3dcdc3c920 modem-helpers: new helper to count number of bits set in a bitmask 2012-03-15 14:14:32 +01:00
Aleksander Morgado
a181b152a1 api: when creating new bearer, use dict of strings
Changed the signature of the 'properties' input argument in the CreateBearer()
DBus call from a{sv} to a{ss}. We'll only expect string values.
2012-03-15 14:14:32 +01:00
Aleksander Morgado
36fae5564b bearer: new object to handle bearers, implements the Bearer DBus interface 2012-03-15 14:14:31 +01:00
Aleksander Morgado
3164f5512d sim: plug memleak, free path on finalize() 2012-03-15 14:14:31 +01:00
Aleksander Morgado
71bf6b0048 cinterion: start porting features from the old implementation
Currently ported:
 * Power Down
 * Flow control
 * After power up setup:
   ** Available functionality status
   ** Supported networks
2012-03-15 14:14:31 +01:00
Aleksander Morgado
c345f5fe63 cinterion: re-enabled Cinterion plugin
Just dummy plugin for now.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
0c64e08f85 error-helpers: small refactor 2012-03-15 14:14:31 +01:00
Aleksander Morgado
fb90f205d1 core: port to use the new AT command/sequences in the MMBaseModem API 2012-03-15 14:14:31 +01:00
Aleksander Morgado
52db9b9035 base-modem-at: refactor AT sequence/command handling
Make a tight connection between the action of sending AT commands, either single
or in a sequence, with the MMBaseModem object owning the port. This direct
relation allows sending commands without specifying which port to use, so that
the modem object can get the best port at each time, and handling all that in a
single common place.

The original mm-at API has also been modified so that when a single command is
sent, a constant string is returned. We are allowed to return constant strings
in mm_base_modem_at_command_finish() because the string itself is owned by the
GSimpleAsyncResult, and hence, alive enough time. The GSimpleAsyncResult is
completely disposed only after the async call is fully completed.

Same reasoning behind the GVariant returned in the AT sequences; it should not
be owned by the caller, it's a transfer-none in introspection terms.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
7b12da9169 errors: new MM_CORE_ERROR_CONNECTED error
To be returned when we try to send an AT command to a modem, but there is no
usable AT port available, as the primary port is connected (hence the name)
and there is no secondary port.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
2be2288754 iface-modem: handle CreateBearer(), DeleteBearer() and ListBearers()
Just pass the task to the specific underlying implementation.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
6549c23db8 broadband-modem: implement cleaning up CS and PS registrations 2012-03-15 14:14:31 +01:00
Aleksander Morgado
1e026fe986 iface-modem-3gpp: cleanup CS and PS registrations during disable 2012-03-15 14:14:31 +01:00
Aleksander Morgado
e3117333d9 broadband-modem: implement cleaning up unsolicited registration message handlers 2012-03-15 14:14:31 +01:00
Aleksander Morgado
029902312d iface-modem-3gpp: cleanup unsolicited registration messages during disable 2012-03-15 14:14:31 +01:00
Aleksander Morgado
289057bf92 iface-modem: don't flash port during disable
At least just for now. Flashing should be done as part of the disconnection.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
a170c0841d broadband-modem: setup steps when disabling the modem
Include disabling the Modem and 3GPP interfaces for now.
2012-03-15 14:14:31 +01:00
Aleksander Morgado
c867da54b1 iface-modem-3gpp: interface can be disabled 2012-03-15 14:14:31 +01:00
Aleksander Morgado
8459eba214 iface-modem-3gpp: enable periodic registration checks if no unsolicited
If we get errors when configuring the unsolicited registration messages, setup a
timeout to be run every 30s which will check our registration status.
2012-03-15 14:14:30 +01:00
Aleksander Morgado
3c3a2b811a broadband-modem: implement network scan 2012-03-15 14:14:30 +01:00