Commit Graph

7059 Commits

Author SHA1 Message Date
Bjørn Mork
239ab6ca6b blacklist: ignore Infineon flashloader device
A device like this shows up briefly while the Sierra EM7345 is booting:

P:  Vendor=8087 ProdID=0716 Rev= 0.00
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

We do have a driver identifying this as an "Infineon Flashloader"
device.  It is not a modem in any case, and should be ignored.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2014-06-02 16:42:25 +02:00
Ben Chan
4213d2fe69 broadband-modem: report an error when enabling a modem in FAILED state
If the initialization of the Modem3gpp / ModemCdma interface fails, the
modem transitions to the FAILED state. But since the Modem interface is
already initialized and exported over DBus, it is possible to invoke the
Enable method on the Modem interface. This patch changes
MMBroadbandModem to report an error if one tries to enable the modem in
the FAILED state instead of raising an assertion.
2014-06-02 08:55:08 +02:00
Thieu Le
cdb334649d altair-lte: fix memory leak in PCO parsing code
This patch fixes memory leaks in PCO parsing code detected by LeakSanitizer.
2014-05-31 18:55:13 +02:00
Ben Chan
6e7bae9dc5 tests: fix memory leaks
This patch fixes memory leaks in unit tests detected by LeakSanitizer.
2014-05-30 13:31:41 +02:00
Aleksander Morgado
c2d3704aa5 api,doc: add missing documentation for the new GPRS errors 2014-05-29 10:10:16 +02:00
Ben Chan
c8f62fb4de altair-lte: ignore invalid bands in %BANDCAP / %GETCFG="BAND" responses
Due to a firmware issue, the modem may reply an invalid band value, such
as 0, for the %BANDCAP or %GETCFG="BAND" command. This patch moves
parse_bands_response() to mm-modem-helpers-altair-lte.c, modifies the
function to ignore any invalid band outside the range of E-UTRAN
operating bands, and add unit tests for the function.
2014-05-29 10:06:37 +02:00
Ben Chan
8cdf45c66c core: add E-UTRAN operating band 44
E-UTRAN operating band 44 is specified in 3GPP release 11 (see Table
5.5-1 "E-UTRA operating bands" in 3GPP TS 36.101 version 11.2.0 Release
11).
2014-05-29 10:06:24 +02:00
Ben Chan
54b75e3bcd qcdm: fix memory leaks in tests 2014-05-29 10:05:45 +02:00
Ben Chan
f0542aa809 cli: show a nicer modem description if manufacturer or model is unknown 2014-05-29 10:05:28 +02:00
Thieu Le
08d8524b17 altair-lte: prevent connect while processing sim refresh
This patch modifies the Altair LTE plugin to fail connect requests while the
modem has detached from the network when processing sim refresh.
2014-05-28 16:01:56 -05:00
Ben Chan
551197b4e5 plugins: remove unnecessary MM_BASE_MODEM() casts 2014-05-21 11:59:49 +02:00
Ben Chan
c8ad177db9 sms: remove unnecessary MM_BASE_MODEM() casts 2014-05-21 11:59:11 +02:00
Ben Chan
d375224ffe broadband-bearer: remove unnecessary MM_BASE_MODEM() casts 2014-05-21 11:58:32 +02:00
Ben Chan
3d378bef5d tests: consistently use spaces for indentation 2014-05-21 11:58:03 +02:00
Ben Chan
37b0402ee5 core: minor coding style fixes 2014-05-20 09:32:29 +02:00
Ben Chan
d4177f554b cli: consistently use spaces for indentation 2014-05-20 09:32:15 +02:00
Ben Chan
5d47478d06 libmbim-glib: consistently use spaces for indentation 2014-05-20 09:32:02 +02:00
Ben Chan
7c656cce47 mbm: minor coding style fixes 2014-05-20 09:31:42 +02:00
Ben Chan
bdab75d0b8 option,hso: minor coding style fixes 2014-05-20 09:31:31 +02:00
Ben Chan
f5d7213a3c icera: minor coding style fixes 2014-05-20 09:31:18 +02:00
Ben Chan
a0d15f23c9 huawei: minor coding style fixes 2014-05-19 12:47:28 +02:00
Ben Chan
adcda0a544 broadband-modem-mbim: refine access technology updates
This patch refines the access technology updates on a MBIM modem by
observing the MBIM_CID_PACKET_SERVICE notifications in addition to the
MBIM_CID_REGISTER_STATE notifications. If a MBIM_CID_PACKET_SERVICE
notification indicates the highest available data class, the current
access technology is updated to reflect that. Otherwise, the access
technology is updated according to the available data classes indicated
by a MBIM_CID_REGISTER_STATE notification.
2014-05-19 12:47:16 +02:00
Dan Williams
66e4b0d603 api,errors: define new EPS-related errors
We can use these to return better error messages if an operator
does not support the default subscription APN functionality,
and the user does not give us an APN.
2014-05-07 16:19:00 -05:00
Dan Williams
8e3b67bf44 broadband-bearer-qmi: don't set APN if it isn't given
If the APN was empty (implying that the modem/network should choose
the default APN) this caused an assertion in libqmi.  Just don't
set an APN if we aren't given one.
2014-05-07 16:18:11 -05:00
Martin Pitt
828e2e00eb libmm-glib: Initialize result array
In mm_modem_messaging_get_supported_storages(), initialize array to avoid a
potential crash with an uninitialized value, and a build failure due to

