Re: [RFC] Bumping minimum glib2 required version to 2.48

2020-01-11 Thread Ben Chan
+1. That also unlocks the use of g_assert_true, g_assert_false, g_assert_cmpmem, etc On Fri, Jan 10, 2020 at 9:52 AM Aleksander Morgado wrote: > Hey! > > >> > I'm thinking in bumping the minimum glib2 required version from 2.36 >> > to 2.48 in all libmbim, libqmi and ModemManager, in order to

Re: Where are you using ModemManager?

2019-04-05 Thread Ben Chan
Chrome OS uses ModemManager + libmbim + libqmi for its cellular connectivity stack and pretty much tracks the upstream master branches -- it's still on my TODO to upstream our remaining local patches :) Since Chromebook Pixel 2013 (LTE model), all Chromebooks with a built-in modem uses

Re: Problems compiling with clang (3.8.21)

2019-04-03 Thread Ben Chan
Could you try these patches? https://gitlab.freedesktop.org/mobile-broadband/libmbim/merge_requests/8 https://gitlab.freedesktop.org/mobile-broadband/libqmi/merge_requests/35 https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/88 Thanks, Ben On Tue, Apr 2, 2019 at 10:42

Re: Problems compiling with clang (3.8.21)

2019-04-02 Thread Ben Chan
autoconf seems to set GCC = yes for clang. I believe clang supports Wunused-variable instead of Wunused-but-set-variable. We could use the former, which is also supported by gcc. For other unsupported options, we can work around with -Wno-unknown-warning-option or -Xclang-only= On Tue, Apr 2,

Re: How other applications use the ports that occupied by MM

2019-03-21 Thread Ben Chan
On Thu, Mar 21, 2019 at 9:25 AM Aleksander Morgado wrote: > > > > > Yeah, mixed feelings from me too. I guess before we do that, can we ask > > what commands people want to use? I'd rather it not be used a short > > circuit for stuff that could be fixed in MM or implemented fairly > > easily for

commit 1093c124b4cb introduced a hard dependency on libqmi

2019-03-12 Thread Ben Chan
The following commit introduced a hard dependency on libqmi for the dell plugin: commit 1093c124b4cb "dell,dw5821e: use DMS extension method to load properly formatted firmware version" so ModemManager fails to build under --without-qmi. Aleksander, we should probably extend the gitlab CI to

[PATCH 1/1] altair-lte: use mm_autoptr instead of g_autoptr

2018-12-12 Thread Ben Chan
commit 397faef3c5ce ("mm-common-helpers: add mm_autoptr helpers for GRegex and GMatchInfo") introduces mm_autoptr(), which implements g_autoptr() that isn't available before glib 2.44. This patch fixes the code to consistently uses mm_autoptr(). --- plugins/altair/mm-modem-helpers-altair-lte.c |

Re: Planning to add a PCIe(not in USB protocol) device

2018-12-10 Thread Ben Chan
I wonder why MBIM-enumerated-over-PCIe (L860) is preferred over MBIM-over-USB3 (L850). Perhaps the theoretical achievable data rate over PCIe? Despite the MBIM enumeration, having a vendor specific host interface does feel going backward as Bjørn said. IMHO, the industry should really move

[PATCH 1/1] cli,output: include string.h for strlen()

2018-11-29 Thread Ben Chan
This patch fixes the following compiler warning: mmcli-output.c:783:19: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration] aux = strlen (section_infos[field_infos[item_l->field].section].name);

[PATCH 1/1] cli, call: fix incorrect string conversion of MMCallStateReason enum

2018-11-29 Thread Ben Chan
This patch fixes the following issue with string conversion of a MMCallStateReason enum: mmcli-call.c:160:88: error: implicit conversion from enumeration type 'MMCallStateReason' to different enumeration type 'MMCallState' [-Werror,-Wenum-conversion] mmcli_output_string

Re: Automatic APN

2018-11-15 Thread Ben Chan
On Thu, Nov 15, 2018 at 12:46 AM Aleksander Morgado wrote: > > Hey, > > > My engineering team has been looking at implementing automatic APN > > detection and I wanted to reach out and see if anyone has thoughts on > > where(MM/NM) or if this would belong. > > > > We're looking at using the

[PATCH] tests: use memcmp() instead of g_assert_cmpmem() for now

2018-11-07 Thread Ben Chan
g_assert_cmpmem() isn't available until glib 2.46, while the minimum glib version required by ModemManager is 2.36. This patch replaces the uses of g_assert_cmpmem() with memcmp() instead. --- libmm-glib/tests/test-pco.c | 3 +--

g_assert_cmpmem and glib 2.46

