Commit Graph

1627 Commits

Author SHA1 Message Date
Aleksander Morgado
8ecb80b553 iface-modem-3gpp: handle network scan requests 2012-03-15 14:14:30 +01:00
Aleksander Morgado
a92e9c59c1 modem-helpers: provide list of scanned networks in a list of structs
We provide the result of the +COPS=? parsing in a GList of MM3gppNetworkInfo
structures. We avoid the previous hash table, or using a dictionary, as a
list of structs with a predefined set of elements, which should be easier for
plugins wanting to make their own version
2012-03-15 14:14:30 +01:00
Aleksander Morgado
a265798e0d api: rename key in dictionary returned by Scan()
We'll keep on using 'code' to refer to the Operator MCC/MNC.
2012-03-15 14:14:30 +01:00
Aleksander Morgado
0c7281b2d9 broadband-modem: implement Operator Code and Name loading 2012-03-15 14:14:30 +01:00
Aleksander Morgado
ad0a18d107 iface-modem-3gpp: when going into REGISTERED, load Operator Name and Code 2012-03-15 14:14:30 +01:00
Aleksander Morgado
3b2b0645be iface-modem-3gpp: report registration state change in the log 2012-03-15 14:14:30 +01:00
Aleksander Morgado
12ea55286d broadband-modem: implement registration to 3GPP network 2012-03-15 14:14:30 +01:00
Aleksander Morgado
7ea0c4905d iface-modem-3gpp: always run CS and PS registration checks together
And report a single error, only if all available registration checks failed.
2012-03-15 14:14:30 +01:00
Aleksander Morgado
fd51bd349a iface-modem-3gpp: handle network registration requests 2012-03-15 14:14:30 +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
48a9da117b broadband-modem: implement CS/PS registration checks
Running a CS/PS registration check may not return any direct result (this is, no
MMModem3gppRegistrationStatus returned), as usually replies to +CREG? and
+CGREG? are parsed as unsolicited messages.
2012-03-15 14:14:30 +01:00
Aleksander Morgado
b3389ff2d4 test-modem-helpers: fix C(G)REG parsing tests 2012-03-15 14:14:29 +01:00
Aleksander Morgado
5805a931e6 modem-helpers: use MMModemAccessTech when parsing C(G)REG responses 2012-03-15 14:14:29 +01:00
Aleksander Morgado
9c60fe6e16 iface-modem-3gpp: load registration states during enable 2012-03-15 14:14:29 +01:00
Aleksander Morgado
b646581640 broadband-modem: implement unsolicited registration message setup
We setup custom handlers for unsolicited registration state messages. Plugins
are allowed to setup their own handlers.
2012-03-15 14:14:29 +01:00
Aleksander Morgado
9b796e0d86 iface-modem-3gpp: allow changing the RegistrationState from outside the interface
The 3GPP registration state will always be set from outside the 3GPP interface,
for example when parsing unsolicited registration messages, on when the
interface requests manual checking of registration state.

We'll also update the State property in the Modem interface when we switch to a
connected state, so we also set the Modem interface as a prerrequisite of the
3GPP interface.
2012-03-15 14:14:29 +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
ddbfad8ca4 broadband-modem: override the RegistrationState property 2012-03-15 14:14:29 +01:00
Aleksander Morgado
430878c452 modem-helpers: use MMModem3gppRegistrationState when parsing C(G)REG responses 2012-03-15 14:14:29 +01:00
Aleksander Morgado
c636cdb27f base-modem: setup NULL callbacks in unsolicited CREG message handlers
When the port is grabbed, we setup NULL callbacks for all unsolicited
registration message handlers. If we do enable 3GPP registrations
afterwards, we'll set proper callbacks.
2012-03-15 14:14:29 +01:00
Aleksander Morgado
d1072bda54 iface-modem: new RegistrationState property, bound to the one in DBus 2012-03-15 14:14:29 +01:00
Aleksander Morgado
68044fb01e iface-modem-3gpp: setup unsolicited registration messages handling during enable 2012-03-15 14:14:29 +01:00
Aleksander Morgado
2f5e8c46a3 at-serial-port: allow overwriting unsolicited message handlers
Existing unsolicited message handlers can be overwritten at any time now. This
allows initializing the port with all possible message handlers configured with
a NULL callback, and then setup the proper handlers when we go on enabling the
different interfaces.
2012-03-15 14:14:29 +01:00
Aleksander Morgado
20f53ec15b broadband-modem: implement CS/PS registration notifications setup 2012-03-15 14:14:29 +01:00
Aleksander Morgado
8f6018d9c6 iface-modem-3gpp: setup CS and PS registrations during enable 2012-03-15 14:14:29 +01:00
Aleksander Morgado
04f10820f3 broadband-modem: setup enabling steps
When the modem is enabled, we'll go one by one enabling all our interfaces.
2012-03-15 14:14:29 +01:00
Aleksander Morgado
73db436f71 iface-modem-3gpp: 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 3GPP interface will take care of running the network registration
process.
2012-03-15 14:14:28 +01:00
Aleksander Morgado
bd24d0d14c broadband-modem: implement IMEI loading 2012-03-15 14:14:28 +01:00
Aleksander Morgado
27c973b6b4 broadband-modem: implement the Modem 3GPP interface
It will only be initialized and exported in DBus if the modem has 3GPP
capabilities.
2012-03-15 14:14:28 +01:00
Aleksander Morgado
c6b69f9a59 iface-modem-3gpp: export DBus interface when properly initialized 2012-03-15 14:14:28 +01:00
Aleksander Morgado
69079ff891 iface-modem-3gpp: load `IMEI' during init 2012-03-15 14:14:28 +01:00
Aleksander Morgado
bb625b332a iface-modem-3gpp: setup interface initialization and shutdown 2012-03-15 14:14:28 +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
1d495c58e6 iface-modem-3gpp: new interface to handle the Modem 3GPP DBus interface 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
d2d9251733 broadband-modem: setup initialization of all interfaces 2012-03-15 14:14:28 +01:00
Aleksander Morgado
a58f95121a api: rename 3GPP and CDMA interface paths
Elements in a DBus interface name cannot start with a digit, so
"org.freedesktop.ModemManager1.Modem.3gpp" is an invalid interface name.

Renamed here all relevant interfaces so that they have an additional "Modem"
prefix in the element, so we get now:
 "org.freedesktop.ModemManager1.Modem.Modem3gpp"
 "org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd"
 "org.freedesktop.ModemManager1.Modem.ModemCdma"

Objects generated with gdbus-codegen maintain the previous names.
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
22bdfdbf8b broadband-modem: disable the Modem iface when disabling the modem 2012-03-15 14:14:28 +01:00
Aleksander Morgado
b0a9c6a7ef broadband-modem: enable the Modem iface when enabling the modem 2012-03-15 14:14:27 +01:00
Aleksander Morgado
c74c3a5d2e broadband-modem: implement charset loading and setup 2012-03-15 14:14:27 +01:00
Aleksander Morgado
ad8fed66fe broadband-modem: implement flow control setup 2012-03-15 14:14:27 +01:00
Aleksander Morgado
00949c4782 broadband-modem: implement modem power-up commands 2012-03-15 14:14:27 +01:00
Aleksander Morgado
491758c266 broadband-modem: implement modem initialization commands 2012-03-15 14:14:27 +01:00
Aleksander Morgado
ea7a939201 broadband-modem: override the Current Capabilities property 2012-03-15 14:14:27 +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