mm-modem-messaging.c:168:24: error: 'array' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
     *n_storages = array->len;

https://bugzilla.gnome.org/show_bug.cgi?id=729267
2014-05-05 20:47:55 +02:00
Aleksander Morgado
0126eb6311 sierra: PCSTATE=0 needs to be treated as low-power mode
OFF only applies to a real shutdown, where the modem no longer replies.
2014-05-05 20:30:45 +02:00
Ben Chan
771c83a73a huawei: treat CFUN 0 as low power state
The Huawei plugin uses +CFUN=0 to put the modem in low power mode as
+CFUN=4 isn't supported by all Huawei modems. This patch modifies the
plugin to treat CFUN 0 as the 'LOW' power state, which is necessary as
otherwise ModemManager would prevent the modem from transitioning to the
'ON' power state.
2014-05-01 16:57:30 +02:00
Aleksander Morgado
ae99c452eb examples: add modem watcher example in JS 2014-04-11 10:31:02 +02:00
Aleksander Morgado
ebff76cfaa examples: add modem watcher example in python 2014-04-11 10:31:01 +02:00
Ben Chan
79b34b77b4 port-probe: remove the 3s wait before opening a MBIM port
The 3s wait before opening a MBIM port is not necessary for handling a
delayed response to the MBIM OPEN messages. mbim_device_open() already
retries the MBIM OPEN message when the MBIM device does not respond.
2014-04-03 09:34:16 +02:00
David (Pololu)
09d92ef333 blacklist: All devices from Pololu Corporation except some possible future products.
We make many USB virtual COM port devices, none of which are modems.
ModemManager's automatic attempts to access those devices can cause
problems.

That might change in the future, so we have left two potential
future product IDs off of the blacklist.
2014-04-02 08:54:17 +02:00
Aleksander Morgado
1af1d1fb78 novatel: read HDR signal quality
(ttyUSB0): --> 'AT$NWRSSI<CR>'
(ttyUSB0): <-- '<CR><LF><CR><CR><LF> HDR RSSI= 93<CR><LF><CR><LF><CR><LF>OK<CR><LF>
2014-04-01 18:33:09 +02:00
Aleksander Morgado
2a5230c93e docs,libmm-glib: add methods to manage the MTU in the MMBearerIpConfig 2014-03-25 17:13:59 +01:00
Ben Chan
a0ddcaa7a4 bearer-mbim: update MTU in bearer IP config properties
This patch modifies MMBearerMbim to update the MTU value in the bearer
IPv4 and IPv6 config property when such information is available in the
MBIM_CID_IP_CONFIGURATION response.
2014-03-25 17:10:22 +01:00
Ben Chan
c184c2f1be cli: print MTU in bearer IP config properties 2014-03-25 17:10:17 +01:00
Ben Chan
e4db8c5302 api: add MTU to bearer IP config properties
This patch adds a 'mtu' value to the Ip4Config and Ip6Config property of
a Bearer object, which indicates the value of the maximum transmission
unit for the established connection when such information is available
(e.g. via QMI_WDS_GET_RUNTIME_SETTINGS on a QMI modem or
MBIM_CID_IP_CONFIGURATION on a MBIM modem).
2014-03-25 17:10:13 +01:00
Ben Chan
4de728447a bearer-mbim: fix a misleading comment 2014-03-25 12:13:54 +01:00
Ben Chan
aa9af0ba68 introspection: fix typos 2014-03-25 12:13:36 +01:00
Aleksander Morgado
e9cae166cc blacklist: ignore empiriKit science lab controller device 2014-03-24 16:24:48 +01:00
Ben Chan
4827933f0c port-serial: fix command context completion when clearing command queue
This patch removes an extra invocation of g_simple_async_result_complete
on the result associated with each command context in the command queue
when mm_port_serial_close clears the queue. It also changes the code to
complete the results in idle, which avoids a nested invocation of
mm_port_serial_close. That could happen if the completion of the result
calls mm_port_serial_close again (e.g. via at_command_context_free,
at_sequence_context_free in mm-base-modem-at.c). The nested invocation
of mm_port_serial_close could create undesirable effects (e.g. the
assertion on open_count > 0 fails in case of a forced close).
2014-03-18 15:11:36 +01:00
Ben Chan
31a19c2299 broadband-modem,modem-helpers: improve +CGDCONT? error handling
This patch fixes the following crash, which happens when
MMBroadbandBearer tries to parse the NULL response of a failed +CGDCONT?
query. It also fixes a leak in parse_pdp_list where it fails to free the
GError object return by mm_3gpp_parse_cgdcont_read_response.

Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )

