Commit Graph

2351 Commits

Author SHA1 Message Date
Aleksander Morgado
15e9943036 plugin-base: avoid launching AT probing on new ports if the modem expects only one
If we got an existing modem showing a new port, and the plugin handling that modem
said that only one AT port was expected, we shouldn't be AT-probing it any more.
2012-03-16 14:53:25 +01:00
Aleksander Morgado
29f23f2a49 base-modem: new method to check if the modem got any AT port
Required for the single-at logic in the plugins.
2012-03-16 14:53:25 +01:00
Aleksander Morgado
3eb4220caa port-probe: new probing result setters
We make them public, so that we can set results before actually running the
probing.
2012-03-16 14:53:25 +01:00
Aleksander Morgado
d2559e2716 plugin-base: only cancel AT probing in probes of the same device 2012-03-16 14:53:25 +01:00
Aleksander Morgado
c52762ea67 build: require gudev >= 147
Since udev 147 the gudev API is no longer marked as experimental, and therefore
`G_UDEV_API_IS_SUBJECT_TO_CHANGE' is no longer needed.
2012-03-16 14:53:25 +01:00
Aleksander Morgado
703ab2590b port-probe: probing may just require vendor or product probing
If we already had probed, e.g. AT capabilities, and a next plugin requires
Vendor AT probing, the task will only show that VENDOR_AT is requested.
2012-03-16 14:53:25 +01:00
Aleksander Morgado
56e7b15f5c base-modem: ensure we cancel any ongoing operation when we're disposing 2012-03-16 14:53:24 +01:00
Aleksander Morgado
09026ed89a iface-modem: treat serial errors also as fatal when checking unlock status 2012-03-16 14:53:24 +01:00
Aleksander Morgado
a20441f4c0 nokia: don't even bother checking for messaging support
Nokia modems/handsets use their own protocol (phonet) for all messaging related
operations, currently unsupported, so don't bother trying to check messaging
support with the generic implementation.
2012-03-16 14:53:24 +01:00
Aleksander Morgado
e2a56ba490 iface-modem-time: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado
9eebb75ca3 iface-modem-messaging: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado
2c4a69b190 iface-modem-location: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado
fea2ef0e5c iface-modem-cdma: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado
0d4b644572 iface-modem-3gpp: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado
e140ff3c5f iface-modem: let initialization and enabling sequences get cancelled 2012-03-16 14:53:24 +01:00
Aleksander Morgado
d27e40ae9a core: new `Initializing' state in the global modem state machine
We need to define a state to be used while the modem is being initialized, so
that we forbid any operation on the modem on already exported interfaces, while
there are interfaces pending to get exported.

This Initializing state will also cover the state between having the SIM
unlocked (which launches re-initialization) and being completely initialized.
2012-03-16 14:53:24 +01:00
Aleksander Morgado
6de2e3f72c sim: don't require the Modem object in the context
It's already easily available in self->priv->modem;
2012-03-16 14:53:24 +01:00
Aleksander Morgado
3a22128d9e iface-modem: don't leave locked state until re-initialization is complete 2012-03-16 14:53:24 +01:00
Aleksander Morgado
961290ddd7 build: autogenerate `mm-errors-quarks.c'
We define custom nicks for each error enum, matching the DBus error entry that
we want to have with each of them.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
be7f499aa6 broadband-modem: set cancellations in the initialization, enabling and disabling sequences 2012-03-16 14:53:23 +01:00
Aleksander Morgado
4b64d3dcf0 nokia: new `MMSimNokia'
Nokia phones don't support AT+CRSM.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
25e8bfd2a3 nokia: expect only one AT port
This speeds up probing, as we cancel other AT probings as soon as we grab the
first AT port.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
181f9c85f0 log: only include LOC and method name in debug logs if running with --debug
If the modem is started with --log-level=DEBUG, they will not be shown.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
cdd339f802 base-modem: implement new modem-wide cancellable, and rework AT commands
Instead of the `_in_port()' variants, we'll provide more generic
`_full()' methods. These should be used either if we want to send commands
to a specific port, or if we want to use a specific user-provided GCancellable.

In addition to this user-provided GCancellable, we keep the internal modem-wide
one.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
215c278082 base-modem: new modem-wide cancellable, passed to every state machine 2012-03-16 14:53:23 +01:00
Aleksander Morgado
7bfc56c2a8 base-modem-at: set error if NULL port detected
Users of mm_base_modem_at_command_in_port() can now directly pass the result
of mm_base_modem_peek_port_primary() or mm_base_modem_peek_port_secondary(),
which may be NULL if no such port exists in the modem. So we'll gracefully
detect the NULL port and complete the async operation with an error.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
cc6d4a97fb base-modem: new port getters and peekers
* mm_base_modem_peek_port_* () will return either a port object (no new
reference), or NULL if none available.

