Commit Graph

2375 Commits

Author SHA1 Message Date
Aleksander Morgado
67b051cf69 broadband-modem: skip trail/leading whitespaces in manufacturer, model, revision 2012-08-28 17:15:18 +02:00
Ben Chan
667df5635c iface-modem: skip setting bands if target list equals to current list 2012-08-28 17:15:18 +02:00
Ben Chan
178de0e51d sms-part: use g_set_error instead of g_error_new for consistency 2012-08-27 11:17:30 +02:00
Ben Chan
e997803594 sim: validate IMSI value in +CIMI response 2012-08-27 11:13:51 +02:00
Aleksander Morgado
0436b3e457 api,introspection: report list of drivers, not just one
Different ports of the same modem may get handled by different drivers. We
therefore need to provide a list of drivers (new `Modem.Drivers' property with
signature 'as') instead of just one (removed `Modem.Driver' property with
signature 's').

$ sudo mmcli -m 0 | grep drivers
           |        drivers: 'qcserial, qmi_wwan'
2012-08-24 13:34:51 +02:00
Aleksander Morgado
ba4e209745 sms: fix sending SMS messages on some modems
This is the port to git master of the following commit:

commit 65f13f41cfd00cd38f118121a58b83713501f45f
Author: Dan Williams <dcbw@redhat.com>
Date:   Tue Jul 17 16:00:31 2012 -0500

    gsm: fix sending SMS messages on some modems and use PDU by default

    It turns out we really do have to wait for the modem to return the
    ">" prompt before sending the message data, otherwise a number of
    modems will complain about the data and fail the message.  Fix that
    by sending the first bit of the CMGS, waiting for the ">", and then
    sending the rest.

    This also switches all modems over to PDU mode by default if they
    support it, since it's more compatible and most recent modems don't
    even bother to support text mode anyway.
