Commit Graph

1207 Commits

Author SHA1 Message Date
Aleksander Morgado
6d45976942 tests,generic: rename basic DBus test 2016-01-16 17:59:49 +01:00
Aleksander Morgado
7136c0b321 tests,port-context: explicitly close the socket that is added to the listener
Since GLib 2.42, the sockets that are added to socket listeners may no longer
be closed automatically when the listener is finalized. In order to avoid that,
we will keep our own socket reference and close/unref it ourselves.

This issue was preventing adding new test cases with the same port names.

    $ ./test-service-generic --verbose
    GTest: random seed: R02S889153ee0f2e59c570f4edff9caa4176
    GTest: run: /MM/Service/Generic/enable-disable
    Activating service name='org.freedesktop.ModemManager1'
    Successfully activated service 'org.freedesktop.ModemManager1'
    (MSG: DEBUG: client connection closed)
    (MSG: MESSAGE: Found modem at '/org/freedesktop/ModemManager1/Modem/0')
    ** Message: Found modem at '/org/freedesktop/ModemManager1/Modem/0'
    (MSG: DEBUG: client connection closed)
    GTest: result: OK
    GTest: run: /MM/Service/Generic/cme-error-detected
    Activating service name='org.freedesktop.ModemManager1'
    Successfully activated service 'org.freedesktop.ModemManager1'
    (MSG: FATAL-ERROR: Cannot bind socket: Error binding to address: Address already in use)

    ** (/home/aleksander/Development/foss/ModemManager/plugins/.libs/lt-test-service-generic:32043): ERROR **: Cannot bind socket: Error binding to address: Address already in use
2016-01-16 17:59:49 +01:00
Aleksander Morgado
dfd111f291 tests,test-fixture: don't rely on other threads to update dbus properties
We were wrongly using a main loop in the port context thread to manage the
global main context. That was silently making the DBus property notifications
kind of work, as they were being updated via another thread, so here we could
just sleep() and recheck the property values.

Given that having that unrelated thread updating the dbus properties of our
MMManager object is not a good thing, we'll instead totally ignore that and
fully re-create the MMManager in each iteration with the sync() method, which
has its own internal thread.
2016-01-16 17:59:49 +01:00
Aleksander Morgado
87bafa33dc tests,port-context: properly setup per-thread main context
Instead of creating a new main context to be used in the thread, we were using
the global context. So, fix that, and create a totally new pair of main context
and main loop to be used within the thread.
2016-01-16 17:59:49 +01:00
Aleksander Morgado
0ebf6d5da5 mbm: query supported modes to the modem with +CFUN=?
We were trying to load the generic modes supported reported by either *CNTI=2 or
AT+WS46=?, so that then we could filter out the MBM-specific modes unsupported.

But, this may not be ideal, as both these two commands may fail:

    [mm-broadband-modem.c:1612] modem_load_supported_modes(): loading supported modes...
    [mm-port-serial.c:1237] mm_port_serial_open(): (ttyACM1) device open count is 3 (open)
    [mm-port-serial.c:1294] _close_internal(): (ttyACM1) device open count is 2 (close)
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): --> 'AT*CNTI=2<CR>'
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- '<CR><LF>ERROR<CR><LF>'
    [mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
    [mm-broadband-modem.c:1546] supported_modes_cnti_ready(): Generic query of supported 3GPP networks with *CNTI failed: 'Unknown error'
    [mm-port-serial.c:1237] mm_port_serial_open(): (ttyACM1) device open count is 3 (open)
    [mm-port-serial.c:1294] _close_internal(): (ttyACM1) device open count is 2 (close)
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): --> 'AT+WS46=?<CR>'
    [mm-port-serial-at.c:440] debug_log(): (ttyACM1): <-- '<CR><LF>ERROR<CR><LF>'
    [mm-serial-parsers.c:364] mm_serial_parser_v1_parse(): Got failure code 100: Unknown error
    [mm-broadband-modem.c:1494] supported_modes_ws46_test_ready(): Generic query of supported 3GPP networks with WS46=? failed: 'Unknown error'
    [mm-iface-modem.c:3974] load_supported_modes_ready(): couldn't load Supported Modes: 'Couldn't retrieve supported modes'