0x7feb15564c11   [ModemManager]            - mm-modem-helpers.c:850      mm_3gpp_parse_cgdcont_read_response
0x7feb15518e51   [ModemManager]            - mm-broadband-bearer.c:927   parse_pdp_list
0x7feb1551ada2   [ModemManager]            - mm-base-modem-at.c:189      at_sequence_parse_response
0x7feb151d4b86   [libgio-2.0.so.0.3400.3]  - gsimpleasyncresult.c:775    g_simple_async_result_complete
0x7feb1556e223   [ModemManager]            - mm-port-serial-at.c:355     serial_command_ready
0x7feb151d4b86   [libgio-2.0.so.0.3400.3]  - gsimpleasyncresult.c:775    g_simple_async_result_complete
0x7feb1556a834   [ModemManager]            - mm-port-serial.c:141        command_context_complete_and_free
0x7feb1556bc26   [ModemManager]            - mm-port-serial.c:734        port_serial_got_response
0x7feb1556c51a   [ModemManager]            - mm-port-serial.c:758        port_serial_timed_out
0x7feb1508cc33   [libglib-2.0.so.0.3400.3] - gmain.c:4026                g_timeout_dispatch
0x7feb1508c087   [libglib-2.0.so.0.3400.3] - gmain.c:2715                g_main_context_dispatch
0x7feb1508c437   [libglib-2.0.so.0.3400.3] - gmain.c:3290                g_main_context_iterate
0x7feb1508c891   [libglib-2.0.so.0.3400.3] - gmain.c:3484                g_main_loop_run
0x7feb1550ad16   [ModemManager]            - main.c:154                  main
0x7feb14a9e9c6   [libc-2.15.so]            - libc-start.c:234            __libc_start_main
0x7feb1550a808   [ModemManager             + 0x00023808
2014-03-14 08:31:32 +01:00
Aleksander Morgado
6bdcd7cb22 data: add icon 2014-03-09 22:15:16 +01:00
Aleksander Morgado
4eb733c07c wavecom: avoid +COPS=0 if already in automatic registration mode
AT+COPS=0 in a FXT009 may end up making the device stuck in a weird state
in which it only replies "+CME ERROR: 515" to every AT command. So try to
avoid this command whenever possible.
2014-03-07 12:30:36 +01:00
Ben Chan
f14a2ea14e broadband-modem-mbim: handle subscriber info updates
Subscriber information like MSISDNs / MDNs may not be readily available
when MMIfaceModem queries for it during modem initialization.

This patch modifies MMBroadbandModemMbim to subscribe to the
MBIM_CID_SUBSCRIBER_READY_STATUS notification and update the
'OwnNumbers' property of the Modem interface when the information
becomes available.
2014-03-06 14:32:29 +01:00
Ben Chan
a7da3fc387 broadband-modem-mbim: update to use mbim_message_device_service_subscribe_list
libmbim renames 'MBIM_CID_DEVICE_SERVICE_SUBSCRIBER_LIST' to
'MBIM_CID_DEVICE_SERVICE_SUBSCRIBE_LIST' to be consistent with the MBIM
specification. This patch updates MMBroadbandModemMbim accordingly.
2014-03-06 14:31:29 +01:00
Aleksander Morgado
a2ef167ccd build: require libmbim 1.8
We're going to add support for some features only available in that version.
2014-03-06 14:30:56 +01:00
Ben Chan
70fb7c2ede broadband-modem: fix hdr_subsys_state_info_ready
hdr_subsys_state_info_ready() did not implement the GAsyncReadyCallback
function signature, which led to a crash. This patch fixes
hdr_subsys_state_info_ready() to properly extract the QCDM response from
the GAsyncResult object.
2014-03-06 09:04:17 +01:00
Aleksander Morgado
22193e2f3a license: add LGPLv2+ license in addition to the GPLv2+ one
This is not a license change; the daemon and command line tool are still GPLv2+,
and the libmm-glib library LGPLv2+.

For reference, see libqmi bug:
  https://bugs.freedesktop.org/show_bug.cgi?id=74220
2014-03-05 11:49:09 +01:00
Ben Chan
4a5a0197b5 port-mbim: increase timeout of device open operation
A MBIM device typically delays its response to an 'Open' command when it
has not completed the initialization process. This patch increases the
timeout of the MBIM device open operation from 10s to 30s to handle
situations where the device takes much longer to initialize.
2014-03-04 19:27:19 +01:00
Aleksander Morgado
f3ded99af1 cinterion: implement unlock retries loading 2014-03-03 16:33:51 +01:00