Commit Graph

2375 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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