Instead, we'll ask the modem for the list of modes supported, and return that
directly.
2016-01-10 17:46:12 +01:00
Aleksander Morgado
aae96778c5 build: don't redefine test_modem_helpers_telit_LDADD 2015-12-19 11:56:07 +01:00
Aleksander Morgado
0a88ae2d6d telit: use explicit FIRST step name 2015-12-19 11:51:11 +01:00
Aleksander Morgado
46f601edf6 telit: don't talk to the user in a GError 2015-12-19 11:50:22 +01:00
Aleksander Morgado
a74edab57f telit: prefix helper methods with 'mm_telit' 2015-12-19 11:45:32 +01:00
Aleksander Morgado
740e1b5461 telit: fix minor coding style issues 2015-12-19 11:44:00 +01:00
Carlo Lobrano
c4ffe572ae telit: add load_unlock_retries interface 2015-12-19 11:39:48 +01:00
Carlo Lobrano
7978225934 telit: add modem_reset to telit plugin 2015-12-11 09:09:57 +01:00
Carlo Lobrano
14e4771056 telit: add modem_power_down to telit plugin 2015-12-04 10:59:28 +01:00
Aleksander Morgado
ffde429843 core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncs 2015-12-02 17:07:39 +01:00
Dan Williams
a8666bd98f sierra: fix build error when MBIM and QMI are disabled
Found by Jean-Christian de Rivaz
2015-09-24 14:17:03 -05:00
Aleksander Morgado
fcf54bd8b2 huawei: plug memleak 2015-08-02 10:49:14 +02:00
Marco Bascetta
f6779d60fe huawei,voice: ignore undocumented ^CSCHANNELINFO unsolicited command
This command is sent by Huawei ME909s-120 with firmware 23.613.61.00.00
2015-08-02 10:39:48 +02:00
Aleksander Morgado
61562fbe8b huawei,voice: minor coding style fixes 2015-08-02 10:39:48 +02:00
Marco Bascetta
8242a991dc huawei: fixed status_change reason on new outgoing call 2015-08-02 10:39:47 +02:00
Marco Bascetta
915e0e7422 huawei: signal incoming DTMF to DBus 2015-08-02 10:39:47 +02:00
Riccardo Vangelisti
40fae5fcba base-call: refactoring of error handling when call starts 2015-08-02 10:39:47 +02:00
Marco Bascetta
bf416045df huawei: acquire incoming DTMF on active call 2015-08-02 10:39:47 +02:00
Riccardo Vangelisti
be09f500bd huawei: added proprietary Huawei call handling 2015-08-02 10:39:47 +02:00
Marco Bascetta
55ae2c7f2f huawei: handle voice call state changes 2015-08-02 10:39:47 +02:00
Marco Bascetta
ae72922031 huawei: handle custom voice unsolicited events 2015-08-02 10:39:45 +02:00
Marc Murphy
1f270c09d0 huawei: update to correct secondary port request and regex masking for ^POSITION 2015-06-18 09:20:11 -07:00
Aleksander Morgado
d5adce08f5 build: only compile dbus tests if GIO >= 2.34 is available 2015-04-17 09:58:24 +02:00
Aleksander Morgado
f60b055142 mbm: enable GPS port for HS2350
https://bugs.freedesktop.org/show_bug.cgi?id=85008

As reported by Dan Williams <dcbw@redhat.com>.
2015-04-10 08:29:57 +02:00
Aleksander Morgado
5fb8e87abd mbm: enable GPS port for H5321gw
https://bugs.freedesktop.org/show_bug.cgi?id=85008

As reported by Sven Arvidsson <sa@whiz.se>.
2015-04-10 08:29:57 +02:00
Fabrice Bellet
534eea345d mbm: add GPS location gathering support
The udev rules file is updated according to the list of devices
supporting gps features provided by the udev rules file from the
mbm-gpsd project.

https://bugs.freedesktop.org/show_bug.cgi?id=85008
2015-04-10 08:29:49 +02:00
Aleksander Morgado
8009f16ecb huawei: allow responses like ^NDISSTATQry (e.g. Huawei E353) 2015-03-29 12:48:44 +02:00
Yunlian Jiang
977cf658a6 tests: fix memory leaks 2015-03-27 20:31:24 +01:00
Aleksander Morgado
948be2343a telit: minor coding style fixes 2015-03-27 19:06:43 +01:00
Daniele Palmas
12318970a7 telit: changing udev rules for HE910/UE910/UL865
Changing udev rules for HE910/UE910/UL865 in order to use dynamic port
identification through #PORTCFG (tag ID_MM_TELIT_PORTS_TAGGED)
2015-03-27 19:01:52 +01:00
Daniele Palmas
ad6d15b535 telit: implementing dynamic port identification with #PORTCFG
Adding dynamic port identification for Telit modems that support AT#PORTCFG
command. Port configurations for HE910/UE910/UL865 taken from document
"HE910/UE910/UL865 Families Ports Arrangements User Guide"
2015-03-27 19:01:45 +01:00
Aleksander Morgado
0e97dc3a7a zte: add support for ZTE MF700
Fix suggested by Pablo Nazar <pablo.e.nazar@gmail.com>