2018-11-06 Thread Ben Chan
Hi Aleksander and Dan, The PCO patches I submitted earlier on used g_assert_cmpmem(), which I just realized that it is available in glib 2.46 or later. ModemManager requires glib 2.36 or later. Given that glib 2.45 was released about 3 years ago, I wonder if it's time to bump the minimum glib

[PATCH] broadband-modem-mbim: update ms-basic-connect-extensions naming

2018-11-06 Thread Ben Chan
libmbim 1.17.4 (commit 3eeaa4248b98 "ms-basic-connect-extensions: rename service") added a MS prefix to the Basic Connectivity Extensions service. This patch updates the MMBroadbandModemMbim code accordingly. --- configure.ac | 2 +- src/mm-broadband-modem-mbim.c | 22

[PATCH 2/2] libqcdm: remove useless checks on always true condition

2018-10-27 Thread Ben Chan
result.c: In function ‘qcdm_result_add_u8_array’: result.c:338:36: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] qcdm_return_if_fail (array_len >= 0); result.c: In function ‘qcdm_result_add_u16_array’: result.c:418:36: error: comparison of unsigned

[PATCH 1/2] modem-helpers: remove useless checks on always true condition

2018-10-27 Thread Ben Chan
mm-modem-helpers.c:3075:31: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] g_return_val_if_fail (idx >= 0, NULL); ^ --- src/mm-modem-helpers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mm-modem-helpers.c

[PATCH] build: ignore generated ChangeLog

2018-10-26 Thread Ben Chan
--- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 94023506..9846a32f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ Makefile.in /libtool /TAGS /ABOUT-NLS +/ChangeLog /include/ModemManager-version.h /include/ModemManager-names.h --

Re: [PATCH] ublox: fix username and password passed to +UAUTHREQ

2018-10-26 Thread Ben Chan
On Fri, Oct 26, 2018 at 2:22 PM Dan Williams wrote: > > On Fri, 2018-10-26 at 10:59 -0700, Ben Chan wrote: > > --- > > plugins/ublox/mm-broadband-bearer-ublox.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > LG

Re: [BUG] TOBY-L210: Bearer's user and password are swapped in +UAUTHREQ command

2018-10-26 Thread Ben Chan
Based on a few AT command reference found on u-blox website, it does seem like the username and password passed to +UAUTHREQ are swapped in ModemManager. I don't have any u-blox modem to verify, but you can try this patch:

[PATCH] ublox: fix username and password passed to +UAUTHREQ

2018-10-26 Thread Ben Chan
--- plugins/ublox/mm-broadband-bearer-ublox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ublox/mm-broadband-bearer-ublox.c b/plugins/ublox/mm-broadband-bearer-ublox.c index 1adcaa26..76f307c8 100644 --- a/plugins/ublox/mm-broadband-bearer-ublox.c +++

[review] Use QMI UIM service to read ICCID and IMSI when needed

2018-10-22 Thread Ben Chan
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/48 This set of patches extends MMSimQmi to use the QMI_UIM_READ_TRANSPARENT to read ICCID and IMSI when the deprecated QMI_DMS_UIM_GET_ICCID / QMI_DMS_UIM_GET_IMSI commands aren't available on newer QMI modems. ### Hi

[PATCH] sierra: remove unused 'self' variable in scact_periodic_query_ready()

2018-10-20 Thread Ben Chan
--- plugins/sierra/mm-broadband-bearer-sierra.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/sierra/mm-broadband-bearer-sierra.c b/plugins/sierra/mm-broadband-bearer-sierra.c index 1943d1ac..3a881498 100644 --- a/plugins/sierra/mm-broadband-bearer-sierra.c +++

[PATCH] broadband-bearer: remove unused 'self' variables

