AW: Set allowed mode to 2G, 3G, 4G not working
Hi Daniele, sorry for answering late. I'm very busy this week. I'll test it next week and provide the debug logs. Thank you very much so far. Carsten -Ursprüngliche Nachricht- Von: Daniele Palmas [mailto:dnl...@gmail.com] Gesendet: Mittwoch, 20. November 2019 14:01 An: Stelling2 Carsten Cc: modemmanager-devel@lists.freedesktop.org Betreff: Re: Set allowed mode to 2G, 3G, 4G not working Hi Carsten, Il giorno mar 19 nov 2019 alle ore 14:24 Daniele Palmas ha scritto: > > Hi Carsten, > > Il giorno mar 19 nov 2019 alle ore 10:10 Stelling2 Carsten > ha scritto: > > > > Hi, > > > > I've just updated MM from 1.10.0 to 1.12.0 with the result, that my > > application fails when setting the mode ('2G|4G') for Telit LE910-EU1. It > > also fails when using mmcli. > > My version 1.10.0 contains Daniele's patches mentioned here > > https://lists.freedesktop.org/archives/modemmanager-devel/2019-February/007044.html > > and in following messages. > > > > I assume, that Daniele's patches didn't go mainline. > > > > odd, they should be there, see commits 3921c120 and c7be4af5. > > I'll try to verify the feature on my LE910-EU1 by this week and give > you some feedback. > I double-checked with 1.12.0, but I did not find any issue, see the following: ModemManager[25584]: [1574254091.241979] ModemManager (version 1.12.0) starting in system bus... danielepa@danielepa-ThinkCentre-M93p:~/git/gitlab/ModemManager$ sudo mmcli -m 0 General |dbus path: /org/freedesktop/ModemManager1/Modem/0 |device id: e3d2345d529078ca9387c8f81a844f19097127ca Hardware | manufacturer: Telit |model: FIH7160 | revision: 20.00.414 | h/w revision: XMM7160_V1.2_HWID790_MBIM_NAND |supported: gsm-umts, lte | current: gsm-umts, lte | equipment id: 356611070026426 System | device: /sys/devices/pci:00/:00:14.0/usb3/3-7 | drivers: cdc_acm, cdc_mbim | plugin: Telit | primary port: cdc-wdm0 |ports: ttyACM3 (at), wwp0s20u7i12 (net), cdc-wdm0 (mbim) Status | unlock retries: sim-pin2 (3) |state: enabling | power state: on | signal quality: 0% (cached) Modes|supported: allowed: 2g; preferred: none | allowed: 4g; preferred: none | allowed: 2g, 4g; preferred: none | current: allowed: 2g, 4g; preferred: none Bands|supported: egsm, dcs, eutran-1, eutran-3, eutran-7, eutran-8, eutran-20 | current: egsm, dcs, eutran-1 IP |supported: ipv4, ipv6, ipv4v6 3GPP | imei: 356611070026426 |enabled locks: fixed-dialing 3GPP EPS | ue mode of operation: csps-1 SIM |dbus path: /org/freedesktop/ModemManager1/SIM/0 danielepa@danielepa-ThinkCentre-M93p:~/git/ModemManager$ sudo ./cli/mmcli -m 0 --set-allowed-modes="2G" successfully set current modes in the modem ModemManager[25584]: [1574254264.636226] (ttyACM3) device open count is 3 (open) ModemManager[25584]: [1574254264.636294] (ttyACM3): --> 'AT+WS46=12' ModemManager[25584]: [1574254266.556383] (ttyACM3): <-- 'OK' ModemManager[25584]: [1574254266.556495] (ttyACM3) device open count is 4 (open) ModemManager[25584]: [1574254266.556532] (ttyACM3) device open count is 3 (close) ModemManager[25584]: [1574254266.556559] (ttyACM3): --> 'AT+WS46?' ModemManager[25584]: [1574254266.568991] (ttyACM3): <-- '' ModemManager[25584]: [1574254266.569435] (ttyACM3): <-- '+WS46: 12OK' ModemManager[25584]: [1574254266.569582] Periodic signal check refresh requested ModemManager[25584]: [/dev/cdc-wdm0] Sent message... danielepa@danielepa-ThinkCentre-M93p:~/git/ModemManager$ sudo ./cli/mmcli -m 0 Modes|supported: allowed: 2g; preferred: none | allowed: 4g; preferred: none | allowed: 2g, 4g; preferred: none | current: allowed: 2g; preferred: none danielepa@danielepa-ThinkCentre-M93p:~/git/ModemManager$ sudo ./cli/mmcli -m 0 --set-allowed-modes="2G|4G" successfully set current modes in the modem ModemManager[25584]: [1574254329.741936] (ttyACM3) device open count is 3 (open) ModemManager[25584]: [1574254329.741979] (ttyACM3): -->
Re: How can I create modem object when in "failed" state?
Hi again, I found my mistake. The modem is indeed created just like it should, even when in "failed" state. Sorry for that. There's something else I'd like to understand, also in the matter of working with sims - I couldn't find any signal which can tell me that a new sim inserted in a modem which was simless at first. Is there something like this that I miss? Thanks again for your help On Sun, Nov 17, 2019 at 4:28 PM Aleksander Morgado wrote: > Hey, > > > I want to create a modem object (org.freedesktop.ModemManager1.Modem), > but when it has no sim, an exception > "[org.freedesktop.ModemManager1.Error.Core.WrongState] modem in failed > state" is thrown. > > The thing is, I want to reset the modem, and for this I do need to have > the modem object. > > > > How can I create a modem object although it's in "failed" state? Or, on > the other hand, how can I reset a modem which hasn't been created yet, > without using any shell command? > > > > A modem object with the Modem interface available is always exposed in > DBus when in Failed state. There is (should be) nothing that prevents > that from happening. > I assume you're not using libmm-glib, so please share the code you're > trying to run, otherwise it's impossible to help :D > > -- > Aleksander > https://aleksander.es > -- *Ido Dotan, software developer* *CONFIDENTIALITY NOTICE The information contained in this email message (including any attachments) is confidential and proprietary, is not intended for public access or use, and may be subject to privacy laws, export control laws, and other legal restrictions and privileges. Such information is intended only for the addressee(s) named above. You are hereby notified that any dissemination, distribution, printing, retaining, copying or use of this email (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an addressee named above, or believe that you have received this email in error, kindly notify the sender immediately (by replying to this email) and permanently delete it (and its attachments) from your system.* ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
Re: CIDs not released when MM stops/restarts [openwrt]
Hey, > > I’m attempting to fix below reported problem with below patch. But mm crashes > as soon as g_list_free_full (self->priv->qmi_clients, g_free) is called in > mm_port_mbim_close(). If I comment g_list_free_full, then mm shuts down > cleanly. Any suggestion what is going wrong? > Yes, see comments below. > > diff --git a/src/mm-port-mbim.c b/src/mm-port-mbim.c > > index dbc70fef..4f620a55 100644 > > --- a/src/mm-port-mbim.c > > +++ b/src/mm-port-mbim.c > > @@ -424,6 +424,20 @@ mm_port_mbim_close (MMPortMbim *self, > > #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED > > if (self->priv->qmi_device) { > > GError *error = NULL; > > +GList *l; Please add a whiteline after declaring variables. > > +/* Release all allocated clients */ > > +for (l = self->priv->qmi_clients; l; l = g_list_next (l)) { > > +QmiClient *qmi_client = QMI_CLIENT (l->data); > > + > > +mm_dbg ("Releasing client for qmi_clients '%s'...", > qmi_service_get_string (qmi_client_get_service (qmi_client))); > > +qmi_device_release_client (self->priv->qmi_device, > > + qmi_client, > > + > QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, > > + 3, NULL, NULL, NULL); > > +g_clear_object (_client); > > +} > > +g_list_free_full (self->priv->qmi_clients, g_free); > You're attempting to release the QmiClient twice. First with the g_clear_object() and then (wrong) with g_list_free_full (..., g_free). You have two options: a) Leave the g_clear_object() and change g_list_free_full(qmi_clients, g_free) with just g_list_free (qmi_clients). b) Remove the g_clear_object() inside the loop and do a single g_list_free_full (qmi_clients, g_object_unref) instead. I would prefer doing b) > +self->priv->qmi_clients = NULL; > > > > if (!qmi_device_close (self->priv->qmi_device, )) { > > mm_warn ("Couldn't properly close QMI device: %s", > error->message); And g_error_free (error); > > @@ -473,9 +487,17 @@ static void > > dispose (GObject *object) > > { > > MMPortMbim *self = MM_PORT_MBIM (object); > > +GList *l; > > > > #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED > > -g_list_free_full (self->priv->qmi_clients, g_object_unref); > > +/* Deallocate all clients */ > > +for (l = self->priv->qmi_clients; l; l = g_list_next (l)) { > > +QmiClient *qmi_client = QMI_CLIENT (l->data); > > + > > +if (qmi_client) > > +g_object_unref (qmi_client); > > +} > > +g_list_free_full (self->priv->qmi_clients, g_free); > No, this change in dispose is not right. You should better leave g_list_free_full (self->priv->qmi_clients, g_object_unref); > self->priv->qmi_clients = NULL; > > g_clear_object (>priv->qmi_device); > > #endif > > > > From: Amol Lad > Sent: Thursday, 21 November 2019 2:52 PM > To: modemmanager-devel@lists.freedesktop.org > Subject: CIDs not released when MM stops/restarts [openwrt] > > > > Hi, > > > > I’m using MM 1.12.0 in openwrt system [EM7565 in MBIM mode]. > > > > When MM starts , we see below Client ID allocations. > > > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'dms' (version > 1.0) client with ID '3' > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'nas' (version > 1.25) client with ID '4' > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'loc' (version > 2.0) client with ID '3' > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'pdc' (version > 1.0) client with ID '3' > > > > > > However, when I restart MM using “service modemmanager restart” command then > the log becomes: > > > > > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'dms' (version > 1.0) client with ID '4' > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'nas' (version > 1.25) client with ID '5' > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'loc' (version > 2.0) client with ID '4' > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... > > Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'pdc' (version > 1.0) client with ID '4' > > > > Restarting MM again increments the CIDs. It seems when MM stops then CIDs are > not released eventually resulting in
RE: CIDs not released when MM stops/restarts [openwrt]
Hi, I'm attempting to fix below reported problem with below patch. But mm crashes as soon as g_list_free_full (self->priv->qmi_clients, g_free) is called in mm_port_mbim_close(). If I comment g_list_free_full, then mm shuts down cleanly. Any suggestion what is going wrong? Thanks Amol diff --git a/src/mm-port-mbim.c b/src/mm-port-mbim.c index dbc70fef..4f620a55 100644 --- a/src/mm-port-mbim.c +++ b/src/mm-port-mbim.c @@ -424,6 +424,20 @@ mm_port_mbim_close (MMPortMbim *self, #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED if (self->priv->qmi_device) { GError *error = NULL; +GList *l; +/* Release all allocated clients */ +for (l = self->priv->qmi_clients; l; l = g_list_next (l)) { +QmiClient *qmi_client = QMI_CLIENT (l->data); + +mm_dbg ("Releasing client for qmi_clients '%s'...", qmi_service_get_string (qmi_client_get_service (qmi_client))); +qmi_device_release_client (self->priv->qmi_device, + qmi_client, + QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, + 3, NULL, NULL, NULL); +g_clear_object (_client); +} +g_list_free_full (self->priv->qmi_clients, g_free); +self->priv->qmi_clients = NULL; if (!qmi_device_close (self->priv->qmi_device, )) { mm_warn ("Couldn't properly close QMI device: %s", error->message); @@ -473,9 +487,17 @@ static void dispose (GObject *object) { MMPortMbim *self = MM_PORT_MBIM (object); +GList *l; #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED -g_list_free_full (self->priv->qmi_clients, g_object_unref); +/* Deallocate all clients */ +for (l = self->priv->qmi_clients; l; l = g_list_next (l)) { +QmiClient *qmi_client = QMI_CLIENT (l->data); + +if (qmi_client) +g_object_unref (qmi_client); +} +g_list_free_full (self->priv->qmi_clients, g_free); self->priv->qmi_clients = NULL; g_clear_object (>priv->qmi_device); #endif From: Amol Lad Sent: Thursday, 21 November 2019 2:52 PM To: modemmanager-devel@lists.freedesktop.org Subject: CIDs not released when MM stops/restarts [openwrt] Hi, I'm using MM 1.12.0 in openwrt system [EM7565 in MBIM mode]. When MM starts , we see below Client ID allocations. Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'dms' (version 1.0) client with ID '3' Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'nas' (version 1.25) client with ID '4' Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'loc' (version 2.0) client with ID '3' Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'pdc' (version 1.0) client with ID '3' However, when I restart MM using "service modemmanager restart" command then the log becomes: Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'dms' (version 1.0) client with ID '4' Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'nas' (version 1.25) client with ID '5' Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'loc' (version 2.0) client with ID '4' Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'pdc' (version 1.0) client with ID '4' Restarting MM again increments the CIDs. It seems when MM stops then CIDs are not released eventually resulting in "ClientIdsExhausted" error after multiple MM restarts. (INFO: If I issue "qmicli -d /dev/cdc-wdm0 -p -nas-reset" then "nas" CID gets reset) Please let me know if any more information is needed and advise how we can address this. Thanks Amol The information in this email communication (inclusive of attachments) is confidential to 4RF Limited and the intended recipient(s). If you are not the intended recipient(s), please note that any use, disclosure, distribution or copying of this information or any part thereof is strictly prohibited and that the author accepts no liability for the consequences of any action taken on the basis of the information provided. If you have received this email in error, please notify the sender immediately by return email and then delete all instances of this email from your system. 4RF Limited will not accept responsibility for any consequences associated with the use of this email (including, but not
CIDs not released when MM stops/restarts [openwrt]
Hi, I'm using MM 1.12.0 in openwrt system [EM7565 in MBIM mode]. When MM starts , we see below Client ID allocations. Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'dms' (version 1.0) client with ID '3' Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'nas' (version 1.25) client with ID '4' Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'loc' (version 2.0) client with ID '3' Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:00 OpenWrt [9084]: [/dev/cdc-wdm0] Registered 'pdc' (version 1.0) client with ID '3' However, when I restart MM using "service modemmanager restart" command then the log becomes: Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'dms' (version 1.0) client with ID '4' Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'nas' (version 1.25) client with ID '5' Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'loc' (version 2.0) client with ID '4' Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Allocating new client ID... Nov 21 08:50:53 OpenWrt [10172]: [/dev/cdc-wdm0] Registered 'pdc' (version 1.0) client with ID '4' Restarting MM again increments the CIDs. It seems when MM stops then CIDs are not released eventually resulting in "ClientIdsExhausted" error after multiple MM restarts. (INFO: If I issue "qmicli -d /dev/cdc-wdm0 -p -nas-reset" then "nas" CID gets reset) Please let me know if any more information is needed and advise how we can address this. Thanks Amol The information in this email communication (inclusive of attachments) is confidential to 4RF Limited and the intended recipient(s). If you are not the intended recipient(s), please note that any use, disclosure, distribution or copying of this information or any part thereof is strictly prohibited and that the author accepts no liability for the consequences of any action taken on the basis of the information provided. If you have received this email in error, please notify the sender immediately by return email and then delete all instances of this email from your system. 4RF Limited will not accept responsibility for any consequences associated with the use of this email (including, but not limited to, damages sustained as a result of any viruses and/or any action or lack of action taken in reliance on it). ___ ModemManager-devel mailing list ModemManager-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel