Commit Graph

34 Commits

Author SHA1 Message Date
Ben Chan
254f2e3412 plugins: remove explicit GDestroyNotify cast on g_free / g_object_unref
g_free and g_object_unref are in form of  `void (*)(gpointer)`, which
matches the GDestroyNotify signature. An explicit GDestroyNotify cast on
g_free and g_object_unref is thus not needed.
2017-03-29 10:22:18 +02:00
Ben Chan
31655bb5a5 glib: remove invocations of g_type_init()
g_type_init() has been deprecated (and also marked with the attribute
'deprecated') since glib 2.36 as the type system is automatically
initialized. Since the minimum version of glib required by ModemManager
is 2.36, calling g_type_init() isn't necessarily in the ModemManager
code.
2017-02-03 10:05:14 +01:00
Ben Chan
c8ec731043 ublox: fix uninitialized variable issue
This patch fixes an uninitialized variable issue in
mm_ublox_parse_ugcntrd_response_for_cid(), which uses an uninitialized
`match_info' when `in_cid' is invalid.
2017-01-24 11:07:51 +01:00
Aleksander Morgado
e3e803998c ublox: add README explaining all details of the plugin 2016-10-12 13:24:10 +02:00
Aleksander Morgado
38bf567536 ublox: longer timeout needed for AT probing
When the device is reset, it needs some time before the newly exposed TTYs are
able to reply to our AT commands. We increase the default timeout of the AT
probing commands in order to cope with that, or we'll end up with TTYs of
'unknown' type that aren't used for anything.
2016-10-12 13:24:09 +02:00
Aleksander Morgado
e64b964e8e ublox: implement connection statistics loading
The implementation uses +UGCNTRD=? to query whether the per-PDP context
statistics are supported by the device, and if they are, +UGCNTRD is used to
query them.

We only process the statistics for the specific CID we're using.
2016-10-12 13:24:09 +02:00
Aleksander Morgado
e6e53467ee ublox: new +UGCNTRD? response parser
The parser returns only the results for the CID being specified as input. This
is so that we can just query the statistics of the CID currently in use by the
bearer.
2016-10-12 13:24:09 +02:00
Aleksander Morgado
79aebb9ba4 ublox: implement current bands setting
Reuse the logic and context used to update current modes, as we need the same
steps (check current power state, go into low power, config update, and recover
previous power state).
2016-10-12 13:24:09 +02:00
Aleksander Morgado
1c69a847ae ublox: new +UBANDSEL=X command builder 2016-10-12 13:24:09 +02:00
Aleksander Morgado
c165f24514 ublox: implement current bands loading 2016-10-12 13:24:09 +02:00
Aleksander Morgado
09c9ca5749 ublox: new +UBANDSEL? response parser 2016-10-12 13:24:09 +02:00
Aleksander Morgado
4632836d40 ublox: implement supported bands loading 2016-10-12 13:24:09 +02:00
Aleksander Morgado
ca1b9cb686 ublox: use +UAUTHREQ to setup PDP context authentication 2016-10-12 13:24:08 +02:00
Aleksander Morgado
4c02fba819 ublox: implement PIN retry count loading 2016-10-12 13:24:08 +02:00
Aleksander Morgado
29517c99ba ublox: new +UPINCNT response parser 2016-10-12 13:24:08 +02:00
Aleksander Morgado
a561f6edf0 ublox: use +CEREG if LTE supported 2016-10-12 11:29:52 +02:00
Aleksander Morgado
7cb11f72cd ublox: implement current modes setting and modem power up/down/off/reset
Changing current allowed/preferred modes requires the device to be in low-power
mode, so we will make sure we return an error if any power operation is already
ongoing when a new one is requested.
2016-10-12 11:29:52 +02:00
Aleksander Morgado
9d78f05cbd ublox: new +URAT=X command builder 2016-10-12 11:29:52 +02:00
Aleksander Morgado
5d2e89e712 ublox: implement power state loading 2016-10-12 11:29:52 +02:00
Aleksander Morgado
151d608eec ublox: new u-blox specific +CFUN? response parser 2016-10-12 11:29:52 +02:00
Aleksander Morgado
b34f147ba2 ublox: implement current modes loading 2016-10-12 11:29:52 +02:00
Aleksander Morgado
bde9c4795a ublox: new +URAT? response parser 2016-10-12 11:29:52 +02:00
Aleksander Morgado
29ace8b120 ublox: implement supported modes loading
AT+URAT=? provides the format expected, but looks like it isn't implemented
differently for the different u-blox devices seen, so we need an additional
level of filtering which currently is applied per device model string.
2016-10-12 11:29:52 +02:00
Aleksander Morgado
a4466e83b7 ublox: new +URAT=? response parser 2016-10-12 11:29:52 +02:00
Aleksander Morgado
37bd614212 broadband-modem: implement default connection monitoring logic
A default implementation to monitor the ongoing connection is provided in the
generic MMBroadbandModem, based on AT+CGACT? to check whether the PDP context
of the connection (identified by the cached cid) is active or not.

This commit also disables the connection monitoring logic in those plugins that
have custom connection methods.
2016-10-12 11:29:52 +02:00
Aleksander Morgado
30772ffc26 ublox: implement connection using the 2G/3G logic in router or bridge mode 2016-10-12 11:29:52 +02:00
Aleksander Morgado
81715ee591 ublox: new +UIPADDR=N response parser 2016-10-12 11:29:52 +02:00
Aleksander Morgado
bc07ec0835 ublox: new broadband bearer object 2016-10-12 11:29:52 +02:00
Aleksander Morgado
eade066d8a ublox: generate enum types for usb profile and networking mode 2016-10-12 11:29:51 +02:00
Aleksander Morgado
3b0ceabc5d ublox: preload networking mode and usb profile when creating a new bearer 2016-10-12 11:29:51 +02:00
Aleksander Morgado
9d2c2a75cc ublox: new 'AT+UBMCONF?' response parser 2016-10-12 11:29:51 +02:00
Aleksander Morgado
241b63304b ublox: new 'AT+UUSBCONF?' response parser 2016-10-12 11:29:51 +02:00
Aleksander Morgado
40f3725ef9 ublox: new broadband modem object 2016-10-12 11:29:51 +02:00
Aleksander Morgado
f22c088cee ublox: new plugin skeleton 2016-10-12 11:29:51 +02:00