[Debian-on-mobile-maintainers] Bug#1091338: modemmanager: fibocom l830 incorrectly detected

jade t jade069 at proton.me
Tue Dec 24 00:04:19 GMT 2024


Package: modemmanager
Version: 1.22.0-3+b2
Severity: important
Tags: patch
X-Debbugs-Cc: jade069 at proton.me

Dear Maintainer,

i attempted to use a Fibocom L830 modem recently, using modemmanager_1.20.4-1 
 from stable. it worked, but only PPP on a single port, no signal status etc. 
i researched briefly, and gave up, because i am not a programmer and not smart, 
 just a user on holidays, assuming that the device is missing some things i was
 expecting to see in USB descriptors, so MM could only do what it saw, which
 was to fall back to legacy/generic ppp modes.

even more recently, i foolishly upgraded to testing at the first sight of wifi.
upon reboot, I now had modemmanager 1.22.0-3+b2 and no functioning modem.
i don't remember the exact message- but it was like no modem present. 
i know the modem didn't fall out of the laptop, so i investigated.

by using sudo modemmanager --debug, i could see /dev/ttyACM* entries being
 ignored for probe, along wiht another message (sorry, don't recall exactly)
 reporting that plugin/fibocom was ignoring these - this was not matching
 a hardcoded driver selection criteria.
thankfully i found wifi for long enough to apt-get source. 

so, I present a patch that got me back online:
udev rules are added to give MM hints as to which parts of the modem, 
 will be performing each function. the eps_off_on is also enabled,
 which i found successful in making mm succeed with mbim, not ppp fallback

finally we also change permitted drivers. i hate this part so so much!
i think the blame is on the hardware for claiming to be something it is not
 but what can we do? flashing is scary. i have no data left for windows isos 
 on my travels. maybe most other users don't too. so maybe it's okay. idk.

after i built new deb, wwan works, and even shows signal strength \o/
maybe this helps someone else out.


diff --git a/src/plugins/fibocom/77-mm-fibocom-port-types.rules b/src/plugins/fibocom/77-mm-fibocom-port-types.rules
index 5793cd6..6c456b4 100644
--- a/src/plugins/fibocom/77-mm-fibocom-port-types.rules
+++ b/src/plugins/fibocom/77-mm-fibocom-port-types.rules
@@ -8,6 +8,18 @@ LABEL="mm_fibocom_port_types"
 
 SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}"
 
+# Fibocom L830 - GTUSBMODE=2
+#  enx000011121314 (if #0): manual says mbim but appears ncm
+#  ttyACM0 (if #2): AT port
+#  ttyACM1 (if #4): debug port (ignore)
+#  ttyACM2 (if #6): AT port
+ATTRS{idVendor}=="2cb7" ,ATTRS{idProduct}=="0002", ENV{.MM_USBIFNUM}=="00", SUBSYSTEM=="net", ENV{ID_MM_PORT_TYPE_MBIM}="1"
+ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0002", ENV{ID_MM_FIBOCOM_INITIAL_EPS_OFF_ON}="1"
+ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0002", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
+ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0002", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1"
+ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0002", ENV{.MM_USBIFNUM}=="06", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1"
+
+
 # Fibocom L850-GL attach APN with toggle modem power
 ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0007", ENV{ID_MM_FIBOCOM_INITIAL_EPS_OFF_ON}="1"
 
diff --git a/src/plugins/fibocom/mm-plugin-fibocom.c b/src/plugins/fibocom/mm-plugin-fibocom.c
index a30575e..b1415b8 100644
--- a/src/plugins/fibocom/mm-plugin-fibocom.c
+++ b/src/plugins/fibocom/mm-plugin-fibocom.c
@@ -111,7 +111,7 @@ mm_plugin_create_fibocom (void)
 {
     static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
     static const guint16 vendor_ids[] = { 0x2cb7, 0x1782, 0 };
-    static const gchar *drivers[] = { "cdc_mbim", "qmi_wwan", "cdc_ether", "option", NULL };
+    static const gchar *drivers[] = { "cdc_mbim", "qmi_wwan", "cdc_ether", "cdc_acm", "cdc_ncm", "option", NULL };
 
     return MM_PLUGIN (
         g_object_new (MM_TYPE_PLUGIN_FIBOCOM,




-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.5-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages modemmanager depends on:
ii  libc6                  2.40-4
ii  libglib2.0-0t64        2.82.4-1
ii  libgudev-1.0-0         238-5+b1
ii  libmbim-glib4          1.30.0-1+b2
ii  libmbim-proxy          1.30.0-1+b2
ii  libmm-glib0            1.22.0-3+b2
ii  libpolkit-gobject-1-0  125-2
ii  libqmi-glib5           1.34.0-2+b2
ii  libqmi-proxy           1.34.0-2+b2
ii  libqrtr-glib0          1.2.2-1+b2
ii  libsystemd0            257-2
ii  polkitd                125-2

Versions of packages modemmanager recommends:
ii  libmbim-utils   1.30.0-1+b2
ii  libqmi-utils    1.34.0-2+b2
ii  usb-modeswitch  2.6.1-4+b1

modemmanager suggests no packages.

-- no debconf information



More information about the Debian-on-mobile-maintainers mailing list