Commit Graph

2375 Commits

Author SHA1 Message Date
Aleksander Morgado
7ce65fe85d broadband-modem: try to guess more specific 2G/3G/4G mode support
For 3GPP modems, we'll try with AT+WS46=?, which is the standard command to
query supported networks. If it returns error, we'll fallback to the defaults.

For CDMA modems, we'll try to gather CDMA1x and/or EV-DO support directly from
the AT+GCAP response.
2012-07-16 08:30:50 +02:00
Aleksander Morgado
f4ad5c805e iface-modem-cdma: new steps to setup/cleanup unsolicited messages 2012-07-16 08:30:45 +02:00
Aleksander Morgado
209f4d4420 iface-modem-[3gpp|cdma]: remove contexts with timeouts when shutting down
Following the same logic as in commit 9ddcf92a, those contexts in the interface
which contain the setup of a timeout are cleared before removing the DBus
skeleton objects, so that we make sure they are not fired out once these have
been disposed.
2012-07-13 09:09:15 +02:00
Ben Chan
9ddcf92a18 iface-modem: fix crashes due to removed skeleton
expire_signal_quality() / mm_iface_modem_update_access_technologies()
may be called after the DBus object skeleton is removed in
mm_iface_modem_shutdown() and before their associated timeout source is
removed (in *_context_free) due to destruction of the modem object.

This patch fixes the issue by removing context objects before removing
the DBus skeleton in mm_iface_modem_shutdown().
2012-07-13 08:42:05 +02:00
Ben Chan
0519af932e port-probe: fix crash in serial_probe_at_parse_response due to NULL response
When the serial port is not open, internal_queue_command
(mm-serial-port.c) invokes serial_probe_at_parse_response
(mm-port-probe.c) with a NULL response. This patch modifies
serial_probe_at_parse_response to handle NULL response properly.
2012-07-12 22:58:58 +02:00
Aleksander Morgado
513abb2ccf polkit: fix authority object disposal 2012-06-27 15:38:28 +02:00
Aleksander Morgado
df1f21d17f sms: fix setting multipart specific properties
Don't make them construct-only, so that we can set them whenever needed.
2012-05-06 18:53:03 +02:00
Aleksander Morgado
8a47621a5c sms,tests: new test to check for multipart support in SMS parts 2012-05-06 18:48:59 +02:00
Tore Anderson
6b9ee7c833 broadband-bearer: derive PDP type from the ip-type bearer property
This patch makes it possible to use MM to set up PDP contexts with
PDP types other than 'IP', which is particularly useful when trying
to use the 'IPV6' or 'IPV4V6' PDP types defined in recent 3GPP specs.

If ip-type isn't specified, 'IP' will be used by default, due to the
fact that modem support for the 'IPV4V6' type is still rather scarce.

The patch applies to Aleksander's 'bearer-properties' branch. It has
been tested using mmcli in this fashion:

mmcli -m 0 --simple-connect=apn=internet # default to 'IP'
mmcli -m 0 --simple-connect=apn=internet,ip-type=IP
mmcli -m 0 --simple-connect=apn=internet,ip-type=IPV6
mmcli -m 0 --simple-connect=apn=internet,ip-type=IPV4V6
2012-05-06 17:12:36 +02:00
Aleksander Morgado
caeeae2721 bearer: simplify handling of the bearer configuration
The base MMBearer object will receive the MMBearerProperties configuration,
which contains every generic and plugin-specific set up. Not every configuration
parameter will be used by every implementation (e.g. not every bearer needs
user/password).

The Bearer object will expose every configuration parameter received in its
`Properties' property in the interface, even if it's not really used.
2012-05-06 17:12:36 +02:00
Dan Williams
90f4a034b2 modem-helpers: recognize 3GPP2 access tech strings too
Various Gobi-based devices (USB551L, probably Gobis too) can report
EVDO and 1X as the current RAT from CNTI so parse that here too.
2012-05-04 17:38:36 -05:00
Dan Williams
1e024c711a broadband-modem: add another Novatel +GCAP LTE response
This time from the 551L.  I wonder when they'll make up their minds
about what to return.
2012-05-04 17:19:20 -05:00
Nathan Williams
00cb8a26a8 Add a utility routine to do ITU V.250 quoting of strings for AT commands.
BUG=chromium-os:27096,chromium-os:27063
TEST=None
Change-Id: Ic1d24a9e4b7421db7f8d16c52535bd6d2780423e
2012-05-02 21:05:06 +02:00
Nathan Williams
01a17f5c6c helpers: adjust parsing of +CNUM response to permit spaces in the alphanumeric descriptor.
This permits matching a response such as '"Line 1","+19999999999",145',
which previously did not match.

Change-Id: I666af8774507c6c3b3e214b820449542065dd8b4
2012-04-13 23:35:13 +02:00
Aleksander Morgado
d379b9ea2a bearer: allow subclasses to report disconnection
The new `mm_bearer_report_disconnection()' allows subclasses to notify about
being disconnected, so that every layer of inheritance can chain its own code
to reset the connection status.