You would usually peek() a port if you're going to use it just in the current
method, as there is no way to that reference to get invalid (we're single
threaded).

 * mm_base_modem_get_port_* () will return either NEW references to valid
port objects, or NULL if none available.

And, you would usually get() a port, whenever you want the port object to be
valid even out of the current method, for example when keeping it in the
context of an async operation.

Also, we need to consider that the primary AT port MAY BE NULL when you
peek() or get() it. This is due to the fact that we may be releasing ports
(due to device disconnection) in the middle of async operations.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
48285dcfdf serial-port: forcing to close a port is an internal operation
Ports being forced to get closed will only happen when we get a HUP error
in the serial port (e.g. device got disconnected).
2012-03-16 14:53:23 +01:00
Aleksander Morgado
4f59a696fc serial-port: don't warn when trying to close a port which was forced to be closed 2012-03-16 14:53:23 +01:00
Aleksander Morgado
4bdfd25de1 base-modem: when getting best AT port, assume we may have lost specific ports
Don't assume that primary port is always set.
2012-03-16 14:53:23 +01:00
Aleksander Morgado
c24012ef1b plugin-base: handle the case of expecting a single AT port
If we only expect a single AT port, we'll cancel all remaining AT port probings
in the other ports, as soon as we get the first one.
2012-03-16 14:53:22 +01:00
Aleksander Morgado
dc58cce7c4 port-probe: allow cancelling all AT probing steps 2012-03-16 14:53:22 +01:00
Aleksander Morgado
9fbddcb8a9 plugin-base: new property to specify that only one single AT port is expected
Will allow us to cancel other AT probings as soon as the first AT port is
grabbed.
2012-03-16 14:53:22 +01:00
Aleksander Morgado
690777986b port-probe: refactor AT command handling
Make it use a GVariant in the response processor, as the AT command handling in
the MMBaseModem.
2012-03-16 14:53:22 +01:00
Aleksander Morgado
70103fdef3 TODO: new task to consolidate the serial parser as a GObject 2012-03-16 14:53:22 +01:00
Aleksander Morgado
1e19273340 serial-parsers: new method to check if a given error was set by the parser 2012-03-16 14:53:22 +01:00
Aleksander Morgado
ef2b1cf030 at-serial-port: allow cancelling the response timeout 2012-03-16 14:53:22 +01:00
Aleksander Morgado
5a485d74a2 qcdm-serial-port: allow cancelling the response timeout 2012-03-16 14:53:22 +01:00
Aleksander Morgado
9b38cd4f5c serial-port: allow cancelling the response timeout 2012-03-16 14:53:22 +01:00
Aleksander Morgado
64d83737fe serial-parsers: remove v0 and v1_e1 parsers, which are unused
Given that we now perform our own built-in echo removal in the v1 parser, we no
longer need the v1_e1 parser.

The v0 parser was also unused from long ago.
2012-03-16 14:53:22 +01:00
Aleksander Morgado
05e2ce862d port-probe: log the list of probing tasks to be run 2012-03-16 14:53:22 +01:00
Aleksander Morgado
66984e77cd port-probe: convert port probe flags to a private enum 2012-03-16 14:53:22 +01:00
Aleksander Morgado
b07e13f49d TODO: time interface and own numbers now done 2012-03-16 14:53:22 +01:00
Aleksander Morgado
1df1fe4f4a mmcli: new Time-specific actions 2012-03-16 14:53:22 +01:00
Aleksander Morgado
a3e6faeaca libmm-glib: implement Time interface specific actions 2012-03-16 14:53:22 +01:00
Aleksander Morgado
b50c5d42e0 mmcli: print own numbers in modem info 2012-03-16 14:53:21 +01:00
Aleksander Morgado
59d8110767 libmm-glib: add support to retrieve own numbers 2012-03-16 14:53:21 +01:00
Aleksander Morgado
1f250585dd modem-helpers: refactor and reorganize sources 2012-03-16 14:53:21 +01:00
Aleksander Morgado
c824ee3106 broadband-modem: implement own numbers generic loading 2012-03-16 14:53:21 +01:00
Aleksander Morgado
51c28d0f79 modem-helpers: new +CNUM response parser and tests 2012-03-16 14:53:21 +01:00