Commit Graph

193 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
8725fe5346 iface-modem: bind connection property right away 2012-03-15 14:14:32 +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
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
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
0076106c90 iface-modem: don't report LOCKED state if SIM PIN2/PUK2
If unlock required reports needing SIM PIN2 or PUK2, don't report LOCKED state,
as the device is fully operational without it.
2012-03-15 14:14:30 +01:00
Aleksander Morgado
670e2dcdc9 iface-modem: launch reinitialization only when going from LOCKED to DISABLED 2012-03-15 14:14:30 +01:00
Aleksander Morgado
b31ad37670 iface-modem: allow changing the State from outside the interface
Some states need to be set from outside the scope of the Modem interface, like
Registration-related ones (REGISTERED, SEARCHING, ...) or Connection-related
ones (CONNECTED, ...).
2012-03-15 14:14:29 +01:00
Aleksander Morgado
829b79eff4 iface-modem: complete the result before freeing init context 2012-03-15 14:14:28 +01:00
Aleksander Morgado
78d788d4dc iface-modem: avoid inner async operation during initialization 2012-03-15 14:14:28 +01:00
Aleksander Morgado
acc3e3f6da core: always pass open port to interface initializations
When the first AT port is grabbed, modem initialization is launched, using that
specific port. This port is also passed to all interface initialization methods.
2012-03-15 14:14:28 +01:00
Aleksander Morgado
b9448b83cb iface-modem: simplify interface handling
Interfaces won't have a 'status', just initialize(), enable(), disable() and
shutdown().

Also, shutdown() should never fail. We will take care of cancelling any ongoing
operation afterwards, before calling shutdown().
2012-03-15 14:14:28 +01:00
Aleksander Morgado
27494eae51 iface-modem: handle Enable() calls 2012-03-15 14:14:28 +01:00
Aleksander Morgado
8b1515b2a0 iface-modem: close primary port during disable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
589c6419d2 iface-modem: send power-down command during disable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
5e3ad0fe58 iface-modem: flash primary port during disable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
f3b6bfeb8f iface-modem: interface can be disabled
The Modem interface can be disabled, going from enabled back to initialized. The
disabling process will include closing the ports opened during the enabling.
2012-03-15 14:14:27 +01:00
Aleksander Morgado
781c1821fd iface-modem: setup modem charset configuration during enable
Load supported charsets, and loop trying to set the best one.
2012-03-15 14:14:27 +01:00
Aleksander Morgado
c0d3bd944c iface-modem: send flow control setup commands during enable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
7fa372d118 iface-modem: allow plugins to send custom commands after power-up
Just after powering up the modem, plugins can run additional setup commands
themselves, in a new "after" power-up step.
2012-03-15 14:14:27 +01:00
Aleksander Morgado
0adbd8edad iface-modem: send power-up commands during enable 2012-03-15 14:14:27 +01:00
Aleksander Morgado
b948c93e59 iface-modem: send modem initialization commands during enable 2012-03-15 14:14:26 +01:00
Aleksander Morgado
b0a1eccd54 iface-modem: flash primary port during enable 2012-03-15 14:14:26 +01:00
Aleksander Morgado
fc19509e4f iface-modem: during init, fall down to next states directly 2012-03-15 14:14:26 +01:00
Aleksander Morgado
8327b6af30 iface-modem: interface can be enabled
In addition to initializing the interface, to load initial values of all
properties and export the object in DBus, the interface can now also be enabled.
Enabling the Modem interface will take care of running the modem enabling
process (flashing port, power up and such).
2012-03-15 14:14:26 +01:00
Aleksander Morgado
f049dbb217 iface-modem: emit StateChanged signal when modem state changes 2012-03-15 14:14:26 +01:00
Aleksander Morgado
7b59a80912 iface-modem: load CurrentCapabilities first
With AT+GCAP we load the currently available capabilities, and we store them
in a new "iface-modem-capabilities" property in the MMIfaceModem interface. This
property is bound to the "current-capabilities" property in the MmGdbusModem
skeleton object, so no need to update both when it changes.

ModemCapabilities depend directly on whether the modem can load firmware without
reflashing the device. Currently, just set it equal to CurrentCapabilities.
2012-03-15 14:14:26 +01:00
Aleksander Morgado
126332332b iface-modem: allow requesting signal quality check
The new `mm_iface_modem_signal_quality_check()' method will reload the signal
quality value on demand, set the value of the `SignalQuality' property in DBus,
and also return the results.
2012-03-15 14:14:24 +01:00
Aleksander Morgado
59c37afae6 iface-modem: handle SetAllowedModes() 2012-03-15 14:14:23 +01:00
Aleksander Morgado
1dcd20f18d iface-modem: handle SetAllowedBands()
Also considering that playing with bands may not be supported.
2012-03-15 14:14:23 +01:00
Aleksander Morgado
b9d60d2de4 iface-modem: handle FactoryReset() calls
Also considering that reseting may not be implemented.
2012-03-15 14:14:23 +01:00
Aleksander Morgado
03490d1171 iface-modem: handle Reset() calls
Also considering that reseting may not be implemented.
2012-03-15 14:14:23 +01:00
Aleksander Morgado
2a1465bc91 iface-modem: create MMSim object during init 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