2018-10-20 Thread Ben Chan
--- src/mm-broadband-bearer.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index 1b13921a..b5692d43 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -1410,11 +1410,8 @@ data_flash_cdma_ready (MMPortSerial

[PATCH] xmm: remove unused 'priv' variable in xact_query_bands_ready()

2018-10-20 Thread Ben Chan
--- plugins/xmm/mm-shared-xmm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/xmm/mm-shared-xmm.c b/plugins/xmm/mm-shared-xmm.c index fcddee10..cbc7c7b4 100644 --- a/plugins/xmm/mm-shared-xmm.c +++ b/plugins/xmm/mm-shared-xmm.c @@ -297,11 +297,8 @@ xact_query_bands_ready

[PATCH] base-call: remove unused 'self' variables

2018-10-20 Thread Ben Chan
--- src/mm-base-call.c | 9 - 1 file changed, 9 deletions(-) diff --git a/src/mm-base-call.c b/src/mm-base-call.c index c128b601..79d296d9 100644 --- a/src/mm-base-call.c +++ b/src/mm-base-call.c @@ -875,12 +875,9 @@ call_start_ready (MMBaseModem *modem, GAsyncResult

[review] Deprecate SubscriptionState property from Modem3gpp interface

2018-10-18 Thread Ben Chan
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/47 ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

[PATCH 2/3] core: remove unnecessary NULL checks for g_match_info_free()

2018-10-18 Thread Ben Chan
g_match_info_free() already check if the given pointer is NULL and does nothing on a NULL pointer. --- .../cinterion/mm-modem-helpers-cinterion.c| 12 -- plugins/huawei/mm-modem-helpers-huawei.c | 21 ++-- plugins/mbm/mm-modem-helpers-mbm.c| 3 +--

[PATCH 1/3] core: remove unnecessary NULL checks for g_free()

2018-10-18 Thread Ben Chan
g_free() already check if the given pointer is NULL and does nothing on a NULL pointer. --- libmm-glib/mm-location-gps-raw.c | 3 +-- src/mm-base-sms.c| 6 ++ src/mm-broadband-bearer.c| 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git

[PATCH 3/3] core: use g_clear_pointer() to avoid explicitly checking and resetting pointers

2018-10-18 Thread Ben Chan
--- src/mm-base-sms.c | 10 ++ src/mm-broadband-modem-mbim.c | 10 ++ 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/mm-base-sms.c b/src/mm-base-sms.c index e117bef7..25a02617 100644 --- a/src/mm-base-sms.c +++ b/src/mm-base-sms.c @@ -939,10 +939,7

[PATCH] modem-helpers-qmi: include string.h for memset()

2018-10-16 Thread Ben Chan
This patch fixes the following compiler warning: mm-modem-helpers-qmi.c:568:5: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned int)' [-Werror,-Wimplicit-function-declaration] memset (extended_qmi_lte_bands, 0, extended_qmi_lte_bands_size *

Re: [PATCH] sim-qmi: avoid unnecessary MM_SIM_QMI() call on MMSimQmi object

2018-10-16 Thread Ben Chan
On Tue, Oct 16, 2018 at 9:42 AM Dan Williams wrote: > On Wed, 2018-10-10 at 23:11 -0700, Ben Chan wrote: > > --- > > src/mm-sim-qmi.c | 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > LGTM >

[PATCH] sim-qmi: avoid unnecessary MM_SIM_QMI() call on MMSimQmi object

2018-10-11 Thread Ben Chan
--- src/mm-sim-qmi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mm-sim-qmi.c b/src/mm-sim-qmi.c index 725e073e..e8c0afef 100644 --- a/src/mm-sim-qmi.c +++ b/src/mm-sim-qmi.c @@ -449,7 +449,7 @@ uim_verify_pin (MMSimQmi *self, QmiClient *client =

[PATCH] base-modem: remove explicit GDestroyNotify cast on g_object_unref

2018-10-05 Thread Ben Chan
g_object_unref is in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_object_unref is thus not needed. --- src/mm-base-modem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mm-base-modem.c

[PATCH 2/2] port-serial: port mm_port_serial_flash to use GTask

2018-09-27 Thread Ben Chan
--- src/mm-port-serial.c | 92 +--- 1 file changed, 44 insertions(+), 48 deletions(-) diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c index c4fee187..41a5fc27 100644 --- a/src/mm-port-serial.c +++ b/src/mm-port-serial.c @@ -111,7 +111,7 @@ struct

[PATCH 1/2] port-serial: port mm_port_serial_reopen to use GTask

2018-09-27 Thread Ben Chan
--- src/mm-port-serial.c | 84 +--- 1 file changed, 40 insertions(+), 44 deletions(-) diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c index 38d4e477..c4fee187 100644 --- a/src/mm-port-serial.c +++ b/src/mm-port-serial.c @@ -112,7 +112,7 @@ struct

[review] Port remaining code in MMBroadbandModem to use GTask

2018-08-30 Thread Ben Chan
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/36 ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

[PATCH] test, modem-helpers: remove unnecessary NULL check for g_free()

2018-08-28 Thread Ben Chan
g_free() handles a NULL pointer properly, so there is no need to have a NULL check before calling g_free(). --- src/tests/test-modem-helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c index

Re: [review] New 'Pco' property in Modem3gpp interface

2018-08-27 Thread Ben Chan
On Mon, Aug 27, 2018 at 6:31 AM Aleksander Morgado wrote: > Hey Ben, > > > > > See > https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/27 > > > > This MR adds a 'Pco' property to the Modem3gpp interface for reporting > > raw PCO values received from the network as we

[PATCH] libmm-glib,pco: add missing documentation for MMPco

2018-08-27 Thread Ben Chan
--- libmm-glib/mm-modem-3gpp.c | 2 +- libmm-glib/mm-pco.c| 25 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libmm-glib/mm-modem-3gpp.c b/libmm-glib/mm-modem-3gpp.c index 360aaef6..80746f98 100644 --- a/libmm-glib/mm-modem-3gpp.c +++

[PATCH] mbim: fix inconsistency in WITH_QMI guards

2018-08-22 Thread Ben Chan
--- src/mm-broadband-modem-mbim.c | 4 ++-- src/mm-port-mbim.c| 4 ++-- src/mm-port-mbim.h| 2 +- src/mm-port-probe.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index

[PATCH] broadband-modem-mbim: add missing guard for shared_qmi_init()

2018-08-21 Thread Ben Chan
Fixes: 9e42a19742de55cf5c0ba4d68069c1845e9392e6 --- src/mm-broadband-modem-mbim.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index 1559ab5b..eb9e723b 100644 --- a/src/mm-broadband-modem-mbim.c +++

[PATCH] port-mbim: add missing guard for try_qmi_over_mbim in mm_port_mbim_open()

2018-08-21 Thread Ben Chan
Fixes: c0cc694c67d9e71f200fb23e20473cc9b31d9ec0 --- src/mm-port-mbim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mm-port-mbim.c b/src/mm-port-mbim.c index f48ebd8f..cd6d9f22 100644 --- a/src/mm-port-mbim.c +++ b/src/mm-port-mbim.c @@ -335,9 +335,11 @@ mm_port_mbim_open (MMPortMbim

[PATCH] xmm: include string.h for strlen()

2018-08-21 Thread Ben Chan
This patch fixes the following compiler warning: xmm/mm-modem-helpers-xmm.c:388:38: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration] g_regex_match_full (r, response, strlen (response), 0, 0, _info,

[PATCH] shared-qmi: include string.h for memset()

2018-08-21 Thread Ben Chan
This patch fixes the following compiler warning: mm-shared-qmi.c:447:9: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration] memset (buf, 0, sizeof (buf)); ^ --- src/mm-shared-qmi.c | 1 +

Re: [PATCH] libmm-glib: add MMPco for handling raw PCO data

2018-08-14 Thread Ben Chan
On Tue, Aug 14, 2018 at 12:48 AM Aleksander Morgado wrote: > > Hey, > > > > > Before submitting further patches, I just want to make sure the MMPco > > gobject implemented in this patch is what you're looking for. MMPco will > > be mostly kept in GList (unless you prefer another gobject). > > > >

[review] New 'Pco' property in Modem3gpp interface

2018-08-14 Thread Ben Chan
Hi Aleksander and Dan, See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/27 This MR adds a 'Pco' property to the Modem3gpp interface for reporting raw PCO values received from the network as we discussed in

[PATCH] libmm-glib: add MMPco for handling raw PCO data

2018-08-14 Thread Ben Chan
--- Hi Aleksander, Before submitting further patches, I just want to make sure the MMPco gobject implemented in this patch is what you're looking for. MMPco will be mostly kept in GList (unless you prefer another gobject). If this is the right API to be in libmm-glib, I'll submit a few follow-up

[PATCH] broadband-modem: initialize 'tac' in registration_status_check_ready()

2018-08-09 Thread Ben Chan
mm-broadband-modem.c:4395:13: error: variable 'tac' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (act == MM_MODEM_ACCESS_TECHNOLOGY_LTE) { ^ mm-broadband-modem.c:4407:75: note: uninitialized

[PATCH] build: require libmbim 1.17.3

2018-08-08 Thread Ben Chan
libmbim 1.17.3 adds the support for MBIM_CID_PCO, which is used by commit d68078b2ce0f ("broadband-modem-mbim: check if modem implements MBIM_CID_PCO"). --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f400eb54..7fa4f60d 100644

Re: [review v2] New 'fibocom' plugin (with a new Intel XMM modem class)

2018-08-08 Thread Ben Chan
On Wed, Aug 8, 2018 at 5:30 AM Aleksander Morgado wrote: > > Hey all, > > I've now pushed an updated MR to suggest the Fibocom plugin, this time > including a new "Icera-like" Intel XMM chipset detection. If the modem > is found to be based on Intel XMM, supporting the "AT+X.." commands, > then

[PATCH 1/2] broadband-modem-mbim: check if modem implements MBIM_CID_PCO

2018-08-07 Thread Ben Chan
Being a part of a series that adds PCO support for MBIM modems that implement the MBIM_CID_PCO extension, this patch issues a MBIM_CID_DEVICE_SERVICES query during the modem initialization to check if a modem implements MBIM_CID_PCO. If the modem does, ModemManager will subscribe to MBIM_CID_PCO

[PATCH 2/2] broadband-modem-mbim: subscribe to MBIM_CID_PCO notifications

2018-08-07 Thread Ben Chan
This patch changes MMBroadbandModem to subscribe to MBIM_CID_PCO notifications if the modem supports that. --- src/mm-broadband-modem-mbim.c | 76 --- 1 file changed, 71 insertions(+), 5 deletions(-) diff --git a/src/mm-broadband-modem-mbim.c

Re: [RFC] Deprecate SubscriptionState?

2018-08-07 Thread Ben Chan
On Tue, Aug 7, 2018 at 7:22 AM Dan Williams wrote: > > On Tue, 2018-08-07 at 01:07 +0200, Aleksander Morgado wrote: > > Hey, > > > > Why raw PCO data in hex string? Why not directly the binary data? > > e.g. > > "ay" instead of "s". The signature could be then "a(iay)" > > Yeah I'd vote for byte

Re: [RFC] Deprecate SubscriptionState?

2018-07-30 Thread Ben Chan
Hi Aleksander, I'm actually wiring up SubscriptionState for some MBIM modems that support MBIM_CID_PCO (which just landed in libmbim), and about to send over some patches. It's true that the PCO of interest is the Verizon-specific PCO, which is used for several use cases (e.g. the SIM is

Re: [review] New 'fibocom' plugin

2018-07-19 Thread Ben Chan
On Thu, Jul 19, 2018 at 12:45 PM Aleksander Morgado wrote: > > On Thu, Jul 19, 2018 at 9:23 PM, Dan Williams wrote: > > On Thu, 2018-07-19 at 21:10 +0200, Aleksander Morgado wrote: > >> > On Chrome OS, we simply use ID_MM_PORT_IGNORE to ignore all AT > >> > ports > >> > on the L850-GL module

Re: [review] New 'fibocom' plugin

2018-07-19 Thread Ben Chan
Hi Aleksander, On Chrome OS, we simply use ID_MM_PORT_IGNORE to ignore all AT ports on the L850-GL module (e.g. https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/net-misc/modemmanager-next/files/77-mm-fibocom-port-types.rules). The modem is functional with just

[PATCH] modem-helpers-mbim: map more MbimNwError to MMMobileEquipmentError

2018-06-01 Thread Ben Chan
Commit X in libmim ("libmbim-glib: add additional cause codes to MbimNwError") added additional cause codes to MbimNwError. This patch maps some of those MbimNwError to MMMobileEquipmentError. This patch requires libmbim >= 1.7.0 --- Hi Dan / Aleksander, This is the follow-up MM patch

[review] https://github.com/cbchan/ModemManager/tree/gtask-broadband-modem-qmi

2018-05-10 Thread Ben Chan
This branch contains a series of patches that port the remaining code in MMBroadbandQmi to use GTask: https://github.com/linux-mobile-broadband/ModemManager/compare/master...cbchan:gtask-broadband-modem-qmi ___ ModemManager-devel mailing list

Re: ModemManager SMS PIN DEBUG QUESTION

2018-05-03 Thread Ben Chan
gt; root@fibocom:~# mmcli -m 1 --send=10 > error: no SMS was specified > root@fibocom:~# > > Hi Ben, >I follow your suggestion, but the last step '--send' show 'error: no > SMS was specified' > > Try `mmcli -s 10 --send` instead https://www.freedesktop.org/software/Modem

Re: ModemManager SMS PIN DEBUG QUESTION

2018-05-03 Thread Ben Chan
On Thu, May 3, 2018 at 8:35 AM 刘其峰 wrote: > Hi ModemManager Team, > I'm a software developer from china, i have some question about SMS and PIN api. > I had see usage about mmcli and it had some api about pin and sms. > but i don't know how to use this api, can

[PATCH] broadband-modem-qmi: fix memory leak in dms_set_operating_mode_ready

2018-04-28 Thread Ben Chan
--- src/mm-broadband-modem-qmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index d87c39aa..898906c8 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -3140,6 +3140,8 @@

[PATCH] iface-modem: allow initial signal check after the modem is re-enabled

2018-04-24 Thread Ben Chan
Commit 708b00ae3 "modem: allow periodic signal check to be disabled" added a "iface-modem-periodic-signal-check-disabled" property in MMIfaceModem/MMBroadbandModem to indicate if the periodic signal check should be disabled. If the property is set to TRUE, the signal_quality_polling_supported

Re: Initial signal quality query on MBIM modems

2018-04-23 Thread Ben Chan
On Sat, Jan 6, 2018 at 9:58 AM Aleksander Morgado wrote: > That idea looks good to me, yes. If that property is set, MM would > just run one signal update query. You could reuse the same polling > logic and just exit polling early as soon as the first successful poll >

[PATCH 1/2] modem: allow periodic signal check to be disabled

2018-04-23 Thread Ben Chan
ModemManager decides to disable periodic signal check if either load_signal_quality is not implemented or load_signal_quality returns an unsupported error. However, in some cases, we want to use load_signal_quality to query the initial signal quality but rely on unsolicited signal quality updates

[PATCH 2/2] broadband-modem-mbim: implement initial signal quality loading

2018-04-23 Thread Ben Chan
ModemManager currently relies on unsolicited MBIM_CID_SIGNAL_STATE notifications to obtain signal quality updates, and it doesn't query the initial signal quality. It's been observed that some MBIM modems issue a MBIM_CID_SIGNAL_STATE notification only when there is a notable change in RSSI. The

[PATCH] broadband-modem: remove unused GError field in SetupRegistrationChecksContext

2018-02-05 Thread Ben Chan
--- src/mm-broadband-modem.c | 64 ++-- 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index ecefcf28..41abceab 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@

Re: [PATCH 1/3] bearer-mbim: remove a unnecessary MbimMessage variable

2018-02-03 Thread Ben Chan
All lgtm. Thanks Dan! On Fri, Feb 2, 2018 at 7:46 AM Dan Williams <d...@redhat.com> wrote: > On Wed, 2018-01-31 at 21:57 -0800, Ben Chan wrote: > > --- > > src/mm-bearer-mbim.c | 1 - > > 1 file changed, 1 deletion(-) > > All three pushed to git master

Issue observed on Huawei ME936 since commit 0c7f3380a

2018-01-31 Thread Ben Chan
I've been debugging an issue with Huawei ME936 (in MBIM mode). The issue is observed since commit 0c7f3380a ("bearer-mbim: ensure session is disconnected before trying to connect"). >From what I observe, the first connection attempt on ME936 always times out when MMBearerMbim issues a

[PATCH 2/3] bearer-mbim: increase timeout for deactivating IP session to 60s

2018-01-31 Thread Ben Chan
Since commit 0c7f3380a ("bearer-mbim: ensure session is disconnected before trying to connect"), MMBearerMbim always issues a MBIM_CID_CONNECT (MBIMActivationCommandDeactivate) command before a MBIM_CID_CONNECT (MBIMActivationCommandActivate) command during a connection attempt. That is to ensure

[PATCH 3/3] bearer-mbim: check if IP session is activated before deactivating it

2018-01-31 Thread Ben Chan
It may be undesirable to issue a MBIM_CID_CONNECT (MBIMActivationCommandDeactivate) command to deactivate an IP session when the session isn't activated. For instance, it's been observed on Huawei ME936 that it takes more than 30s for the modem to deactivate a not-yet-activated session. This patch

[PATCH 1/3] bearer-mbim: remove a unnecessary MbimMessage variable

2018-01-31 Thread Ben Chan
--- src/mm-bearer-mbim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c index 949edfbe..4535018b 100644 --- a/src/mm-bearer-mbim.c +++ b/src/mm-bearer-mbim.c @@ -830,7 +830,6 @@ connect_context_step (GTask *task) return; case

[PATCH] huawei: handle optional 0x prefix on hex numbers in ^DHCP response

2018-01-26 Thread Ben Chan
On Huawei ME936, the hex numbers in the response to AT^DHCP contain the 0x prefix, e.g. AT^DHCP? ^DHCP: 0xda7d0e0a,0xff00,0xdb7d0e0a,0xdb7d0e0a,0x01261aac,0x,1,5000 This patch updates mm_huawei_parse_dhcp_response() to handle the optional 0x prefix. ---

[PATCH] iface-modem-3gpp: ignore initial registration check result when appropriate

2018-01-12 Thread Ben Chan
When a modem is being enabled, an initial registration check is scheduled to determine the current registration state and access technology. The initial registration check is performed asynchronously and may not complete before the modem state is transitioned to 'enabled'. When the modem is

Incorrect modem state transition due to previous initial registration check

2018-01-12 Thread Ben Chan
Hi Aleksander, I observed the following issue when trying to disable the modem shortly after it was enabled by ModemManager. In the last step of enabling the Modem3gpp interface, the code scheduled an initial registration state check and then proceeded to completion. While the initial

Re: Initial signal quality query on MBIM modems

2018-01-05 Thread Ben Chan
On Fri, Jan 5, 2018 at 7:33 AM Dan Williams <d...@redhat.com> wrote: > On Fri, 2018-01-05 at 06:57 +0000, Ben Chan wrote: > > Hi Aleksander and Dan > > > > ModemManager currently relies on unsolicited MBIM_CID_SIGNAL_STATE > > notification to obtain signal qual

Initial signal quality query on MBIM modems

2018-01-04 Thread Ben Chan
Hi Aleksander and Dan ModemManager currently relies on unsolicited MBIM_CID_SIGNAL_STATE notification to obtain signal quality updates, and it doesn't query the initial signal quality. I've observed that some MBIM modems issue a MBIM_CID_SIGNAL_STATE notification only when there is a notable

[PATCH] sms-part-3gpp: decode Unicode SMS with non-BMP code points

2017-12-15 Thread Ben Chan
Depsite 3GPP TS 23.038 specifies that Unicode SMS messages are encoded in UCS-2, UTF-16 encoding is commonly used instead on many modern platforms to allow encoding code points that fall outside the Basic Multilingual Plane (BMP), such as Emoji. Most of the UCS-2 code points are identical to their

Re: Roadmap for next stable 1.8?

2017-11-03 Thread Ben Chan
The new device filter policies mechanism may be nice to include, and would benefit from some testing in the field. On Fri, Nov 3, 2017 at 11:42 AM Dan Williams wrote: > On Fri, 2017-11-03 at 09:55 +0100, Aleksander Morgado wrote: > > Hey, > > > > It's been already a while

[PATCH] sms-cdma-part: fix tautological-constant-compare compiler warning

2017-10-25 Thread Ben Chan
From: "Luis A. Lozano" This patch fixes the following compiler warning issued by clang: mm-sms-part-cdma.c:301:46: mcomparison 'guint8' (aka 'unsigned char') <= 255 is always true [-Werror,-Wtautological-constant-compare] --- src/mm-sms-part-cdma.c | 2 +- 1 file

[PATCH] novatel: port load_supported_modes to use GTask

2017-10-20 Thread Ben Chan
--- plugins/novatel/mm-broadband-modem-novatel.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/plugins/novatel/mm-broadband-modem-novatel.c b/plugins/novatel/mm-broadband-modem-novatel.c index 6fd0c478..fdb4ba52 100644 ---

[PATCH] anydata: port get_detailed_registration_state to use GTask

2017-10-20 Thread Ben Chan
--- plugins/anydata/mm-broadband-modem-anydata.c | 91 +++- 1 file changed, 35 insertions(+), 56 deletions(-) diff --git a/plugins/anydata/mm-broadband-modem-anydata.c b/plugins/anydata/mm-broadband-modem-anydata.c index 4b579da1..a4acaf27 100644 ---

[PATCH] anydata: remove unused 'port' field in DetailedRegistrationStateContext

2017-10-06 Thread Ben Chan
The 'port' field in DetailedRegistrationStateContext is initialized to NULL but never updated or used. When detailed_registration_state_context_complete_and_free() calls g_object_unref() on the NULL 'port' field, an assertion is raised. --- plugins/anydata/mm-broadband-modem-anydata.c | 2 -- 1

[PATCH 1/2] wavecom: fix memory leak

2017-10-06 Thread Ben Chan
--- plugins/wavecom/mm-broadband-modem-wavecom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/wavecom/mm-broadband-modem-wavecom.c b/plugins/wavecom/mm-broadband-modem-wavecom.c index 94115408..5da6c232 100644 --- a/plugins/wavecom/mm-broadband-modem-wavecom.c

[PATCH 2/2] simtech: fix memory leak

2017-10-06 Thread Ben Chan
--- plugins/simtech/mm-broadband-modem-simtech.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/simtech/mm-broadband-modem-simtech.c b/plugins/simtech/mm-broadband-modem-simtech.c index 45cc5542..c511629e 100644 --- a/plugins/simtech/mm-broadband-modem-simtech.c +++

[PATCH] novatel-lte: implement load_unlock_retries

2017-10-06 Thread Ben Chan
This patch implements load_unlock_retries() for the Novatel LTE modem by using the AT$NWPINR? command to query the number of retries left for entering PIN1 or PIN2. Ported from the original patch by Arman Uguray : https://chromium-review.googlesource.com/c/58118 ---

Re: [rfc] Propagate manufacturer information from MMKernelDevice to MMBroadbandModem

2017-10-04 Thread Ben Chan
On Wed, Oct 4, 2017 at 4:51 AM, Bjørn Mork <bj...@mork.no> wrote: > Ben Chan <benc...@chromium.org> writes: > >> * The few MBIM modems I have report the correct manufacturer through >> the manufacturer string descriptor, but I suspect some MBIM modems >> d

Re: [rfc] Propagate manufacturer information from MMKernelDevice to MMBroadbandModem

2017-10-04 Thread Ben Chan
On Wed, Oct 4, 2017 at 12:46 AM, Aleksander Morgado wrote: > Hey, > >> >> Unlike AT or QMI, MBIM doesn't define a standard command to query >> manufacturer information. But the manufacturer information can often >> be inferred from the USB vendor ID or retrieved through

Re: [review] https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-simtech

2017-10-04 Thread Ben Chan
On Fri, Sep 22, 2017 at 5:05 AM, Aleksander Morgado wrote: > Hey, > > The following branch includes several commits to port the simtech > plugin to GTask: > https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-simtech lgtm w/ one nit > > -- > Aleksander >

Re: [review] https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-thuraya

2017-10-04 Thread Ben Chan
On Fri, Sep 22, 2017 at 5:09 AM, Aleksander Morgado wrote: > Hey, > > The following branch includes several commits to port the Thuraya > plugin to GTask > https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-thuraya lgtm > > -- > Aleksander >

Re: [review] https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-dell

2017-10-04 Thread Ben Chan
On Fri, Sep 22, 2017 at 5:04 AM, Aleksander Morgado wrote: > Hey, > > This branch contains a single patch to port the Dell plugin to GTask: > https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-dell lgtm > > -- > Aleksander > https://aleksander.es

Re: [review] https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-via

2017-10-04 Thread Ben Chan
On Fri, Sep 22, 2017 at 5:11 AM, Aleksander Morgado wrote: > Hey, > > The following branch contains a couple of patches to port the Via > plugin to GTask > https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-via lgtm w/ some questions > > -- > Aleksander >

Re: [review] https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-altair

2017-10-04 Thread Ben Chan
On Fri, Sep 22, 2017 at 5:08 AM, Aleksander Morgado wrote: > Hey, > > This branch includes a commit to fully port the Altair plugin to GTask > https://github.com/aleksander0m/ModemManager/tree/gtask-plugins-altair lgtm > > -- > Aleksander > https://aleksander.es

[rfc] Propagate manufacturer information from MMKernelDevice to MMBroadbandModem

2017-10-04 Thread Ben Chan
Hi Aleksander and Dan, Unlike AT or QMI, MBIM doesn't define a standard command to query manufacturer information. But the manufacturer information can often be inferred from the USB vendor ID or retrieved through the Manufacturer string descriptor at the USB level. MMBroadbandModemMbim

[review] https://github.com/cbchan/ModemManager/tree/gtask-plugins-mtk

2017-09-21 Thread Ben Chan
This branch contains a series of patches that port the mtk plugin to use GTask: https://github.com/linux-mobile-broadband/ModemManager/compare/master...cbchan:gtask-plugins-mtk ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org

[review] https://github.com/cbchan/ModemManager/tree/gtask-plugins-hso

2017-09-19 Thread Ben Chan
This branch contains a series of patches that port the hso plugin to use GTask: https://github.com/linux-mobile-broadband/ModemManager/compare/master...cbchan:gtask-plugins-hso ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org

Re: [review] https://github.com/cbchan/ModemManager/tree/sim-mbim-unlock-retries

2017-09-18 Thread Ben Chan
On Tue, Sep 19, 2017 at 12:01 AM, Aleksander Morgado wrote: >> >> I overlooked one thing when I revised the patches based on Dan's >> suggestion, and also missed that in my testing :-( >> >> MMSimMbim:update_modem_unlock_retries() calls >>

[PATCH 2/2] broadband-modem-mbim: fix preservation logic for PIN1 unlock retries

2017-09-18 Thread Ben Chan
This patches fixes commit 334273979 "broadband-modem-mbim: preserve unlock retries for PIN1 when appropriate", which doesn't correctly propagate the unlock retries information for PIN1 observed from responses to MBIM_CID_PIN set operations (see commit eb9ec1b61 "sim-mbim: update unlock retries

[PATCH 1/2] iface-modem: add mm_iface_modem_get_unlock_retries helper

2017-09-18 Thread Ben Chan
This patch adds a mm_iface_modem_get_unlock_retries helper for getting the current MMUnlockRetries value of a MMIfaceModem object, which later allows us to partially update (e.g. a specific MMModemLock) the MMUnlockRetries value of a MMIfaceModem object. --- src/mm-iface-modem.c | 21

Re: [review] https://github.com/cbchan/ModemManager/tree/modem-hardware-revision

2017-09-18 Thread Ben Chan
/gtask-broadband-modem-qmi On Mon, Sep 18, 2017 at 11:13 PM, Ben Chan <benc...@chromium.org> wrote: > Similar to firmware revision, hardware revision is useful information > for identifying characteristics about a modem module. Both MBIM and > QMI provides API to query hardware revision

[review] https://github.com/cbchan/ModemManager/tree/modem-hardware-revision

2017-09-18 Thread Ben Chan
Similar to firmware revision, hardware revision is useful information for identifying characteristics about a modem module. Both MBIM and QMI provides API to query hardware revision from the modem. This series of patch add support of loading and reporting hardware revision through the Modem

  1   2   3   >