https://bugs.freedesktop.org/show_bug.cgi?id=89721
2015-03-25 08:38:44 +01:00
Daniele Palmas
a92566ec0e telit: adding 3gpp unsolicited events support for Telit modems
Mobile Equipment Event Reporting command for Telit modems (+CMER)
does not support <ind>=1. Changing to <ind>=2
2015-03-13 19:04:02 +01:00
Daniele Palmas
f9a5848d71 telit: add custom flow control settings for Telit HE910, UE910, UL865
Telit HE910, UE910 and UL865 do not support XON/XOFF; defaulting
to RTS/CTS
2015-03-12 12:01:23 +01:00
Daniele Palmas
00b5ae3e5b telit: Adding udev rules for Telit HE910, UE910 and UL865
Adding udev rules for proper modem identification.
2015-03-12 09:55:30 +01:00
Aleksander Morgado
46b2aeae53 novatel: fix checking for time support 2015-03-11 19:39:24 +01:00
Aleksander Morgado
57b5ffa8c4 gobi: remove plugin
There's no real need for a custom Gobi plugin any more. All the vendor-specific
Gobi-powered modems should be handled by vendor-provided plugins supporting QMI
modems; or otherwise, as a last resort, by the generic plugin.
2015-02-18 20:00:01 +01:00
Aleksander Morgado
93d6e4f102 dell: new Dell plugin
For Dell-branded Novatel, Sierra and Ericsson modems.

The Novatel plugin will no longer accept every Dell-branded modem, which was
the current situation. Instead, a new Dell plugin will take care of probing for
the correct vendor string, and based on the results create a specific Novatel,
Sierra or Ericsson modem.

In order to properly support this, the Novatel, Sierra and MBM plugins now
export their implementations into non-inst libraries that the Dell plugin will
import.

Also, for now, the Dell plugin doesn't make any difference between e.g. Sierra
or Ericsson MBIM implementations, just a generic MBIM modem is created in both
cases, as that is anyway what the Ericsson MBM and Sierra plugins do already.

https://bugs.freedesktop.org/show_bug.cgi?id=86713
2015-02-16 17:33:37 +01:00
Aleksander Morgado
6bbc4c1746 sierra: move all the legacy Sierra support to a new 'sierra-legacy' plugin
In short:

  * The 'sierra-legacy' plugin will handle all the old AT based modems,
    including the DirectIP ones. This plugin is filtered by driver ('sierra' or
    'sierra_net') and forbidden-drivers ('qmi_wwan' and 'cdc_mbim'). This plugin
    should also grab HP and AT&T branded models if they are handled by the
    proper kernel driver.

  * The 'sierra' plugin will only handle QMI or MBIM based Sierra modems, which
    are really all the new ones. This plugin is filtered by VID (0x1199) and
    driver (qmi_wwan and cdc_mbim).

For this separation to work, the 'sierra' and 'sierra_net' plugins need to be
complementary to each other.
2015-02-16 17:33:37 +01:00
Aleksander Morgado
b115945399 sierra: move custom init and port grabbing methods to separate source files 2015-02-16 17:30:38 +01:00
Aleksander Morgado
5a268430c4 mbm: build a common non-inst library with the core Ericsson modem support 2015-02-16 17:30:38 +01:00
Aleksander Morgado
2992801663 sierra: build a common non-inst library with the core Sierra modem support 2015-02-16 17:30:38 +01:00
Aleksander Morgado
60a17df4c7 novatel: build a common non-inst library with the core Novatel modem support 2015-02-16 17:30:38 +01:00
Aleksander Morgado
7c929b5cf1 novatel: move custom init method to separate source files 2015-02-16 17:30:38 +01:00
Aleksander Morgado
6fb83b5e02 novatel: remove unused custom AT probe array 2015-02-06 15:38:11 +01:00
Aleksander Morgado
6739227227 nokia: 20s for CSCS=? test command
Nokia N9 via Bluetooth DUN may require up to 20s for the supported charsets
query; so update the timeout in the Nokia plugin.

https://bugs.freedesktop.org/show_bug.cgi?id=87635
https://bugzilla.gnome.org/show_bug.cgi?id=741813
2015-01-16 17:10:32 +01:00