Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
Not making them '--location-enable|disable-signal' because that's the pattern
used to enable/disable location sources. Instead, use the '--location-set-*'
pattern, as that is what we're already using for the other location setup
update.
|
|
The default setup uses a refresh time of 30s, which means that even if the GPS
location updates are received at a higher frequency, the DBus interface will
still expose at most one update every 30s.
This patch includes a new "SetGpsRefreshTime()" method in the Location
interface, which takes a single 'u' parameter, specifying the refresh rate to
use, in seconds. This method also allows 0 being passed, which will make the
implementation to publish the GPS location updates are soon as ModemManager
detects them.
Along with the new method, a "GpsRefreshTime" read-only property is exposed
to specify the refresh time in effect.
The new method and property will only be applicable if the device has GPS
capabilities.
https://bugs.freedesktop.org/show_bug.cgi?id=89924
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use the "WDS Get Packet Statistics" method to query for the ongoing number
of bytes transmitted or received. The QMI implementation uses different WDS
clients for IPv4 and IPv6; the stats reported are a combination of the values
retrieved from both WDS clients.
|
|
If the bearer implementation supports it, load stats periodically. By default
every 30s for now.
|
|
|
|
The MMBearer object is updated to provide getter methods to retrieve the new
MMBearerStats object.
|
|
The new MMBearerStats object provides a simple API to interact with the new
dictionary containing the bearer connection stats.
|
|
The new property is a dictionary which may include different parameters,
depending on what is actually supported by the underlying modem. For now,
just bytes RX/TX.
Note that this object will expose the stats *as reported by the modem*. These
values may differ from e.g. what is seen in the network interface stats.
|
|
mmcli is GPLv2+; that's what --version has always said and that's what the
README in ModemManager sources specifies:
License.
The ModemManager and mmcli binaries are both GPLv2+.
The libmm-glib library is LGPLv2+.
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=90408
|
|
|
|
|
|
The CPMS test parser was expecting 3 groups (parenthesis enclosed lists) of
memory IDs, e.g.:
+CPMS: ("SM","ME"),("SM","ME"),("SM","ME")
But some modems like the Huawei MU609 may just report single elements, not
groups, e.g.:
+CPMS: "SM","SM","SM"
This patch avoids using g_strsplit() to split the groups, as that is unaware
of the possible replies without groups. Instead, a new helper method is
implemented which does the group/item split itself, considering also the
possibility of a reply with mixed groups and non-groups, like e.g.:
+CPMS: ("SM","ME"),"SM","SM"
Additionally, we also now support the case where the groups are empty, e.g.:
+CPMS: (),(),()
https://bugs.freedesktop.org/show_bug.cgi?id=92243
|
|
|
|
The XCASE terminal mode flag because is no longer specified by POSIX
and has no effect on linux. Because of the latter fact we can remove
it. This fixes a compilation error with musl libc.
|
|
|
|
. A shift has undefined behaviour if the mathematical result
(lhs * 2^{rhs}) doesn't fit in the range of the resulting type.
In other words, you can't left shift into the sign bit of a
signed integer type.
The error message is:
mm-broadband-modem.c:3308:15: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
SUMMARY: AddressSanitizer: undefined-behavior mm-broadband-modem.c:3308:15 in
|
|
|
|
We bump libqmi requiremetn to 1.13.5, which is the one with support for the new TLV.
|
|
For now, use 2 digits for MNC if < 100 and 3 digits otherwise.
|
|
|
|
In MM 0.6 days it used to be obfuscated, but that was pointless. Now
it's just the ICCID.
|
|
Auth settings will be added in a QMI message only if at least one of these is
requested:
* An explicit auth preference is requested.
* User string is given and isn't empty.
* Password string is given and isn't empty.
|
|
When changing from idle to registered we'll load registration info before really
reporting that we're registered (so that clients can get the new registration
info directly). During this time, we should also allow LAC/CID updates triggered
in the location interface.
E.g. when receiving this QMI message, we're not processing LAC/CID because when
they get reported, the registration state was not yet 'registered':
[/dev/cdc-wdm0] Received message (translated)...
>>>>>> QMUX:
>>>>>> length = 67
>>>>>> flags = 0x80
>>>>>> service = "nas"
>>>>>> client = 1
>>>>>> QMI:
>>>>>> flags = "indication"
>>>>>> transaction = 0
>>>>>> tlv_length = 55
>>>>>> message = "Serving System" (0x0024)
>>>>>> TLV:
>>>>>> type = "MNC PCS Digit Include Status" (0x29)
>>>>>> length = 5
>>>>>> value = D6:00:01:00:00
>>>>>> translated = [ mcc = '214' mnc = '1' includes_pcs_digit = 'no' ]
>>>>>> TLV:
>>>>>> type = "LTE TAC" (0x25)
>>>>>> length = 2
>>>>>> value = 08:01
>>>>>> translated = 264
>>>>>> TLV:
>>>>>> type = "Detailed Service Status" (0x22)
>>>>>> length = 5
>>>>>> value = 02:03:00:01:00
>>>>>> translated = [ status = 'available' capability = 'cs-ps' hdr_status = 'none' hdr_hybrid = 'yes' forbidden = 'no' ]
>>>>>> TLV:
>>>>>> type = "CID 3GPP" (0x1e)
>>>>>> length = 4
>>>>>> value = 01:A1:4D:04
>>>>>> translated = 72196353
>>>>>> TLV:
>>>>>> type = "LAC 3GPP" (0x1d)
>>>>>> length = 2
>>>>>> value = FE:FF
>>>>>> translated = 65534
>>>>>> TLV:
>>>>>> type = "Current PLMN" (0x12)
>>>>>> length = 5
>>>>>> value = D6:00:01:00:00
>>>>>> translated = [ mcc = '214' mnc = '1' description = '' ]
>>>>>> TLV:
>>>>>> type = "Data Service Capability" (0x11)
>>>>>> length = 2
>>>>>> value = 01:0B
>>>>>> translated = { [0] = 'lte '}
>>>>>> TLV:
>>>>>> type = "Serving System" (0x01)
>>>>>> length = 6
>>>>>> value = 01:01:01:02:01:08
>>>>>> translated = [ registration_state = 'registered' cs_attach_state = 'attached' ps_attach_state = 'attached' selected_network = '3gpp' radio_interfaces = '{ [0] = 'lte '}' ]
<debug> [1444895382.427216] Processing 3GPP info...
<info> [1444895382.433423] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP Registration state changed (idle -> registering)
[ Here we tried to update LAC/CID ]
<debug> [1444895382.439668] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP location updated (MCC: '214', MNC: '1', Location area code: '0', Cell ID: '0')
<info> [1444895382.446788] Modem /org/freedesktop/ModemManager1/Modem/3: 3GPP Registration state changed (registering -> home)
<info> [1444895382.452383] Modem /org/freedesktop/ModemManager1/Modem/3: state changed (enabled -> registered)
|
|
Given that the Location interface requires 3GPP info reported by the 3GPP
interface, we should only trigger registration checks once the Location
interface has been already enabled and ready to be used. If we don't do this,
we'll end up e.g. getting initial MCCMNC values but never reaching the Location
interface properly.
So, fix this by triggering all registration checks (CDMA and 3GPP) only after
having enabled all interfaces.
|
|
LAC/CID may only be given in the serving system indications when the values
change, and therefore we shouldn't reset the values to 0 whenever they're not
reported.
This seems to happen in newer devices; older devices like the MC7710 did always
report the values in the indications.
|
|
remove them
|
|
|
|
This check makes no sense. We're converting from a ModemManager enum to a QMI
enum, nothing else; i.e. 'caps' is *not* the current capabilities of the modem.
|