2012-08-24 12:32:29 +02:00
Aleksander Morgado
4fe7c7d637 base-modem-at: new `mm_base_modem_at_command_raw()'
Equivalent to `mm_base_modem_at_command()', but with a raw setup.
2012-08-24 12:32:29 +02:00
Aleksander Morgado
d18dbb869a base-modem-at: add 'raw' handling to `mm_base_modem_at_command_full()' 2012-08-24 12:32:29 +02:00
Aleksander Morgado
d9ea4a304c at-serial-port: allow sending 'raw' commands
Commands treated as 'raw' won't get the 'AT' prefix and will also not get the
trailing carriage return.
2012-08-24 12:32:28 +02:00
Aleksander Morgado
5764d39689 modem-helpers: ERI parser is generic enough, not just for !SPERI 2012-08-23 18:56:22 +02:00
Aleksander Morgado
d091344da2 broadband-bearer: pass down the data port to the 3GPP dialling step
Plugins may require specific dialling commands depending on the port type.
2012-08-23 18:56:22 +02:00
Aleksander Morgado
96a6e8923a broadband-bearer: generic CDMA connections are all over serial port and PPP 2012-08-23 18:56:22 +02:00
Aleksander Morgado
e38828c318 broadband-bearer: allow implementations to override the port used for connection 2012-08-23 18:56:22 +02:00
Aleksander Morgado
1ac18a06bb api,dbus: 'ip-type' property now given as a MMBearerIpFamily (u)
Instead of using a predefined set of string values for 'ip-type' in
Modem.CreateBearer() and Simple.Connect(), we'll use an enumeration. The
implementation will then need to convert the requested IP family type to e.g.
the correct PDP type in 3GPP modems.

This change also consolidates the use of enums in dictionary properties when
possible to do so, as with the Rm Protocol.
2012-08-22 09:38:21 +02:00
Aleksander Morgado
b8e5dbcaf4 novatel: flip secondary ports to AT mode during port setup 2012-08-20 16:26:55 +02:00
Aleksander Morgado
84d205c9be plugin: new filters for forbidden product IDs/strings
Plugins may specify that specific vendor & product IDs or strings are not
supported. This is useful when plugins need to specify that they support
all devices of a given vendor except for some specific ones.
2012-08-20 16:26:55 +02:00
Aleksander Morgado
4e84cd241b plugin: fix icera filters when using the allowed product string filter 2012-08-20 16:26:55 +02:00
Aleksander Morgado
9512eda21d plugin: don't apply product ID filters if no vendor ID was retrieved 2012-08-20 16:26:55 +02:00
Ben Chan
7b13b5e1c0 broadband-bearer,icera: fix CID matching for unsolicited IPDPACT responses 2012-08-20 09:17:34 +02:00
Ben Chan
7eb1782023 iface-modem: increase number of trials for PIN check from 3 to 6
In practice, it may take longer time for a SIM to become ready when the
modem interface tries to use AT+CPIN? to determine if the SIM is
PIN-locked. This patch increases the number of trials for PIN check to
address the issue.
2012-08-13 12:03:15 +02:00
Aleksander Morgado
36594dd9fb broadband-modem: fix GError disposal 2012-08-08 13:20:26 +02:00
Aleksander Morgado
45e8aa50df iface-modem-3gpp: when disabled, cleanup interface properties 2012-08-06 20:18:15 +02:00
Aleksander Morgado
278842108c iface-modem-3gpp: refactor registration sequences
Once upon a time it was a good idea to have separate steps for CS and PS related
actions, so that plugins could override specific steps with a great detail. That
idea turned out to be not very useful, as the only case which requires custom
CS/PS registration actions is the QMI-enabled modem, and that one has commands
to act on both registration actions at the same time. So, we now consolidate
all steps, so that the implementation of the interface needs to provide all the
logic to setup/enable/disable/cleanup/check registrations in each mode.

Also, we consolidate how the unsolicited registration messages are handled, so
that it's equivalent to other unsolicited messages:
 * 'Setup' will configure ports to process the unsolicited messages.
 * 'Enable' will tell the modem to send unsolicited messages.
 * 'Disable' will tell the modem not to send unsolicited messages.
 * 'Cleanup will configure ports to ignore the unsolicited messages.
2012-08-06 20:17:00 +02:00
Aleksander Morgado
01bb5cd660 iface-modem-cdma: new steps to enable/disable unsolicited events 2012-08-06 20:16:29 +02:00
Aleksander Morgado
779b293387 iface-modem-cdma: skip checks to see if unsolicited events are supported 2012-08-06 20:16:06 +02:00
Aleksander Morgado
4aaafc54c7 iface-modem-3gpp: removed the 'setup indicators' step
The previous logic would first request to check if indicators were supported,
and only then allow to setup/enable/cleanup/disable unsolicited events. This
behaviour is very specific to the generic 3GPP case, and therefore it shouldn't
be handled in the even more generic 3GPP interface. The logic is still kept,
but handled within the MMBroadbandModem object.
2012-08-06 20:15:41 +02:00
Aleksander Morgado
f6415a71b6 device: keep all unsupported ports in a separate list
Ports being marked as unsupported should not be passed to the plugin specific
create_modem() or grab_port() methods.
2012-08-06 20:07:50 +02:00
Aleksander Morgado
1811bb015c plugin-manager: relaunch probing when suggestion comes to deferred tasks
If a port support task was deferred until suggested, do not assume that the
suggested plugin actually supports the port, instead re-launch support check.

This covers the cases where a net port appears in a modem which only supports
AT ports (e.g. Nokia case).
2012-08-06 20:07:50 +02:00
Aleksander Morgado
509ad94204 plugin: check if the current probe is the one with AT support before assuming it's not 2012-08-06 20:07:27 +02:00
Aleksander Morgado
edc9825788 plugin: let plugins request Icera support checks and Icera based filters 2012-08-06 20:07:27 +02:00
Aleksander Morgado
0b3eb27856 port-probe: include Icera support check in the probing sequence 2012-08-06 20:07:27 +02:00
Aleksander Morgado
b8cc7c66ec device: don't create devices with 0 ports
If for any reason we're requested to create a device with 0 ports, just return
error.
2012-08-06 20:07:22 +02:00
Aleksander Morgado
da0226708a plugin: abort probing when the port has been released from the device 2012-08-06 20:07:22 +02:00
Aleksander Morgado
68c276efc1 broadband-modem: new generic steps in initialization/enabling/disabling
Instead of hardcoding the logic to decide which ports are open or closed in the
different steps, we now let the subclasses of MMBroadbandModem to do that
themselves.

We now provide:

  * initialization_started() and initialization_stopped(): the generic
    implementation does the serial port open/close in these steps.

  * enabling_started(): the generic implementation does the serial port opening
    here. The serial ports are kept open as long the modem is in enabled state.

  * disabling_stopped(): the generic implementation does the serial port closing
    here.
2012-08-06 20:07:20 +02:00
Aleksander Morgado
3b1d3063ba manager: remove the MMDevice object when the last port of the device is released 2012-08-06 20:06:47 +02:00
Aleksander Morgado
8ae87f5c38 manager: fix removal of device from our HT of devices 2012-08-06 20:06:47 +02:00
Aleksander Morgado
ff8a962d99 port-probe: let us peek the `MMDevice' owning the probe from the probe itself 2012-08-06 20:06:47 +02:00
Aleksander Morgado
b64f52cddc plugin: if no grab_port() method given, use the default one 2012-08-06 20:06:46 +02:00
Aleksander Morgado
bfc3cb27e1 device,plugin: let the MMPlugin' API know about MMDevice' 2012-08-06 20:06:46 +02:00
Aleksander Morgado
884aa7f2eb plugin-manager: simplify by iterating the list ourselves 2012-08-06 20:06:46 +02:00
Aleksander Morgado
9be646f274 plugin-manager: use a double-linked list for the plugin list 2012-08-06 20:06:46 +02:00
Aleksander Morgado
86f4923d7f plugin: new method to compare plugins
Instead of providing a method to get if a plugin is requesting to get sorted
last, we provide a way to comparing two plugins, compatible with the
GCompareFunc required in g_list_sort().
2012-08-06 20:06:46 +02:00
Aleksander Morgado
624a1e9087 plugin: remove obsolete comment 2012-08-06 20:06:46 +02:00
Aleksander Morgado
6e3d90e2a4 plugin: new `MM_PLUGIN_CUSTOM_INIT' property
We let plugins execute some custom initialization in the ports, specified by
a `MMAsyncMethod'.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
d63570838b port-probe: fix typo in class definition 2012-08-06 20:06:46 +02:00
Aleksander Morgado
79abe00221 core: new `MMAsyncMethod' boxed type
Helps to bundle the async method implementation in a property.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
f5fdf946c9 plugin: new `MM_PLUGIN_FORBIDDEN_DRIVERS' property
It allows plugins to specify whether they cannot support ports handled by
specific drivers.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
1078b246b0 plugin: remove no longer used `MM_PLUGIN_SORT_LAST' property
The behaviour previously handled by this property is now automatically handled.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
9b0f6c83f2 plugin: renamed custom-init' property to custom-at-probe'
The `custom-at-probe' property is just to modify the way we check for AT port
support.
2012-08-06 20:06:46 +02:00
Aleksander Morgado
89b3c01328 port-probe: setup the port object as a property 2012-08-06 20:06:46 +02:00