Commit Graph
1486 Commits
Author SHA1 Message Date
Aleksander Morgado 3e251129c2 base-modem: use the new `MMQmiPort' object 2012-08-29 17:14:47 +02:00
Aleksander Morgado 26d3c28e43 core: new `MMQmiPort' object
This object encapsulates the usage of the `QmiDevice' coming from libqmi-glib.
2012-08-29 17:14:47 +02:00
Aleksander Morgado f1e711e01b udev: don't require specific driver for cdc-wdm ports
Reported by Bjørn Mork <bjorn@mork.no>
2012-08-29 17:14:47 +02:00
Aleksander Morgado 73a9a037be base-modem: allow getting/peeking the QMI port 2012-08-29 17:14:47 +02:00
Aleksander Morgado 306b4eb509 core: allow grabbing QMI ports 2012-08-29 17:14:47 +02:00
Aleksander Morgado ae9e2df294 iface-modem-3gpp: don't try to update anything if no skeleton available 2012-08-28 17:25:32 +02:00
Aleksander Morgado 3ee1fb691c iface-modem-cdma: don't try to update anything if no skeleton available 2012-08-28 17:25:25 +02:00
Aleksander Morgado 26e95b2d3c iface-modem-location: don't try to update anything if no skeleton available 2012-08-28 17:21:08 +02:00
Aleksander Morgado 3ff03c946f iface-modem-simple: don't launch band/mode updates unless explicitly required 2012-08-28 17:15:18 +02:00
Aleksander Morgado 8225dec907 iface-modem: supported bands may be reported as UNKNOWN if couldn't be loaded 2012-08-28 17:15:18 +02:00
Aleksander Morgado 9dbf9a8d0e iface-modem: don't validate against supported bands if these are unknown 2012-08-28 17:15:18 +02:00
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