This commit partially disables the logic included in commit 981222. Now
subclasses (actually, no one) are not allowed to g_object_set() the
MM_BEARER_STATUS property.
2012-04-10 23:27:25 +02:00
Aleksander Morgado
83afd3ddc9 iface-modem: new helpers to query supported modes 2012-04-10 18:28:33 +02:00
Aleksander Morgado
bc0d9ddf5f broadband-modem: query supported networks to get a better supported modes value
If we base our supported modes default guessing only on capabilities listed by
AT+GCAP, we find that we don't know how to differenciate between 2G and 3G 3GPP
modems. So, if supported, we will try to query the list of supported networks
with AT+WS46=?, which explicitly tells us if the modem supports GERAN and/or
UTRAN and/or E-UTRAN. Note that plugins need to request this new behaviour by
setting the `MM_BROADBAND_MODEM_USE_WS46' property to TRUE when creating the
modem object.
2012-04-10 18:27:17 +02:00
Aleksander Morgado
b49ddfe930 iface-modem: skip handling the CURRENT_CAPABILITIES property
It is an unnecessary complication, as long as we can keep the helpers in the interface.
2012-04-10 17:47:43 +02:00
Aleksander Morgado
9812225d93 bearer: always reset interface state when going into disconnected status
Custom bearer implementations in Plugins are allowed to g_object_set() the
MM_BEARER_STATUS property to DISCONNECTED in order to notify that the bearer got
disconnected. We need to always reset the interface state (remove IP config, set
connected=FALSE,...) also in that case.

Also consolidated in some helper private functions the way the bearer status is
updated.
2012-04-10 10:46:10 +02:00
Aleksander Morgado
cfeebcd63a manager: no need to remove modems in idle
There is no problem in getting the modem removed just after finishing the
disabling sequence.
2012-03-30 16:18:48 +02:00
Aleksander Morgado
3094e3f26b manager: try to get all modems disabled before while shutting down 2012-03-30 16:11:55 +02:00
Aleksander Morgado
8c84aea3f0 base-modem: disconnect internal cancellable handler while disposing 2012-03-30 16:11:14 +02:00
Aleksander Morgado
b68461c417 base-modem: plug small leaks 2012-03-30 16:09:27 +02:00
Aleksander Morgado
b03541b1fe plugin-base: don't setup udev client notifications 2012-03-30 13:47:00 +02:00
Aleksander Morgado
0372e73abd port-probe-cache: ensure we cleanup every possible leftover 2012-03-30 13:47:00 +02:00
Aleksander Morgado
94d46a4387 plugin-base: plug memleak 2012-03-30 13:47:00 +02:00
Aleksander Morgado
7518772d4b core: fatal errors in iface initializations force the modem into a FAILED state
Modems which end up being found unusable (e.g. no SIM, fatal SIM error, no
capabilities) will be exposed in DBus, but just with the Modem interface and
in a FAILED state which allows no actions.
2012-03-30 13:47:00 +02:00
Aleksander Morgado
3b366118b6 simple: need to wait to get fully initialized before trying to enable 2012-03-30 10:25:33 +02:00
Aleksander Morgado
374c028b16 broadband: reload operator and registration info only when enabling 3GPP location source 2012-03-30 08:20:38 +02:00
Aleksander Morgado
0d8cf160e5 broadband: ensure 3GPP location info gets updated when enabling the source
Whenever 3GPP location source gets enabled, we'll launch new registration status
checks (to get updated LAC/CI) and new operator code/name checks (to get updated
MCC/MNC).

Additional changes were needed in the HSO plugin, so that the specific location
gathering enabling implemented by the HSO modem chains up parent's one first.
2012-03-29 17:20:37 +02:00
Aleksander Morgado
3cea187a94 location: update the status before running enabling/disabling sequences
This will allow implementations of location source enabling to actually update
the location information during the enabling phase.
2012-03-29 17:17:52 +02:00
Aleksander Morgado
43bd3f95ae 3gpp: let operator name/code reloading be requested by implementations 2012-03-29 17:16:38 +02:00
Aleksander Morgado
dc376bb725 3gpp: errors when reloading operator name/code will reset the values in the interface 2012-03-29 17:15:48 +02:00
Aleksander Morgado
bb2f9b672c broadband-modem: remove unused variable 2012-03-29 16:10:07 +02:00
Aleksander Morgado
b80fdfdaa8 iface-modem-location: plug memleak and reference count mismatch 2012-03-29 09:18:04 +02:00
Aleksander Morgado
33e569bbab iface-modem-location: handle the raw GPS location source 2012-03-29 09:18:03 +02:00
Aleksander Morgado
53b500c11d iface-modem-location: handle the NMEA-based GPS location source 2012-03-29 09:18:03 +02:00
Aleksander Morgado
1cfab89719 base-modem: use new `MMGpsSerialPort' type for the raw GPS port 2012-03-29 09:17:53 +02:00
Aleksander Morgado
a0b3663274 gps-serial-port: new type to handle read-only serial ports with GPS traces 2012-03-29 09:17:53 +02:00
Aleksander Morgado
6d50e5195f serial-port: forced close only to be done once 2012-03-29 09:17:53 +02:00
Aleksander Morgado
ceefa2c356 location: rework to allow multiple location sources
Location sources can now be enabled or disabled by using the mask of sources
given in Setup() (similar previous Enable()).
2012-03-29 09:17:53 +02:00
Aleksander Morgado
be633fd66b base-modem: handle GPS control and data ports
Plugin may specify GPS-specific port tyeps when requesting to grab the port.
These could either be an AT-based GPS control port, or the raw GPS serial port
which emits the NMEA traces.
2012-03-28 15:50:51 +02:00
Aleksander Morgado
b19f97ae7d port: new `MM_PORT_TYPE_NET' for pure net devices
Net devices will be MMPorts of type MM_PORT_TYPE_NET.
2012-03-28 15:50:51 +02:00
Aleksander Morgado
3b481cf17f base-modem: no need for `port_grabbed()'
Subclasses can configure additional stuff in the ports just after all have been
organized, in the SETUP_PORTS initialization step in MMBroadbandModem.
2012-03-28 15:50:51 +02:00
Aleksander Morgado
8dfbf195c1 port: skip LAST enums in glib-mkenums processing 2012-03-28 15:50:51 +02:00
Aleksander Morgado
68421638f5 at-serial-port: new flag to define the GPS control port 2012-03-28 15:50:51 +02:00
Aleksander Morgado
79c93f4333 at-serial-port: define flags by shifting bits
Otherwise glib-mkenums doesn't take the enumeration as being flags.
2012-03-28 15:50:51 +02:00
Aleksander Morgado
62923f9086 serial-port: ensure we close the port when forcing to close it 2012-03-28 15:50:43 +02:00
Aleksander Morgado
b8157228eb broadband-modem: plug memleak when uppercasing storage names 2012-03-28 15:50:43 +02:00
Aleksander Morgado
029cb2abe9 broadband-modem: plug memleak when building AT command 2012-03-28 15:50:43 +02:00