E.g.:
$ sudo qmicli -d /dev/cdc-wdm0 --wds-get-packet-statistics
[/dev/cdc-wdm0] Connection statistics:
TX packets OK: 552
RX packets OK: 466
TX bytes OK: 108849
RX bytes OK: 187837
The output will ignore those stat values which are unsupported by the device.
When reading a sized Little Endian uint from a buffer, we just need to read
N bytes from the buffer and place them at the beginning of a new 8-byte buffer,
(as if it were a guint64) and finally convert from LE to HE.
But when reading a sized Big Endian uint from a buffer, the N bytes that we read
from the beginning of the buffer need to be placed at the *end* of the new
8-byte buffer before converting from BE to HE.
Sized integers are used to read e.g. 6-byte integers, like part of the 'Device
Time' TLV in the 'DMS Get Time' call.
https://bugs.freedesktop.org/show_bug.cgi?id=65078
Added independent BE tests with input buffers given in BE. Once the values are
read by libqmi from the buffer, they will be always in host-endian, so we can
safely compare them without further modifications.
https://bugs.freedesktop.org/show_bug.cgi?id=64987
This patch fixes the following type mismatches in the format string for
printing cell IDs:
qmicli-nas.c:1271:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]
g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);
~~~ ^~~
qmicli-nas.c:1391:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]
g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);
~~~ ^~~
qmicli-nas.c:1505:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]
g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);
~~~ ^~~
qmicli-nas.c:1626:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]
g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);
~~~ ^~~
Bug reported on https://code.google.com/p/chromium/issues/detail?id=239736
--dms-activate-automatic incorrectly calls
qmi_client_dms_get_activation_state. This patch corrects it
so that it calls qmi_client_dms_activate_automatic.
The qmi-network script used awk with a field separator of ":". The
output looked like key: 'value'. The second field in this case includes
a space at the beginning. This was making the 'status' command fail.
Now, we account for the space. It is now also not dependent on awk
(this can matter on embedded systems).
Python 3 doesn't support the replace class method; it's now an instance method only.
string.replace(object, old, new) changes to object.replace(old, new)
sed:
s/string\.replace(\([^,]*\), /\1.replace(/