From johanngerbhoff at tutamail.com Sun May 4 14:22:23 2025 From: johanngerbhoff at tutamail.com (johanngerbhoff at tutamail.com) Date: Sun, 4 May 2025 16:22:23 +0200 (CEST) Subject: Support for the Dell DW5825e / Fibocom FM101 (Qualcomm X12 chipset) - what am I missing? Message-ID: Hi everyone, I hope this is the right place to post this request for help. If not, I apologise in advance. My Dell Latitude 5550 comes with a DW5825e LTE modem which actually is a Fibocom FM101R-GL card with a Qualcomm Snapdragon X12 chipset. The corresponding VID/PID is 413c:8213.? The modem seems to be somewhat new / obscure as I couldn't find any online discussions on getting it to work on Linux at all. I've confirmed this modem working out of the box with Dell's OEM Ubuntu 22.04 image but not any other current Linux distribution. I've tried to find out how Dell manages to get it to work and think I've actually found the unlocking mechanism of action. I've re-built the required Fibocom tools for OpenSUSE Tumbleweed but I can't get the modem to connect.? The actual unlock and mmcli --enable command seems to succeed? but it will time out when connecting to the network. I can see some errors when checking the systemd log of Fibocom's fibo_helper service which seems to be responsible for dbus communication, indicating GPIO and bus problems: Mai 04 11:01:13 localhost helper[1210]: [Critical]: fibocom_get_skuid:186: get_skuid_cmd == 0CB9 Mai 04 11:01:13 localhost helper[1210]: [Warning]: fibocom_hwreset_gpio_init_sub:254: /sys/class/gpio/export exists. Mai 04 11:01:13 localhost helper[1210]: [Error]: bus_name_lost:663: bus_name_lost !!!! Mai 04 11:01:13 localhost helper[1210]: [Error]: fibo_adapter_control_mbim_init:1444: Found cellular FM101-GL-00 added! Mai 04 11:01:13 localhost helper[1210]: [Error]: fibo_helper_device_check:1218: variable is NULL, don't send cellular info signal! My questions now are twofold: 1: Is it somehow possible to snoop the correct sequence of AT commands to get the DW5825e to fcc unlock via a "vanilla" ModemManager without resorting to Fibocom's tools (as those seem to be not quite trivial to build for current Linux distributions except Ubuntu)?? I know that this has been done for the Intel XMM7560 where the AT commands necessary have been found out, as seen here:?https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1141 I'm not the most proficient when it comes to hardware hacking but I'm grateful for any pointers. Fibocom's fibo_ma tool seems to be responsible for the actual unlocking magic, unfortunately it is closed-source. I've tried to snoop around the binary with Ghidra to see if my untrained eye can detect the necessary functions - unfortunately I can only see that some SHA256 shenanigans are going on and lack the knowledge to investigate further. 2: Could someone with more knowledge than me regarding modems please check in on my build process for Fibocom's tools and the mechanism of action and maybe point out something I've missed? I'd appreciate any help a lot. I'll type out my build notes below. Any steps taken after the build process are based on Fibocom's CMake install script but adapted for OpenSUSE file locations. I'm unsure whether I've found out the right location for the dbus config though. Fibocom FM101 / Dell DW5825e OpenSUSE Build:? ### Source: ### https://github.com/fibocom-pc/linux_apps_opensource ### How it works ### ModemManager calls fibo_ma (via the fcc unlock script corresponding to the modem's hardware id) which performs the necessary magic for a FCC unlock. The closed-source fibo_ma calls fibo_helper.service which provides a dbus interface for comms with the modem. fibo_flash.service is used to flash the firmware to the modem -> needs the OEM FwFlashSrv firmware file from Dell. fibo_config.service applies config settings from a provided fbwwanConfig.ini to the modem. The file provided by Dell is the same one as the one in the Fibocom Github repo. fibo_ma seems to check via dmidecode whether the modem and chassis are Dell devices and refuses to fcc unlock the modem if this check fails. ### Files needed from Dell Ubuntu 22.04 OEM Install ### /opt/fibocom/fibo_flash_service/FwFlashSrv (Firmware) /opt/fibocom/fibo_ma_service/fcc-unlock.d (ModemManager FCCUnlock files) --> only 413c:8213 is needed but copy the other hw ids for future use as well --> needs to be made available to ModemManager in OpenSuse: Should be linked to /usr/lib64/ModemManager/fcc-unlock.d ### Libraries & Tools: ### cmake dmidecode gcc gcc-c++ pkgconf-pkg-config glib2 glib2-devel libxml2 libxml2-devel libmbim libmbim-devel libqmi-glib5 libqmi-tools libdbus-glib-1-2 ModemManager ModemManager-devel systemd-devel libudev0-shim (OpenSuse only ships with libudev1)--> compile from https://archlinux.org/packages/extra/x86_64/libudev0-shim/ --> set libdir in Makefile to lib64 --> make install --> create symlink to /usr/lib64/libudev.so !!!messy!!! ---> ln -s /usr/lib64/libudev.so.0.13.9999 /usr/lib64/libudev.so libdbus-glib-1-2 --> create symlink from libdbus-1.so.3 to /usr/lib64/libdbus-1.so !!!messy!!! ---> sudo ln -s /usr/lib64/libdbus-1.so.3 /usr/lib64/libdbus-1.so ### Build ### cd to linux_apps_opensource directory cmake -S . -B build cmake --build build --> Create dbus config for fibocom helper: /usr/share/dbus-1/com.fibocom.helper.conf ? ? ??? ? ? ??? ? --> Create fibo_config service /etc/systemd/system/fibo_config.service [Unit] Description=Firmware Config Service After=ModemManager.service fibo_helper.service [Service] EnvironmentFile=/lib/systemd/system/fibo_config.d/env.conf ExecStart=/opt/fibocom/fibo_config_service/fibo_config ExecReload=/bin/kill -HUP \$MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create fibo_flash service /etc/systemd/system/fibo_flash.service [Unit] Description=Firmware Flash Service After=ModemManager.service fibo_helper.service [Service] EnvironmentFile=/lib/systemd/system/fibo_flash.d/env.conf ExecStart=/opt/fibocom/fibo_flash_service/fibo_flash ExecReload=/bin/kill -HUP \$MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create fibo_helper service /etc/systemd/system/fibo_helper.service [Unit] Description=Firmware Helper Service After=ModemManager.service [Service] EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperd ExecReload=/bin/kill -HUP \$MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create fibo_helper_mbim service /etc/systemd/system/fibo_helper_mbim.service [Unit] Description=Firmware Helper Service After=ModemManager.service fibo_helper.service [Service] EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperm ExecReload=/bin/kill -HUP \$MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create systemd directories for environment files sudo mkdir /lib/systemd/system/fibo_config.d/ sudo mkdir /lib/systemd/system/fibo_flash.d/ sudo mkdir /lib/systemd/system/fibo_helper.d/ --> Create environment files (as root) echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_config.d/env.conf echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_flash.d/env.conf echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_helper.d/env.conf --> Create the following udev rule: /etc/udev/rules.d/76-mm-fibocom-linux-apps-port-types.rules --> Without this rule, the modem is visible to ModemManageron OpenSUSE but doesn't connect. --> With this rule, the modem is invisible to ModemManager and still doesn't connect. --> Why is this rule in the Fibocom install script? It's also present on Ubuntu 22.04 but there the modem is visible with the rule. # do not edit this file, it will be overwritten on update ACTION!="add|change|move|bind", GOTO="mm_fibocom_linux_apps_port_types_end" SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" LABEL="mm_fibocom_linux_apps_port_types_end" --> Create fcc unlock script for the DW5825e (413c:8213) as /usr/share/ModemManager/fcc-unlock.available.d/413c:8213 #!/bin/sh # SPDX-License-Identifier: CC0-1.0 # 2023 Nero zhang # # Fibocom FM101 FCC unlock mechanism # # run fcc-unlock binary /opt/fibocom/fibo_ma_service/fibo_ma exit $? --> Tell ModemManager to automatically activate available fcc unlocks ln -sft /usr/lib64/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/* --> reload systemd to make fibocom services available systemctl daemon-reload --> activate fibocom services sudo systemctl enable fibo_helper.service sudo systemctl enable fibo_helper_mbim.service sudo systemctl enable fibo_flash.service sudo systemctl enable fibo_config.service --> Result: ---> actual unlock works (when udev rule is not set) ---> no connection ---> errors in the logs of fibo_helper ### Directory structure after build ### /opt/fibocom/ |--> fibo_config_service |--> fibo_flash_service |--> fibo_helper_service |--> fibo_ma_service Thank you and best, Jo. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at ioncontrol.co Fri May 9 02:04:14 2025 From: dan at ioncontrol.co (Dan Williams) Date: Thu, 08 May 2025 21:04:14 -0500 Subject: Support for the Dell DW5825e / Fibocom FM101 (Qualcomm X12 chipset) - what am I missing? In-Reply-To: References: Message-ID: <5cd827704b485009fb2de8b8542b2ed2913c2643.camel@ioncontrol.co> On Sun, 2025-05-04 at 16:22 +0200, johanngerbhoff at tutamail.com wrote: > > Hi everyone, > > I hope this is the right place to post this request for help. If not, > I apologise in advance It definitely is. > My Dell Latitude 5550 comes with a DW5825e LTE modem which actually > is a Fibocom FM101R-GL card with a Qualcomm Snapdragon X12 chipset. > The corresponding VID/PID is 413c:8213.? > The modem seems to be somewhat new / obscure as I couldn't find any > online discussions on getting it to work on Linux at all. > > I've confirmed this modem working out of the box with Dell's OEM > Ubuntu 22.04 image but not any other current Linux distribution. > I've tried to find out how Dell manages to get it to work and think > I've actually found the unlocking mechanism of action. I've re-built > the required Fibocom tools for OpenSUSE Tumbleweed but I can't get > the modem to connect.? > The actual unlock and mmcli --enable command seems to succeed? but it > will time out when connecting to the network. I can see some errors Does the modem actually get registered with the network, or does it completely fail to communicate with it? By "connecting" I'm not sure if you mean a data connection or just registering. > when checking the systemd log of Fibocom's fibo_helper service which > seems to be responsible for dbus communication, indicating GPIO and > bus problems: > > Mai 04 11:01:13 localhost helper[1210]: [Critical]: > fibocom_get_skuid:186: get_skuid_cmd == 0CB9 > Mai 04 11:01:13 localhost helper[1210]: [Warning]: > fibocom_hwreset_gpio_init_sub:254: /sys/class/gpio/export exists. > Mai 04 11:01:13 localhost helper[1210]: [Error]: bus_name_lost:663: > bus_name_lost !!!! > Mai 04 11:01:13 localhost helper[1210]: [Error]: > fibo_adapter_control_mbim_init:1444: Found cellular FM101-GL-00 > added! > Mai 04 11:01:13 localhost helper[1210]: [Error]: > fibo_helper_device_check:1218: variable is NULL, don't send cellular > info signal! > > My questions now are twofold: > 1: Is it somehow possible to snoop the correct sequence of AT > commands to get the DW5825e to fcc unlock via a "vanilla" > ModemManager without resorting to Fibocom's tools (as those seem to > be not quite trivial to build for current Linux distributions except > Ubuntu)?? It may not even use AT commands; it might be running through an MBIM service instead. At the moment I'm not sure of any unlock procedure for the Fibcom Qualcomm-based devices other than their binary tools. I've run into some trouble with their unlock tools too :( Haven't had the time to dig into it, so thanks for trying with your setup. Hopefully somebody else knows more? Dan > I know that this has been done for the Intel XMM7560 where the AT > commands necessary have been found out, as seen > here:?https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/ > merge_requests/1141 > I'm not the most proficient when it comes to hardware hacking but I'm > grateful for any pointers. > Fibocom's fibo_ma tool seems to be responsible for the actual > unlocking magic, unfortunately it is closed-source. I've tried to > snoop around the binary with Ghidra to see if my untrained eye can > detect the necessary functions - unfortunately I can only see that > some SHA256 shenanigans are going on and lack the knowledge to > investigate further. > > 2: Could someone with more knowledge than me regarding modems please > check in on my build process for Fibocom's tools and the mechanism of > action and maybe point out something I've missed? I'd appreciate any > help a lot. > I'll type out my build notes below. Any steps taken after the build > process are based on Fibocom's CMake install script but adapted for > OpenSUSE file locations. I'm unsure whether I've found out the right > location for the dbus config though. > > Fibocom FM101 / Dell DW5825e OpenSUSE Build:? > > ### Source: ### > https://github.com/fibocom-pc/linux_apps_opensource > > ### How it works ### > ModemManager calls fibo_ma (via the fcc unlock script corresponding > to the modem's hardware id) which performs the necessary magic for a > FCC unlock. > The closed-source fibo_ma calls fibo_helper.service which provides a > dbus interface for comms with the modem. > > fibo_flash.service is used to flash the firmware to the modem -> > needs the OEM FwFlashSrv firmware file from Dell. > fibo_config.service applies config settings from a provided > fbwwanConfig.ini to the modem. The file provided by Dell is the same > one as the one in the Fibocom Github repo. > > fibo_ma seems to check via dmidecode whether the modem and chassis > are Dell devices and refuses to fcc unlock the modem if this check > fails. > > ### Files needed from Dell Ubuntu 22.04 OEM Install ### > /opt/fibocom/fibo_flash_service/FwFlashSrv (Firmware) > /opt/fibocom/fibo_ma_service/fcc-unlock.d (ModemManager FCCUnlock > files) > --> only 413c:8213 is needed but copy the other hw ids for future use > as well > --> needs to be made available to ModemManager in OpenSuse: Should be > linked to /usr/lib64/ModemManager/fcc-unlock.d > > ### Libraries & Tools: ### > cmake > dmidecode > gcc > gcc-c++ > pkgconf-pkg-config > glib2 > glib2-devel > libxml2 > libxml2-devel > libmbim > libmbim-devel > libqmi-glib5 > libqmi-tools > libdbus-glib-1-2 > ModemManager > ModemManager-devel > systemd-devel > > libudev0-shim (OpenSuse only ships with libudev1) > --> compile from > https://archlinux.org/packages/extra/x86_64/libudev0-shim/ > --> set libdir in Makefile to lib64 > --> make install > --> create symlink to /usr/lib64/libudev.so !!!messy!!! > ---> ln -s /usr/lib64/libudev.so.0.13.9999 /usr/lib64/libudev.so > > libdbus-glib-1-2 > --> create symlink from libdbus-1.so.3 to /usr/lib64/libdbus-1.so > !!!messy!!! > ---> sudo ln -s /usr/lib64/libdbus-1.so.3 /usr/lib64/libdbus-1.so > > ### Build ### > cd to linux_apps_opensource directory > cmake -S . -B build > cmake --build build > > --> Create dbus config for fibocom helper: /usr/share/dbus- > 1/com.fibocom.helper.conf > "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" > "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> > > ? > > ? > ??? > ? > > ? > ??? > ? > > > > --> Create fibo_config service > /etc/systemd/system/fibo_config.service > [Unit] > Description=Firmware Config Service > After=ModemManager.service fibo_helper.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_config.d/env.conf > ExecStart=/opt/fibocom/fibo_config_service/fibo_config > ExecReload=/bin/kill -HUP \$MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create fibo_flash service /etc/systemd/system/fibo_flash.service > [Unit] > Description=Firmware Flash Service > After=ModemManager.service fibo_helper.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_flash.d/env.conf > ExecStart=/opt/fibocom/fibo_flash_service/fibo_flash > ExecReload=/bin/kill -HUP \$MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create fibo_helper service > /etc/systemd/system/fibo_helper.service > [Unit] > Description=Firmware Helper Service > After=ModemManager.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf > ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperd > ExecReload=/bin/kill -HUP \$MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create fibo_helper_mbim service > /etc/systemd/system/fibo_helper_mbim.service > [Unit] > Description=Firmware Helper Service > After=ModemManager.service fibo_helper.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf > ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperm > ExecReload=/bin/kill -HUP \$MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create systemd directories for environment files > sudo mkdir /lib/systemd/system/fibo_config.d/ > sudo mkdir /lib/systemd/system/fibo_flash.d/ > sudo mkdir /lib/systemd/system/fibo_helper.d/ > > --> Create environment files (as root) > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > > /lib/systemd/system/fibo_config.d/env.conf > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > > /lib/systemd/system/fibo_flash.d/env.conf > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > > /lib/systemd/system/fibo_helper.d/env.conf > > --> Create the following udev rule: /etc/udev/rules.d/76-mm-fibocom- > linux-apps-port-types.rules > --> Without this rule, the modem is visible to ModemManageron > OpenSUSE but doesn't connect. > --> With this rule, the modem is invisible to ModemManager and still > doesn't connect. > --> Why is this rule in the Fibocom install script? It's also present > on Ubuntu 22.04 but there the modem is visible with the rule. > # do not edit this file, it will be overwritten on update > ACTION!="add|change|move|bind", > GOTO="mm_fibocom_linux_apps_port_types_end" > SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", > ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" > > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > > LABEL="mm_fibocom_linux_apps_port_types_end" > > > --> Create fcc unlock script for the DW5825e (413c:8213) as > /usr/share/ModemManager/fcc-unlock.available.d/413c:8213 > #!/bin/sh > > # SPDX-License-Identifier: CC0-1.0 > # 2023 Nero zhang > # > # Fibocom FM101 FCC unlock mechanism > # > > # run fcc-unlock binary > /opt/fibocom/fibo_ma_service/fibo_ma > exit $? > > --> Tell ModemManager to automatically activate available fcc unlocks > ln -sft /usr/lib64/ModemManager/fcc-unlock.d > /usr/share/ModemManager/fcc-unlock.available.d/* > > --> reload systemd to make fibocom services available > systemctl daemon-reload > > --> activate fibocom services > sudo systemctl enable fibo_helper.service > sudo systemctl enable fibo_helper_mbim.service > sudo systemctl enable fibo_flash.service > sudo systemctl enable fibo_config.service > > > --> Result: > ---> actual unlock works (when udev rule is not set) > ---> no connection > ---> errors in the logs of fibo_helper > > ### Directory structure after build ### > /opt/fibocom/ > |--> fibo_config_service > |--> fibo_flash_service > |--> fibo_helper_service > |--> fibo_ma_service > > Thank you and best, > Jo. > ? From johanngerbhoff at tutamail.com Fri May 9 13:35:42 2025 From: johanngerbhoff at tutamail.com (johanngerbhoff at tutamail.com) Date: Fri, 9 May 2025 15:35:42 +0200 (CEST) Subject: Support for the Dell DW5825e / Fibocom FM101 (Qualcomm X12 chipset) - what am I missing? In-Reply-To: <5cd827704b485009fb2de8b8542b2ed2913c2643.camel@ioncontrol.co-OPmmPHX----9> References: <5cd827704b485009fb2de8b8542b2ed2913c2643.camel@ioncontrol.co-OPmmPHX----9> Message-ID: Hi Dan, thank you for taking the time to respond! > Does the modem actually get registered with the network, or does it > completely fail to communicate with it? By "connecting" I'm not sure if > you mean a data connection or just registering. > It didn't get registered at all with the initial setup instructions I posted as I missed a few crucial steps. I actually got the modem to connect now via doing the following: --> libudev0-shim is NOT needed: Analyzing the package for ubuntu, I found out that Fibocom's tools are actually built against libudev1 but they expect it to be called libudev - so I now linked libudev.so.1.7.10 to libudev.so --> The path for 76-mm-fibocom-linux-apps-port-types.rules should be /usr/lib/udev/rules.d. The content is as follows: # do not edit this file, it will be overwritten on update ACTION!="add|change|move|bind", GOTO="mm_fibocom_linux_apps_port_types_end" SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" LABEL="mm_fibocom_linux_apps_port_types_end" --> There is an additional udev rule that I missed to copy: /usr/lib/udev/rules.d/77-mm-fibocom.rules. Content as follows: ACTION!="add|change|move|bind", GOTO="mm_fibocom_end" ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="14C3:4D75", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="8086:7560", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" LABEL="mm_fibocom_end" --> ModemManager's ExecStart line in /usr/lib/systemd/system/ModemManager.service is modified with a switch: ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume --> a dbus service file needs to be created as?/usr/share/dbus-1/system-services/com.fibocom.helper.service. Contents: [D-BUS Service] Name=com.fibocom.helper Exec=/bin/false User=root SystemdService=fibo_helper.service And here's where it gets interesting: I am now able to successfully connect to the LTE network and surf the internet when manually running ModemManager. When trying to launch ModemManager automatically on startup though, ModemManager seems to fail creating a process group and can't access the cdc_mbim port for some reason. Both logs attached as follows: --> Successful connection via manual ModemManager launch as root. After about 10 minutes the modem resets but reconnects immediately (visible at the end of the log).localhost:~ # /usr/sbin/ModemManager --test-quick-suspend-resume ModemManager[4324]: ModemManager (version 1.22.0) starting in system bus... ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI capable ModemManager[4324]: [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports ModemManager[4324]: [base-manager] modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully created ModemManager[4324]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.3': not supported by any plugin ModemManager[4324]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin ModemManager[4324]: [modem0/cdc-wdm0/mbim] MBIM device is QMI capable ModemManager[4324]: [modem0] state changed (unknown -> disabled) ModemManager[4324]: [modem0] state changed (disabled -> enabling) ModemManager[4324]: [modem0] simple connect started... ModemManager[4324]: [modem0] simple connect state (4/10): wait to get fully enabled ModemManager[4324]: [modem0] Cannot power-up: hardware radio switch is OFF ModemManager[4324]: [modem0] Cannot power-up: hardware radio switch is OFF ModemManager[4324]: [modem0] couldn't enable interface: 'Invalid transition' ModemManager[4324]: [modem0] failed enabling modem: Invalid transition ModemManager[4324]: [modem0] state changed (enabling -> disabled) ModemManager[4324]: [modem0] failed waiting for enabled state: disabled ModemManager[4324]: [modem0] simple connect started... ModemManager[4324]: [modem0] simple connect state (3/10): enable ModemManager[4324]: [modem0] state changed (disabled -> enabling) ModemManager[4324]: [modem0] simple connect started... ModemManager[4324]: [modem0] simple connect state (4/10): wait to get fully enabled ModemManager[4324]: [modem0] couldn't reload extended signal information: No signal details given ModemManager[4324]: [modem0] power state updated: on ModemManager[4324]: [modem0] 3GPP packet service state changed (unknown -> attached) ModemManager[4324]: [modem0] connection attempt cancelled ModemManager[4324]: [modem0] state changed (enabling -> enabled) ModemManager[4324]: [modem0] simple connect state (5/10): wait after enabled ModemManager[4324]: [modem0] 3GPP registration state changed (unknown -> registering) ModemManager[4324]: [modem0] 3GPP registration state changed (registering -> home) ModemManager[4324]: [modem0] state changed (enabled -> registered) ModemManager[4324]: [modem0] simple connect state (6/10): register ModemManager[4324]: [modem0] simple connect state (7/10): wait to get packet service state attached ModemManager[4324]: [modem0] simple connect state (8/10): bearer ModemManager[4324]: [modem0] simple connect state (9/10): connect ModemManager[4324]: [modem0] state changed (registered -> connecting) ModemManager[4324]: [modem0] state changed (connecting -> connected) ModemManager[4324]: [modem0] simple connect state (10/10): all done ModemManager[4324]: [modem0/bearer1] reloading stats failed: Transaction timed out ModemManager[4324]: [modem0] port 'cdc-wdm0' no longer controllable, reprobing ModemManager[4324]: [base-manager] port cdc-wdm0 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands ModemManager[4324]: [modem0/cdc-wdm0/mbim] Couldn't properly close QMI device: Device must be open to send commands ModemManager[4324]: [base-manager] port ttyUSB0 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' ModemManager[4324]: [base-manager] port wwp0s20f0u1 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI capable ModemManager[4324]: [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports ModemManager[4324]: [base-manager] modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully created ModemManager[4324]: [modem1/cdc-wdm0/mbim] MBIM device is QMI capable --> failed connection when launching ModemManager via systemd: localhost:~ # systemctl start ModemManager localhost:~ # systemctl status ModemManager ? ModemManager.service - Modem Manager ????Loaded: loaded (/usr/lib/systemd/system/ModemManager.service; enabled; preset: enabled) ????Active: active (running) since Fri 2025-05-09 15:20:52 CEST; 14s ago Invocation: 1c378c21a150400d8bf3664cb2a40cd8 ??Main PID: 14659 (ModemManager) ?????Tasks: 6 (limit: 18296) ???????CPU: 118ms ????CGroup: /system.slice/ModemManager.service ??????????????14659 /usr/sbin/ModemManager --test-quick-suspend-resume May 09 15:20:55 localhost.localdomain ModemManager[14739]: couldn't setup proxy specific process group May 09 15:20:55 localhost.localdomain ModemManager[14742]: couldn't setup proxy specific process group May 09 15:20:55 localhost.localdomain ModemManager[14745]: couldn't setup proxy specific process group May 09 15:20:55 localhost.localdomain ModemManager[14748]: couldn't setup proxy specific process group May 09 15:20:55 localhost.localdomain ModemManager[14751]: couldn't setup proxy specific process group May 09 15:20:56 localhost.localdomain ModemManager[14659]: [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports May 09 15:20:56 localhost.localdomain ModemManager[14659]: [plugin/dell] could not grab port cdc-wdm0: Cannot add port 'usbmisc/cdc-wdm0', unhandled port type May 09 15:20:56 localhost.localdomain ModemManager[14659]: [base-manager] couldn't create modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1': Failed to find primary AT port May 09 15:20:56 localhost.localdomain ModemManager[14659]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.3': not supported by any plugin May 09 15:20:56 localhost.localdomain ModemManager[14659]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin I have no clue why ModemManager can't access the cdc-wdm0 port - perhaps it isn't given enough privileges when launched via systemd? The service file does however look like any other ModemManager service I've ever encountered: --> Contents of /usr/lib/systemd/system/ModemManager.service: [Unit] Description=Modem Manager After=polkit.service Requires=polkit.service ConditionVirtualization=!container [Service] Type=dbus BusName=org.freedesktop.ModemManager1 ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume StandardError=null Restart=on-abort CapabilityBoundingSet=CAP_SYS_ADMIN CAP_NET_ADMIN ProtectSystem=true ProtectHome=true PrivateTmp=true RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_QIPCRTR NoNewPrivileges=true User=root [Install] WantedBy=multi-user.target Alias=dbus-org.freedesktop.ModemManager1.service > It may not even use AT commands; it might be running through an MBIM > service instead. At the moment I'm not sure of any unlock procedure for > the Fibcom Qualcomm-based devices other than their binary tools. > The ModemManager log indicates that MBIM / QMI are present but that's also the only clue I have, sadly. Once again, sorry for maybe not following the most methodical approach - feels like throwing things on a wall and hope that something sticks. Maybe someone could help with solving that systemd ModemManager startup issue? I can also provide the Dell-specific firmware file if someone would like to investigate further. Best, Jo. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanngerbhoff at tutamail.com Thu May 15 15:16:50 2025 From: johanngerbhoff at tutamail.com (johanngerbhoff at tutamail.com) Date: Thu, 15 May 2025 17:16:50 +0200 (CEST) Subject: Support for the Dell DW5825e / Fibocom FM101 (Qualcomm X12 chipset) - what am I missing? In-Reply-To: References: <5cd827704b485009fb2de8b8542b2ed2913c2643.camel@ioncontrol.co-OPmmPHX----9> Message-ID: Hi everyone.? I found the culprit responsible for the wonky behaviour of ModemManager not connecting when auto-launched but working okay when launched manually. It's SELinux, which is per default set to enforcing on OpenSuse. When set to permissive, the modem now works flawlessly with the build. Obviously disarming SELinux is not ideal so I'll have to learn to write a custom SELinux policy to enable the DW5825e with the enforcing mode. I can't promise any immediate results in this regard as this is something completely new to me - but I'm on it. Here are the working building instructions for enabling the DW5825e on OpenSuse Tumbleweed (tested with snapshots 20250513 and 20250501): --- Fibocom FM101 / Dell DW5825e OpenSUSE Build: ### Source: ### https://github.com/fibocom-pc/linux_apps_opensource ### How it works ### ModemManager calls fibo_ma (via the fcc unlock script corresponding to the modem's hardware id) which performs the necessary magic for a FCC unlock. The closed-source fibo_ma calls fibo_helper_service which provides a dbus interface for comms with the modem. ### SELinux not working ### The modem fails to connect if SELinux is set to enforcing in /etc/selinux/config. For now, set it to permissive. !!! This is dangerous and ugly !!! fibo_flash.service is used to flash the firmware to the modem -> needs the OEM FwFlashSrv firmware file from Dell. The firmware flashed is persistent though, so I think a once successfully flashed modem should continue working successfully. fibo_config.service applies config settings from a provided fbwwanConfig.ini to the modem. The file provided by Dell is the same one as the one in the Fibocom Github repo. fibo_ma seems to check via dmidecode whether the modem and chassis are Dell devices and refuses to fcc unlock the modem if this check fails. ### Files needed from Dell Ubuntu 22.04 OEM Install ### /opt/fibocom/fibo_flash_service/FwFlashSrv (Firmware) /opt/fibocom/fibo_ma_service/fcc-unlock.d (ModemManager FCCUnlock files) --> only 413c:8213 is needed but copy the other hw ids for future use as well --> needs to be made available to ModemManager in OpenSuse: Should be linked to /usr/lib64/ModemManager/fcc-unlock.d ### Libraries & Tools: ### cmake dmidecode gcc gcc-c++ pkgconf-pkg-config glib2 glib2-devel libxml2 libxml2-devel libmbim libmbim-devel libqmi-glib5 libqmi-tools libdbus-glib-1-2 ModemManager ModemManager-devel systemd-devel libdbus-glib-1-2 --> create symlink from libdbus-1.so.3 to /usr/lib64/libdbus-1.so !!!messy!!! ---> sudo ln -s /usr/lib64/libdbus-1.so.3 /usr/lib64/libdbus-1.so ### Build ### cd to linux_apps_opensource directory cmake -S . -B build cmake --build build --> Create dbus config for fibocom helper: /usr/share/dbus-1/system.d/com.fibocom.helper.conf ? ? ??? ? ? ??? ? --> Create dbus service file: /usr/share/dbus-1/system-services/com.fibocom.helper.service [D-BUS Service] Name=com.fibocom.helper Exec=/bin/false User=root SystemdService=fibo_helper.service --> Create fibo_config service /etc/systemd/system/fibo_config.service [Unit] Description=Firmware Config Service After=ModemManager.service fibo_helper.service [Service] EnvironmentFile=/lib/systemd/system/fibo_config.d/env.conf ExecStart=/opt/fibocom/fibo_config_service/fibo_config ExecReload=/bin/kill -HUP $MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create fibo_flash service /etc/systemd/system/fibo_flash.service [Unit] Description=Firmware Flash Service After=ModemManager.service fibo_helper.service [Service] EnvironmentFile=/lib/systemd/system/fibo_flash.d/env.conf ExecStart=/opt/fibocom/fibo_flash_service/fibo_flash ExecReload=/bin/kill -HUP $MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create fibo_helper service /etc/systemd/system/fibo_helper.service [Unit] Description=Firmware Helper Service After=ModemManager.service [Service] EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperd ExecReload=/bin/kill -HUP $MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create fibo_helper_mbim service /etc/systemd/system/fibo_helper_mbim.service [Unit] Description=Firmware Helper Service After=ModemManager.service fibo_helper.service [Service] EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperm ExecReload=/bin/kill -HUP $MAINPID Restart=on-abort Type=simple Restart=on-abort User=root [Install] WantedBy=multi-user.target --> Create systemd directories for environment files sudo mkdir /lib/systemd/system/fibo_config.d/ sudo mkdir /lib/systemd/system/fibo_flash.d/ sudo mkdir /lib/systemd/system/fibo_helper.d/ --> Create environment files (as root) echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_config.d/env.conf echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_flash.d/env.conf echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_helper.d/env.conf --> Create the following udev rule: /usr/lib/udev/rules.d/76-mm-fibocom-linux-apps-port-types.rules # do not edit this file, it will be overwritten on update ACTION!="add|change|move|bind", GOTO="mm_fibocom_linux_apps_port_types_end" SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" LABEL="mm_fibocom_linux_apps_port_types_end" --> Create the following udev rule: /usr/lib/udev/rules.d/77-mm-fibocom.rules ACTION!="add|change|move|bind", GOTO="mm_fibocom_end" ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="14C3:4D75", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="8086:7560", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" LABEL="mm_fibocom_end" --> Edit the ExecStart line in /usr/lib/systemd/system/ModemManager.service: ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume --> Create fcc unlock script for the DW5825e (413c:8213) as /usr/share/ModemManager/fcc-unlock.available.d/413c:8213 #!/bin/sh # SPDX-License-Identifier: CC0-1.0 # 2023 Nero zhang # # Fibocom FM101 FCC unlock mechanism # # run fcc-unlock binary /opt/fibocom/fibo_ma_service/fibo_ma exit $? --> Tell ModemManager to automatically activate available fcc unlocks ln -sft /usr/lib64/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/* --> reload systemd to make fibocom services available systemctl daemon-reload --> activate fibocom services sudo systemctl enable fibo_helper.service sudo systemctl enable fibo_helper_mbim.service sudo systemctl enable fibo_flash.service sudo systemctl enable fibo_config.service --> reboot --> add connection profile / APN via NetworkManager. --> Success! Best, Jo. 9. Mai 2025, 15:35 von johanngerbhoff at tutamail.com: > Hi Dan, thank you for taking the time to respond! > >> Does the modem actually get registered with the network, or does it >> completely fail to communicate with it? By "connecting" I'm not sure if >> you mean a data connection or just registering. >> > It didn't get registered at all with the initial setup instructions I posted as I missed a few crucial steps. I actually got the modem to connect now via doing the following: > > --> libudev0-shim is NOT needed: Analyzing the package for ubuntu, I found out that Fibocom's tools are actually built against libudev1 but they expect it to be called libudev - so I now linked libudev.so.1.7.10 to libudev.so > > --> The path for 76-mm-fibocom-linux-apps-port-types.rules should be /usr/lib/udev/rules.d. The content is as follows: > # do not edit this file, it will be overwritten on update > ACTION!="add|change|move|bind", GOTO="mm_fibocom_linux_apps_port_types_end" > SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" > > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > > LABEL="mm_fibocom_linux_apps_port_types_end" > > --> There is an additional udev rule that I missed to copy: /usr/lib/udev/rules.d/77-mm-fibocom.rules. Content as follows: > ACTION!="add|change|move|bind", GOTO="mm_fibocom_end" > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="14C3:4D75", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="8086:7560", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > > LABEL="mm_fibocom_end" > > --> ModemManager's ExecStart line in /usr/lib/systemd/system/ModemManager.service is modified with a switch: > ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume > > --> a dbus service file needs to be created as?/usr/share/dbus-1/system-services/com.fibocom.helper.service. > Contents: > [D-BUS Service] > Name=com.fibocom.helper > Exec=/bin/false > User=root > SystemdService=fibo_helper.service > > > And here's where it gets interesting: I am now able to successfully connect to the LTE network and surf the internet when manually running ModemManager. When trying to launch ModemManager automatically on startup though, ModemManager seems to fail creating a process group and can't access the cdc_mbim port for some reason. Both logs attached as follows: > > --> Successful connection via manual ModemManager launch as root. After about 10 minutes the modem resets but reconnects immediately (visible at the end of the log). > localhost:~ #> /usr/sbin/ModemManager --test-quick-suspend-resume > ModemManager[4324]: ModemManager (version 1.22.0) starting in system bus... > ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI capable > ModemManager[4324]: [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports > ModemManager[4324]: [base-manager] modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully created > ModemManager[4324]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.3': not supported by any plugin > ModemManager[4324]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin > ModemManager[4324]: [modem0/cdc-wdm0/mbim] MBIM device is QMI capable > ModemManager[4324]: [modem0] state changed (unknown -> disabled) > ModemManager[4324]: [modem0] state changed (disabled -> enabling) > ModemManager[4324]: [modem0] simple connect started... > ModemManager[4324]: [modem0] simple connect state (4/10): wait to get fully enabled > ModemManager[4324]: [modem0] Cannot power-up: hardware radio switch is OFF > ModemManager[4324]: [modem0] Cannot power-up: hardware radio switch is OFF > ModemManager[4324]: [modem0] couldn't enable interface: 'Invalid transition' > ModemManager[4324]: [modem0] failed enabling modem: Invalid transition > ModemManager[4324]: [modem0] state changed (enabling -> disabled) > ModemManager[4324]: [modem0] failed waiting for enabled state: disabled > ModemManager[4324]: [modem0] simple connect started... > ModemManager[4324]: [modem0] simple connect state (3/10): enable > ModemManager[4324]: [modem0] state changed (disabled -> enabling) > ModemManager[4324]: [modem0] simple connect started... > ModemManager[4324]: [modem0] simple connect state (4/10): wait to get fully enabled > ModemManager[4324]: [modem0] couldn't reload extended signal information: No signal details given > ModemManager[4324]: [modem0] power state updated: on > ModemManager[4324]: [modem0] 3GPP packet service state changed (unknown -> attached) > ModemManager[4324]: [modem0] connection attempt cancelled > ModemManager[4324]: [modem0] state changed (enabling -> enabled) > ModemManager[4324]: [modem0] simple connect state (5/10): wait after enabled > ModemManager[4324]: [modem0] 3GPP registration state changed (unknown -> registering) > ModemManager[4324]: [modem0] 3GPP registration state changed (registering -> home) > ModemManager[4324]: [modem0] state changed (enabled -> registered) > ModemManager[4324]: [modem0] simple connect state (6/10): register > ModemManager[4324]: [modem0] simple connect state (7/10): wait to get packet service state attached > ModemManager[4324]: [modem0] simple connect state (8/10): bearer > ModemManager[4324]: [modem0] simple connect state (9/10): connect > ModemManager[4324]: [modem0] state changed (registered -> connecting) > ModemManager[4324]: [modem0] state changed (connecting -> connected) > ModemManager[4324]: [modem0] simple connect state (10/10): all done > ModemManager[4324]: [modem0/bearer1] reloading stats failed: Transaction timed out > ModemManager[4324]: [modem0] port 'cdc-wdm0' no longer controllable, reprobing > ModemManager[4324]: [base-manager] port cdc-wdm0 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands > ModemManager[4324]: [modem0/cdc-wdm0/mbim] Couldn't properly close QMI device: Device must be open to send commands > ModemManager[4324]: [base-manager] port ttyUSB0 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' > ModemManager[4324]: [base-manager] port wwp0s20f0u1 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' > ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI capable > ModemManager[4324]: [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports > ModemManager[4324]: [base-manager] modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully created > ModemManager[4324]: [modem1/cdc-wdm0/mbim] MBIM device is QMI capable > --> failed connection when launching ModemManager via systemd: > localhost:~ #> systemctl start ModemManager > localhost:~ #> systemctl status ModemManager > ?> ModemManager.service - Modem Manager > ????Loaded: loaded (/usr/lib/systemd/system/ModemManager.service; > enabled> ; preset: > enabled> ) > ????Active: > active (running)> since Fri 2025-05-09 15:20:52 CEST; 14s ago > Invocation: 1c378c21a150400d8bf3664cb2a40cd8 > ??Main PID: 14659 (ModemManager) > ?????Tasks: 6> (limit: 18296)> > ???????CPU: 118ms > ????CGroup: /> system.slice/ModemManager.service > > ??????????????> 14659 /usr/sbin/ModemManager --test-quick-suspend-resume> > > May 09 15:20:55 localhost.localdomain ModemManager[14739]: > couldn't setup proxy specific process group> > May 09 15:20:55 localhost.localdomain ModemManager[14742]: > couldn't setup proxy specific process group> > May 09 15:20:55 localhost.localdomain ModemManager[14745]: > couldn't setup proxy specific process group> > May 09 15:20:55 localhost.localdomain ModemManager[14748]: > couldn't setup proxy specific process group> > May 09 15:20:55 localhost.localdomain ModemManager[14751]: > couldn't setup proxy specific process group> > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports> > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > [plugin/dell] could not grab port cdc-wdm0: Cannot add port 'usbmisc/cdc-wdm0', unhandled port type> > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > [base-manager] couldn't create modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1': Failed to find primary AT port> > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.3': not supported by any plugin> > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin > I have no clue why ModemManager can't access the cdc-wdm0 port - perhaps it isn't given enough privileges when launched via systemd? The service file does however look like any other ModemManager service I've ever encountered: > > --> Contents of /usr/lib/systemd/system/ModemManager.service: > [Unit] > Description=Modem Manager > After=polkit.service > Requires=polkit.service > ConditionVirtualization=!container > > [Service] > Type=dbus > BusName=org.freedesktop.ModemManager1 > ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume > StandardError=null > Restart=on-abort > CapabilityBoundingSet=CAP_SYS_ADMIN CAP_NET_ADMIN > ProtectSystem=true > ProtectHome=true > PrivateTmp=true > RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_QIPCRTR > NoNewPrivileges=true > User=root > > [Install] > WantedBy=multi-user.target > Alias=dbus-org.freedesktop.ModemManager1.service > >> It may not even use AT commands; it might be running through an MBIM >> service instead. At the moment I'm not sure of any unlock procedure for >> the Fibcom Qualcomm-based devices other than their binary tools. >> > The ModemManager log indicates that MBIM / QMI are present but that's also the only clue I have, sadly. > > Once again, sorry for maybe not following the most methodical approach - feels like throwing things on a wall and hope that something sticks. > Maybe someone could help with solving that systemd ModemManager startup issue? I can also provide the Dell-specific firmware file if someone would like to investigate further. > > Best, Jo. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanngerbhoff at tutamail.com Mon May 19 13:43:58 2025 From: johanngerbhoff at tutamail.com (johanngerbhoff at tutamail.com) Date: Mon, 19 May 2025 15:43:58 +0200 (CEST) Subject: Support for the Dell DW5825e / Fibocom FM101 (Qualcomm X12 chipset) - what am I missing? In-Reply-To: References: <5cd827704b485009fb2de8b8542b2ed2913c2643.camel@ioncontrol.co-OPmmPHX----9> Message-ID: Hi everyone, managed to get the DW5825e working with SELinux on Tumbleweed via the following steps: ### SELinux Setup ###--> install necessary tools if they aren't yet installedsudo zypper in restorecond policycoreutils policycoreutils-devel selinux-policy-devel setools-console--> set SELinux policy to permissive in /etc/selinux/config--> reboot, create APN settings in NetworkManager and connect once to your mobile network--> analyze the audit log to see the behaviour SELinux wants to block.sudo audit2allow -w -a--> if the only denied entries are related to ModemManager, fibo_config, fibo_flash, fibo_helperd and dmidecode, you can automatically generate a SELinux module to allow the execution of these tools via audit2allow.sudo audit2allow -a -R -M fibocomservices!! This command might fail with "could not open interface info [/var/lib/sepolgen/interface_info]" !!!! This can be fixed by running sudo sepolgen-ifgen and then running the audit2allow command again !!--> install the generated module:sudo semodule -i fibocomservices.pp--> SELinux should now play nice with the Fibocom services.--> set SELinux policy to enforcing in /etc/selinux/config--> reboot and the connection should succeed now with SELinux enabled. I've also posted the working build instructions to the OpenSuse forums in the hope that someone might create and maintain an easily installable package (unfortunately I myself lack the knowledge and resources to do so):?https://forums.opensuse.org/t/got-the-dell-dw5825e-fibocom-fm101-lte-modem-working-on-tumbleweed-would-anyone-be-up-for-packaging-and-maintaining-the-necessary-fibocom-software/185130 Best, Jo 15. Mai 2025, 17:17 von : > Hi everyone.? > > I found the culprit responsible for the wonky behaviour of ModemManager not connecting when auto-launched but working okay when launched manually. It's SELinux, which is per default set to enforcing on OpenSuse. When set to permissive, the modem now works flawlessly with the build. > > Obviously disarming SELinux is not ideal so I'll have to learn to write a custom SELinux policy to enable the DW5825e with the enforcing mode. I can't promise any immediate results in this regard as this is something completely new to me - but I'm on it. > > Here are the working building instructions for enabling the DW5825e on OpenSuse Tumbleweed (tested with snapshots 20250513 and 20250501): > > --- > > Fibocom FM101 / Dell DW5825e OpenSUSE Build: > > ### Source: ### > https://github.com/fibocom-pc/linux_apps_opensource > > ### How it works ### > ModemManager calls fibo_ma (via the fcc unlock script corresponding to the modem's hardware id) which performs the necessary magic for a FCC unlock. > The closed-source fibo_ma calls fibo_helper_service which provides a dbus interface for comms with the modem. > > ### SELinux not working ### > The modem fails to connect if SELinux is set to enforcing in /etc/selinux/config. > For now, set it to permissive. > !!! This is dangerous and ugly !!! > > > fibo_flash.service is used to flash the firmware to the modem -> needs the OEM FwFlashSrv firmware file from Dell. The firmware flashed is persistent though, so I think a once successfully flashed modem should continue working successfully. > fibo_config.service applies config settings from a provided fbwwanConfig.ini to the modem. The file provided by Dell is the same one as the one in the Fibocom Github repo. > > fibo_ma seems to check via dmidecode whether the modem and chassis are Dell devices and refuses to fcc unlock the modem if this check fails. > > ### Files needed from Dell Ubuntu 22.04 OEM Install ### > /opt/fibocom/fibo_flash_service/FwFlashSrv (Firmware) > /opt/fibocom/fibo_ma_service/fcc-unlock.d (ModemManager FCCUnlock files) > --> only 413c:8213 is needed but copy the other hw ids for future use as well > --> needs to be made available to ModemManager in OpenSuse: Should be linked to /usr/lib64/ModemManager/fcc-unlock.d > > ### Libraries & Tools: ### > cmake > dmidecode > gcc > gcc-c++ > pkgconf-pkg-config > glib2 > glib2-devel > libxml2 > libxml2-devel > libmbim > libmbim-devel > libqmi-glib5 > libqmi-tools > libdbus-glib-1-2 > ModemManager > ModemManager-devel > systemd-devel > > > libdbus-glib-1-2 > --> create symlink from libdbus-1.so.3 to /usr/lib64/libdbus-1.so !!!messy!!! > ---> sudo ln -s /usr/lib64/libdbus-1.so.3 /usr/lib64/libdbus-1.so > > ### Build ### > cd to linux_apps_opensource directory > cmake -S . -B build > cmake --build build > > --> Create dbus config for fibocom helper: /usr/share/dbus-1/system.d/com.fibocom.helper.conf > "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" > "> http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd> "> > > ? > > ? > ??? > ? > > ? > ??? > ? > > > --> Create dbus service file: /usr/share/dbus-1/system-services/com.fibocom.helper.service > [D-BUS Service] > Name=com.fibocom.helper > Exec=/bin/false > User=root > SystemdService=fibo_helper.service > > > > --> Create fibo_config service /etc/systemd/system/fibo_config.service > [Unit] > Description=Firmware Config Service > After=ModemManager.service fibo_helper.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_config.d/env.conf > ExecStart=/opt/fibocom/fibo_config_service/fibo_config > ExecReload=/bin/kill -HUP $MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create fibo_flash service /etc/systemd/system/fibo_flash.service > [Unit] > Description=Firmware Flash Service > After=ModemManager.service fibo_helper.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_flash.d/env.conf > ExecStart=/opt/fibocom/fibo_flash_service/fibo_flash > ExecReload=/bin/kill -HUP $MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create fibo_helper service /etc/systemd/system/fibo_helper.service > [Unit] > Description=Firmware Helper Service > After=ModemManager.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf > ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperd > ExecReload=/bin/kill -HUP $MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create fibo_helper_mbim service /etc/systemd/system/fibo_helper_mbim.service > [Unit] > Description=Firmware Helper Service > After=ModemManager.service fibo_helper.service > > [Service] > EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf > ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperm > ExecReload=/bin/kill -HUP $MAINPID > Restart=on-abort > Type=simple > Restart=on-abort > User=root > > [Install] > WantedBy=multi-user.target > > --> Create systemd directories for environment files > sudo mkdir /lib/systemd/system/fibo_config.d/ > sudo mkdir /lib/systemd/system/fibo_flash.d/ > sudo mkdir /lib/systemd/system/fibo_helper.d/ > > --> Create environment files (as root) > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_config.d/env.conf > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_flash.d/env.conf > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > /lib/systemd/system/fibo_helper.d/env.conf > > --> Create the following udev rule: /usr/lib/udev/rules.d/76-mm-fibocom-linux-apps-port-types.rules > # do not edit this file, it will be overwritten on update > ACTION!="add|change|move|bind", GOTO="mm_fibocom_linux_apps_port_types_end" > SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" > > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" > > LABEL="mm_fibocom_linux_apps_port_types_end" > > --> Create the following udev rule: /usr/lib/udev/rules.d/77-mm-fibocom.rules > ACTION!="add|change|move|bind", GOTO="mm_fibocom_end" > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="14C3:4D75", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="8086:7560", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > > LABEL="mm_fibocom_end" > > --> Edit the ExecStart line in /usr/lib/systemd/system/ModemManager.service: > ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume > > --> Create fcc unlock script for the DW5825e (413c:8213) as /usr/share/ModemManager/fcc-unlock.available.d/413c:8213 > #!/bin/sh > > # SPDX-License-Identifier: CC0-1.0 > # 2023 Nero zhang <> sinaro at sinaro.es> > > # > # Fibocom FM101 FCC unlock mechanism > # > > # run fcc-unlock binary > /opt/fibocom/fibo_ma_service/fibo_ma > exit $? > > --> Tell ModemManager to automatically activate available fcc unlocks > ln -sft /usr/lib64/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/* > > --> reload systemd to make fibocom services available > systemctl daemon-reload > > --> activate fibocom services > sudo systemctl enable fibo_helper.service > sudo systemctl enable fibo_helper_mbim.service > sudo systemctl enable fibo_flash.service > sudo systemctl enable fibo_config.service > > --> reboot > > --> add connection profile / APN via NetworkManager. > > --> Success! > > > Best, > Jo. > > 9. Mai 2025, 15:35 von johanngerbhoff at tutamail.com: > >> Hi Dan, thank you for taking the time to respond! >> >>> Does the modem actually get registered with the network, or does it >>> completely fail to communicate with it? By "connecting" I'm not sure if >>> you mean a data connection or just registering. >>> >> It didn't get registered at all with the initial setup instructions I posted as I missed a few crucial steps. I actually got the modem to connect now via doing the following: >> >> --> libudev0-shim is NOT needed: Analyzing the package for ubuntu, I found out that Fibocom's tools are actually built against libudev1 but they expect it to be called libudev - so I now linked libudev.so.1.7.10 to libudev.so >> >> --> The path for 76-mm-fibocom-linux-apps-port-types.rules should be /usr/lib/udev/rules.d. The content is as follows: >> # do not edit this file, it will be overwritten on update >> ACTION!="add|change|move|bind", GOTO="mm_fibocom_linux_apps_port_types_end" >> SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" >> >> ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" >> ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" >> ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" >> ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" >> >> ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" >> ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_IGNORE}="1" >> >> LABEL="mm_fibocom_linux_apps_port_types_end" >> >> --> There is an additional udev rule that I missed to copy: /usr/lib/udev/rules.d/77-mm-fibocom.rules. Content as follows: >> ACTION!="add|change|move|bind", GOTO="mm_fibocom_end" >> ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="14C3:4D75", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" >> ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="8086:7560", ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" >> >> LABEL="mm_fibocom_end" >> >> --> ModemManager's ExecStart line in /usr/lib/systemd/system/ModemManager.service is modified with a switch: >> ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume >> >> --> a dbus service file needs to be created as?/usr/share/dbus-1/system-services/com.fibocom.helper.service. >> Contents: >> [D-BUS Service] >> Name=com.fibocom.helper >> Exec=/bin/false >> User=root >> SystemdService=fibo_helper.service >> >> >> And here's where it gets interesting: I am now able to successfully connect to the LTE network and surf the internet when manually running ModemManager. When trying to launch ModemManager automatically on startup though, ModemManager seems to fail creating a process group and can't access the cdc_mbim port for some reason. Both logs attached as follows: >> >> --> Successful connection via manual ModemManager launch as root. After about 10 minutes the modem resets but reconnects immediately (visible at the end of the log). >> localhost:~ #>> /usr/sbin/ModemManager --test-quick-suspend-resume >> ModemManager[4324]: ModemManager (version 1.22.0) starting in system bus... >> ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI capable >> ModemManager[4324]: [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports >> ModemManager[4324]: [base-manager] modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully created >> ModemManager[4324]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.3': not supported by any plugin >> ModemManager[4324]: [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin >> ModemManager[4324]: [modem0/cdc-wdm0/mbim] MBIM device is QMI capable >> ModemManager[4324]: [modem0] state changed (unknown -> disabled) >> ModemManager[4324]: [modem0] state changed (disabled -> enabling) >> ModemManager[4324]: [modem0] simple connect started... >> ModemManager[4324]: [modem0] simple connect state (4/10): wait to get fully enabled >> ModemManager[4324]: [modem0] Cannot power-up: hardware radio switch is OFF >> ModemManager[4324]: [modem0] Cannot power-up: hardware radio switch is OFF >> ModemManager[4324]: [modem0] couldn't enable interface: 'Invalid transition' >> ModemManager[4324]: [modem0] failed enabling modem: Invalid transition >> ModemManager[4324]: [modem0] state changed (enabling -> disabled) >> ModemManager[4324]: [modem0] failed waiting for enabled state: disabled >> ModemManager[4324]: [modem0] simple connect started... >> ModemManager[4324]: [modem0] simple connect state (3/10): enable >> ModemManager[4324]: [modem0] state changed (disabled -> enabling) >> ModemManager[4324]: [modem0] simple connect started... >> ModemManager[4324]: [modem0] simple connect state (4/10): wait to get fully enabled >> ModemManager[4324]: [modem0] couldn't reload extended signal information: No signal details given >> ModemManager[4324]: [modem0] power state updated: on >> ModemManager[4324]: [modem0] 3GPP packet service state changed (unknown -> attached) >> ModemManager[4324]: [modem0] connection attempt cancelled >> ModemManager[4324]: [modem0] state changed (enabling -> enabled) >> ModemManager[4324]: [modem0] simple connect state (5/10): wait after enabled >> ModemManager[4324]: [modem0] 3GPP registration state changed (unknown -> registering) >> ModemManager[4324]: [modem0] 3GPP registration state changed (registering -> home) >> ModemManager[4324]: [modem0] state changed (enabled -> registered) >> ModemManager[4324]: [modem0] simple connect state (6/10): register >> ModemManager[4324]: [modem0] simple connect state (7/10): wait to get packet service state attached >> ModemManager[4324]: [modem0] simple connect state (8/10): bearer >> ModemManager[4324]: [modem0] simple connect state (9/10): connect >> ModemManager[4324]: [modem0] state changed (registered -> connecting) >> ModemManager[4324]: [modem0] state changed (connecting -> connected) >> ModemManager[4324]: [modem0] simple connect state (10/10): all done >> ModemManager[4324]: [modem0/bearer1] reloading stats failed: Transaction timed out >> ModemManager[4324]: [modem0] port 'cdc-wdm0' no longer controllable, reprobing >> ModemManager[4324]: [base-manager] port cdc-wdm0 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' >> ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands >> ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands >> ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands >> ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands >> ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must be open to send commands >> ModemManager[4324]: [modem0/cdc-wdm0/mbim] Couldn't properly close QMI device: Device must be open to send commands >> ModemManager[4324]: [base-manager] port ttyUSB0 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' >> ModemManager[4324]: [base-manager] port wwp0s20f0u1 released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' >> ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI capable >> ModemManager[4324]: [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports >> ModemManager[4324]: [base-manager] modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully created >> ModemManager[4324]: [modem1/cdc-wdm0/mbim] MBIM device is QMI capable >> --> failed connection when launching ModemManager via systemd: >> localhost:~ #>> systemctl start ModemManager >> localhost:~ #>> systemctl status ModemManager >> ?>> ModemManager.service - Modem Manager >> ????Loaded: loaded (/usr/lib/systemd/system/ModemManager.service; >> enabled>> ; preset: >> enabled>> ) >> ????Active: >> active (running)>> since Fri 2025-05-09 15:20:52 CEST; 14s ago >> Invocation: 1c378c21a150400d8bf3664cb2a40cd8 >> ??Main PID: 14659 (ModemManager) >> ?????Tasks: 6>> (limit: 18296)>> >> ???????CPU: 118ms >> ????CGroup: />> system.slice/ModemManager.service >> >> ??????????????>> 14659 /usr/sbin/ModemManager --test-quick-suspend-resume>> >> >> May 09 15:20:55 localhost.localdomain ModemManager[14739]: >> couldn't setup proxy specific process group>> >> May 09 15:20:55 localhost.localdomain ModemManager[14742]: >> couldn't setup proxy specific process group>> >> May 09 15:20:55 localhost.localdomain ModemManager[14745]: >> couldn't setup proxy specific process group>> >> May 09 15:20:55 localhost.localdomain ModemManager[14748]: >> couldn't setup proxy specific process group>> >> May 09 15:20:55 localhost.localdomain ModemManager[14751]: >> couldn't setup proxy specific process group>> >> May 09 15:20:56 localhost.localdomain ModemManager[14659]: >> [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem with plugin 'dell' and '3' ports>> >> May 09 15:20:56 localhost.localdomain ModemManager[14659]: >> [plugin/dell] could not grab port cdc-wdm0: Cannot add port 'usbmisc/cdc-wdm0', unhandled port type>> >> May 09 15:20:56 localhost.localdomain ModemManager[14659]: >> [base-manager] couldn't create modem for device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1': Failed to find primary AT port>> >> May 09 15:20:56 localhost.localdomain ModemManager[14659]: >> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.3': not supported by any plugin>> >> May 09 15:20:56 localhost.localdomain ModemManager[14659]: >> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin >> I have no clue why ModemManager can't access the cdc-wdm0 port - perhaps it isn't given enough privileges when launched via systemd? The service file does however look like any other ModemManager service I've ever encountered: >> >> --> Contents of /usr/lib/systemd/system/ModemManager.service: >> [Unit] >> Description=Modem Manager >> After=polkit.service >> Requires=polkit.service >> ConditionVirtualization=!container >> >> [Service] >> Type=dbus >> BusName=org.freedesktop.ModemManager1 >> ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume >> StandardError=null >> Restart=on-abort >> CapabilityBoundingSet=CAP_SYS_ADMIN CAP_NET_ADMIN >> ProtectSystem=true >> ProtectHome=true >> PrivateTmp=true >> RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_QIPCRTR >> NoNewPrivileges=true >> User=root >> >> [Install] >> WantedBy=multi-user.target >> Alias=dbus-org.freedesktop.ModemManager1.service >>> It may not even use AT commands; it might be running through an MBIM >>> service instead. At the moment I'm not sure of any unlock procedure for >>> the Fibcom Qualcomm-based devices other than their binary tools. >>> >> The ModemManager log indicates that MBIM / QMI are present but that's also the only clue I have, sadly. >> >> Once again, sorry for maybe not following the most methodical approach - feels like throwing things on a wall and hope that something sticks. >> Maybe someone could help with solving that systemd ModemManager startup issue? I can also provide the Dell-specific firmware file if someone would like to investigate further. >> >> Best, Jo. >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at ioncontrol.co Mon May 19 14:28:23 2025 From: dan at ioncontrol.co (Dan Williams) Date: Mon, 19 May 2025 09:28:23 -0500 Subject: Support for the Dell DW5825e / Fibocom FM101 (Qualcomm X12 chipset) - what am I missing? In-Reply-To: References: <5cd827704b485009fb2de8b8542b2ed2913c2643.camel@ioncontrol.co-OPmmPHX----9> Message-ID: <1bf700a18732d90312f70e8ef8134f3de68b8eeb.camel@ioncontrol.co> On Mon, 2025-05-19 at 15:43 +0200, johanngerbhoff at tutamail.com wrote: > > Hi everyone, > > managed to get the DW5825e working with SELinux on Tumbleweed via the > following steps: > > ### SELinux Setup ### > > --> install necessary tools if they aren't yet installed > sudo zypper in restorecond policycoreutils policycoreutils-devel > selinux-policy-devel setools-console > > --> set SELinux policy to permissive in /etc/selinux/config > > --> reboot, create APN settings in NetworkManager and connect once to > your mobile network > > --> analyze the audit log to see the behaviour SELinux wants to > block. > > sudo audit2allow -w -a > > --> if the only denied entries are related to ModemManager, > fibo_config, fibo_flash, fibo_helperd and dmidecode, you can > automatically generate a SELinux module to allow the execution of > these tools via audit2allow. > > sudo audit2allow -a -R -M fibocomservices > > !! This command might fail with "could not open interface info > [/var/lib/sepolgen/interface_info]" !! > !! This can be fixed by running sudo sepolgen-ifgen and then running > the audit2allow command again !! > > --> install the generated module: > > sudo semodule -i fibocomservices.pp > > --> SELinux should now play nice with the Fibocom services. > --> set SELinux policy to enforcing in /etc/selinux/config > --> reboot and the connection should succeed now with SELinux > enabled. It might be worth submitting the policy to Fibocomm's github repo as a PR too. I think that would be "audit2allow -a -R -m fibocomservices" and then you'll end up with a ".te" (type enforcement) file that you can put in the PR. It should look something like https://github.com/stefanberger/swtpm/blob/master/src/selinux/swtpm.te I'm a bit hazy on process of getting the .te file into something that can get shipped with a package; looking at some Fedora packages that ship SELinux policy looks more complicated than I recall. But the ".te" file is the start; would you be able to post that output here? > > > I've also posted the working build instructions to the OpenSuse > forums in the hope that someone might create and maintain an easily > installable package (unfortunately I myself lack the knowledge and > resources to do > so):?https://forums.opensuse.org/t/got-the-dell-dw5825e-fibocom-fm101 > -lte-modem-working-on-tumbleweed-would-anyone-be-up-for-packaging- > and-maintaining-the-necessary-fibocom-software/185130 Good work; thanks for sticking with it! Dan > > Best, > Jo > > 15. Mai 2025, 17:17 von : > > Hi everyone.? > > > > I found the culprit responsible for the wonky behaviour of > > ModemManager not connecting when auto-launched but working okay > > when launched manually. It's SELinux, which is per default set to > > enforcing on OpenSuse. When set to permissive, the modem now works > > flawlessly with the build. > > > > Obviously disarming SELinux is not ideal so I'll have to learn to > > write a custom SELinux policy to enable the DW5825e with the > > enforcing mode. I can't promise any immediate results in this > > regard as this is something completely new to me - but I'm on it. > > > > Here are the working building instructions for enabling the DW5825e > > on OpenSuse Tumbleweed (tested with snapshots 20250513 and > > 20250501): > > > > --- > > > > Fibocom FM101 / Dell DW5825e OpenSUSE Build: > > > > ### Source: ### > > https://github.com/fibocom-pc/linux_apps_opensource > > > > ### How it works ### > > ModemManager calls fibo_ma (via the fcc unlock script corresponding > > to the modem's hardware id) which performs the necessary magic for > > a FCC unlock. > > The closed-source fibo_ma calls fibo_helper_service which provides > > a dbus interface for comms with the modem. > > > > ### SELinux not working ### > > The modem fails to connect if SELinux is set to enforcing in > > /etc/selinux/config. > > For now, set it to permissive. > > !!! This is dangerous and ugly !!! > > > > > > fibo_flash.service is used to flash the firmware to the modem -> > > needs the OEM FwFlashSrv firmware file from Dell. The firmware > > flashed is persistent though, so I think a once successfully > > flashed modem should continue working successfully. > > fibo_config.service applies config settings from a provided > > fbwwanConfig.ini to the modem. The file provided by Dell is the > > same one as the one in the Fibocom Github repo. > > > > fibo_ma seems to check via dmidecode whether the modem and chassis > > are Dell devices and refuses to fcc unlock the modem if this check > > fails. > > > > ### Files needed from Dell Ubuntu 22.04 OEM Install ### > > /opt/fibocom/fibo_flash_service/FwFlashSrv (Firmware) > > /opt/fibocom/fibo_ma_service/fcc-unlock.d (ModemManager FCCUnlock > > files) > > --> only 413c:8213 is needed but copy the other hw ids for future > > use as well > > --> needs to be made available to ModemManager in OpenSuse: Should > > be linked to /usr/lib64/ModemManager/fcc-unlock.d > > > > ### Libraries & Tools: ### > > cmake > > dmidecode > > gcc > > gcc-c++ > > pkgconf-pkg-config > > glib2 > > glib2-devel > > libxml2 > > libxml2-devel > > libmbim > > libmbim-devel > > libqmi-glib5 > > libqmi-tools > > libdbus-glib-1-2 > > ModemManager > > ModemManager-devel > > systemd-devel > > > > > > libdbus-glib-1-2 > > --> create symlink from libdbus-1.so.3 to /usr/lib64/libdbus-1.so > > !!!messy!!! > > ---> sudo ln -s /usr/lib64/libdbus-1.so.3 /usr/lib64/libdbus-1.so > > > > ### Build ### > > cd to linux_apps_opensource directory > > cmake -S . -B build > > cmake --build build > > > > --> Create dbus config for fibocom helper: /usr/share/dbus- > > 1/system.d/com.fibocom.helper.conf > > > "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" > > "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> > > > > ? > > > > ? > > ??? > > ? > > > > ? > > ??? > > ? > > > > > > --> Create dbus service file: /usr/share/dbus-1/system- > > services/com.fibocom.helper.service > > [D-BUS Service] > > Name=com.fibocom.helper > > Exec=/bin/false > > User=root > > SystemdService=fibo_helper.service > > > > > > > > --> Create fibo_config service > > /etc/systemd/system/fibo_config.service > > [Unit] > > Description=Firmware Config Service > > After=ModemManager.service fibo_helper.service > > > > [Service] > > EnvironmentFile=/lib/systemd/system/fibo_config.d/env.conf > > ExecStart=/opt/fibocom/fibo_config_service/fibo_config > > ExecReload=/bin/kill -HUP $MAINPID > > Restart=on-abort > > Type=simple > > Restart=on-abort > > User=root > > > > [Install] > > WantedBy=multi-user.target > > > > --> Create fibo_flash service > > /etc/systemd/system/fibo_flash.service > > [Unit] > > Description=Firmware Flash Service > > After=ModemManager.service fibo_helper.service > > > > [Service] > > EnvironmentFile=/lib/systemd/system/fibo_flash.d/env.conf > > ExecStart=/opt/fibocom/fibo_flash_service/fibo_flash > > ExecReload=/bin/kill -HUP $MAINPID > > Restart=on-abort > > Type=simple > > Restart=on-abort > > User=root > > > > [Install] > > WantedBy=multi-user.target > > > > --> Create fibo_helper service > > /etc/systemd/system/fibo_helper.service > > [Unit] > > Description=Firmware Helper Service > > After=ModemManager.service > > > > [Service] > > EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf > > ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperd > > ExecReload=/bin/kill -HUP $MAINPID > > Restart=on-abort > > Type=simple > > Restart=on-abort > > User=root > > > > [Install] > > WantedBy=multi-user.target > > > > --> Create fibo_helper_mbim service > > /etc/systemd/system/fibo_helper_mbim.service > > [Unit] > > Description=Firmware Helper Service > > After=ModemManager.service fibo_helper.service > > > > [Service] > > EnvironmentFile=/lib/systemd/system/fibo_helper.d/env.conf > > ExecStart=/opt/fibocom/fibo_helper_service/fibo_helperm > > ExecReload=/bin/kill -HUP $MAINPID > > Restart=on-abort > > Type=simple > > Restart=on-abort > > User=root > > > > [Install] > > WantedBy=multi-user.target > > > > --> Create systemd directories for environment files > > sudo mkdir /lib/systemd/system/fibo_config.d/ > > sudo mkdir /lib/systemd/system/fibo_flash.d/ > > sudo mkdir /lib/systemd/system/fibo_helper.d/ > > > > --> Create environment files (as root) > > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > > > /lib/systemd/system/fibo_config.d/env.conf > > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > > > /lib/systemd/system/fibo_flash.d/env.conf > > echo "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib64" > > > /lib/systemd/system/fibo_helper.d/env.conf > > > > --> Create the following udev rule: /usr/lib/udev/rules.d/76-mm- > > fibocom-linux-apps-port-types.rules > > # do not edit this file, it will be overwritten on update > > ACTION!="add|change|move|bind", > > GOTO="mm_fibocom_linux_apps_port_types_end" > > SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", > > ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" > > > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", > > ENV{ID_MM_PORT_IGNORE}="1" > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", > > ENV{ID_MM_PORT_IGNORE}="1" > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" > > > > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", > > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", > > ENV{ID_MM_PORT_IGNORE}="1" > > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", > > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", > > ENV{ID_MM_PORT_IGNORE}="1" > > > > LABEL="mm_fibocom_linux_apps_port_types_end" > > > > --> Create the following udev rule: /usr/lib/udev/rules.d/77-mm- > > fibocom.rules > > ACTION!="add|change|move|bind", GOTO="mm_fibocom_end" > > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="14C3:4D75", > > ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="8086:7560", > > ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > > > > LABEL="mm_fibocom_end" > > > > --> Edit the ExecStart line in > > /usr/lib/systemd/system/ModemManager.service: > > ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume > > > > --> Create fcc unlock script for the DW5825e (413c:8213) as > > /usr/share/ModemManager/fcc-unlock.available.d/413c:8213 > > #!/bin/sh > > > > # SPDX-License-Identifier: CC0-1.0 > > # 2023 Nero zhang > > # > > # Fibocom FM101 FCC unlock mechanism > > # > > > > # run fcc-unlock binary > > /opt/fibocom/fibo_ma_service/fibo_ma > > exit $? > > > > --> Tell ModemManager to automatically activate available fcc > > unlocks > > ln -sft /usr/lib64/ModemManager/fcc-unlock.d > > /usr/share/ModemManager/fcc-unlock.available.d/* > > > > --> reload systemd to make fibocom services available > > systemctl daemon-reload > > > > --> activate fibocom services > > sudo systemctl enable fibo_helper.service > > sudo systemctl enable fibo_helper_mbim.service > > sudo systemctl enable fibo_flash.service > > sudo systemctl enable fibo_config.service > > > > --> reboot > > > > --> add connection profile / APN via NetworkManager. > > > > --> Success! > > > > > > Best, > > Jo. > > > > 9. Mai 2025, 15:35 von johanngerbhoff at tutamail.com: > > > Hi Dan, thank you for taking the time to respond! > > > > Does the modem actually get registered with the network, or > > > > does it > > > > completely fail to communicate with it? By "connecting" I'm not > > > > sure if > > > > you mean a data connection or just registering. > > > It didn't get registered at all with the initial setup > > > instructions I posted as I missed a few crucial steps. I actually > > > got the modem to connect now via doing the following: > > > > > > --> libudev0-shim is NOT needed: Analyzing the package for > > > ubuntu, I found out that Fibocom's tools are actually built > > > against libudev1 but they expect it to be called libudev - so I > > > now linked libudev.so.1.7.10 to libudev.so > > > > > > --> The path for 76-mm-fibocom-linux-apps-port-types.rules should > > > be /usr/lib/udev/rules.d. The content is as follows: > > > # do not edit this file, it will be overwritten on update > > > ACTION!="add|change|move|bind", > > > GOTO="mm_fibocom_linux_apps_port_types_end" > > > SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", > > > ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" > > > > > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", > > > ENV{ID_MM_PORT_IGNORE}="1" > > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > > ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", > > > ENV{ID_MM_PORT_IGNORE}="1" > > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > > ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" > > > ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", > > > ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" > > > > > > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8213", > > > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", > > > ENV{ID_MM_PORT_IGNORE}="1" > > > ATTRS{idVendor}=="413c", ATTRS{idProduct}=="8215", > > > ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", > > > ENV{ID_MM_PORT_IGNORE}="1" > > > > > > LABEL="mm_fibocom_linux_apps_port_types_end" > > > > > > --> There is an additional udev rule that I missed to copy: > > > /usr/lib/udev/rules.d/77-mm-fibocom.rules. Content as follows: > > > ACTION!="add|change|move|bind", GOTO="mm_fibocom_end" > > > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="14C3:4D75", > > > ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > > > ENV{SUBSYSTEM}=="pci", ENV{PCI_ID}=="8086:7560", > > > ATTR{power/wakeup}="disabled", GOTO="mm_fibocom_end" > > > > > > LABEL="mm_fibocom_end" > > > > > > --> ModemManager's ExecStart line in > > > /usr/lib/systemd/system/ModemManager.service is modified with a > > > switch: > > > ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume > > > > > > --> a dbus service file needs to be created as?/usr/share/dbus- > > > 1/system-services/com.fibocom.helper.service. > > > Contents: > > > [D-BUS Service] > > > Name=com.fibocom.helper > > > Exec=/bin/false > > > User=root > > > SystemdService=fibo_helper.service > > > > > > > > > And here's where it gets interesting: I am now able to > > > successfully connect to the LTE network and surf the internet > > > when manually running ModemManager. When trying to launch > > > ModemManager automatically on startup though, ModemManager seems > > > to fail creating a process group and can't access the cdc_mbim > > > port for some reason. Both logs attached as follows: > > > > > > --> Successful connection via manual ModemManager launch as root. > > > After about 10 minutes the modem resets but reconnects > > > immediately (visible at the end of the log). > > > localhost:~ # /usr/sbin/ModemManager --test-quick-suspend-resume > > > ModemManager[4324]: ModemManager (version 1.22.0) starting > > > in system bus... > > > ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI > > > capable > > > ModemManager[4324]: [device > > > /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem > > > with plugin 'dell' and '3' ports > > > ModemManager[4324]: [base-manager] modem for device > > > '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully > > > created > > > ModemManager[4324]: [base-manager] couldn't check support > > > for device '/sys/devices/pci0000:00/0000:00:14.3': not supported > > > by any plugin > > > ModemManager[4324]: [base-manager] couldn't check support > > > for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported > > > by any plugin > > > ModemManager[4324]: [modem0/cdc-wdm0/mbim] MBIM device is > > > QMI capable > > > ModemManager[4324]: [modem0] state changed (unknown -> > > > disabled) > > > ModemManager[4324]: [modem0] state changed (disabled -> > > > enabling) > > > ModemManager[4324]: [modem0] simple connect started... > > > ModemManager[4324]: [modem0] simple connect state (4/10): > > > wait to get fully enabled > > > ModemManager[4324]: [modem0] Cannot power-up: hardware > > > radio switch is OFF > > > ModemManager[4324]: [modem0] Cannot power-up: hardware > > > radio switch is OFF > > > ModemManager[4324]: [modem0] couldn't enable interface: > > > 'Invalid transition' > > > ModemManager[4324]: [modem0] failed enabling modem: Invalid > > > transition > > > ModemManager[4324]: [modem0] state changed (enabling -> > > > disabled) > > > ModemManager[4324]: [modem0] failed waiting for enabled > > > state: disabled > > > ModemManager[4324]: [modem0] simple connect started... > > > ModemManager[4324]: [modem0] simple connect state (3/10): > > > enable > > > ModemManager[4324]: [modem0] state changed (disabled -> > > > enabling) > > > ModemManager[4324]: [modem0] simple connect started... > > > ModemManager[4324]: [modem0] simple connect state (4/10): > > > wait to get fully enabled > > > ModemManager[4324]: [modem0] couldn't reload extended > > > signal information: No signal details given > > > ModemManager[4324]: [modem0] power state updated: on > > > ModemManager[4324]: [modem0] 3GPP packet service state > > > changed (unknown -> attached) > > > ModemManager[4324]: [modem0] connection attempt cancelled > > > ModemManager[4324]: [modem0] state changed (enabling -> > > > enabled) > > > ModemManager[4324]: [modem0] simple connect state (5/10): > > > wait after enabled > > > ModemManager[4324]: [modem0] 3GPP registration state > > > changed (unknown -> registering) > > > ModemManager[4324]: [modem0] 3GPP registration state > > > changed (registering -> home) > > > ModemManager[4324]: [modem0] state changed (enabled -> > > > registered) > > > ModemManager[4324]: [modem0] simple connect state (6/10): > > > register > > > ModemManager[4324]: [modem0] simple connect state (7/10): > > > wait to get packet service state attached > > > ModemManager[4324]: [modem0] simple connect state (8/10): > > > bearer > > > ModemManager[4324]: [modem0] simple connect state (9/10): > > > connect > > > ModemManager[4324]: [modem0] state changed (registered -> > > > connecting) > > > ModemManager[4324]: [modem0] state changed (connecting -> > > > connected) > > > ModemManager[4324]: [modem0] simple connect state (10/10): > > > all done > > > ModemManager[4324]: [modem0/bearer1] reloading stats > > > failed: Transaction timed out > > > ModemManager[4324]: [modem0] port 'cdc-wdm0' no longer > > > controllable, reprobing > > > ModemManager[4324]: [base-manager] port cdc-wdm0 released > > > by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' > > > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must > > > be open to send commands > > > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must > > > be open to send commands > > > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must > > > be open to send commands > > > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must > > > be open to send commands > > > ModemManager[4324]: [/dev/cdc-wdm0] MBIM error: Device must > > > be open to send commands > > > ModemManager[4324]: [modem0/cdc-wdm0/mbim] Couldn't > > > properly close QMI device: Device must be open to send commands > > > ModemManager[4324]: [base-manager] port ttyUSB0 released by > > > device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' > > > ModemManager[4324]: [base-manager] port wwp0s20f0u1 > > > released by device '/sys/devices/pci0000:00/0000:00:14.0/usb4/4- > > > 1' > > > ModemManager[4324]: [cdc-wdm0/mbim] MBIM device is not QMI > > > capable > > > ModemManager[4324]: [device > > > /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating modem > > > with plugin 'dell' and '3' ports > > > ModemManager[4324]: [base-manager] modem for device > > > '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1' successfully > > > created > > > ModemManager[4324]: [modem1/cdc-wdm0/mbim] MBIM device is > > > QMI capable > > > > > > --> failed connection when launching ModemManager via systemd: > > > localhost:~ # systemctl start ModemManager > > > localhost:~ # systemctl status ModemManager > > > ? ModemManager.service - Modem Manager > > > ?????Loaded: loaded > > > (/usr/lib/systemd/system/ModemManager.service; enabled; preset: > > > enabled) > > > ?????Active: active (running) since Fri 2025-05-09 15:20:52 CEST; > > > 14s ago > > > ?Invocation: 1c378c21a150400d8bf3664cb2a40cd8 > > > ???Main PID: 14659 (ModemManager) > > > ??????Tasks: 6 (limit: 18296) > > > ????????CPU: 118ms > > > ?????CGroup: /system.slice/ModemManager.service > > > ???????????????14659 /usr/sbin/ModemManager --test-quick-suspend- > > > resume > > > ? > > > May 09 15:20:55 localhost.localdomain ModemManager[14739]: > > > couldn't setup proxy specific process group > > > May 09 15:20:55 localhost.localdomain ModemManager[14742]: > > > couldn't setup proxy specific process group > > > May 09 15:20:55 localhost.localdomain ModemManager[14745]: > > > couldn't setup proxy specific process group > > > May 09 15:20:55 localhost.localdomain ModemManager[14748]: > > > couldn't setup proxy specific process group > > > May 09 15:20:55 localhost.localdomain ModemManager[14751]: > > > couldn't setup proxy specific process group > > > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > > > [device /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1] creating > > > modem with plugin 'dell' and '3' ports > > > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > > > [plugin/dell] could not grab port cdc-wdm0: Cannot add port > > > 'usbmisc/cdc-wdm0', unhandled port type > > > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > > > [base-manager] couldn't create modem for device > > > '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1': Failed to find > > > primary AT port > > > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > > > [base-manager] couldn't check support for device > > > '/sys/devices/pci0000:00/0000:00:14.3': not supported by any > > > plugin > > > May 09 15:20:56 localhost.localdomain ModemManager[14659]: > > > [base-manager] couldn't check support for device > > > '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any > > > plugin > > > > > > I have no clue why ModemManager can't access the cdc-wdm0 port - > > > perhaps it isn't given enough privileges when launched via > > > systemd? The service file does however look like any other > > > ModemManager service I've ever encountered: > > > > > > --> Contents of /usr/lib/systemd/system/ModemManager.service: > > > [Unit] > > > Description=Modem Manager > > > After=polkit.service > > > Requires=polkit.service > > > ConditionVirtualization=!container > > > ? > > > [Service] > > > Type=dbus > > > BusName=org.freedesktop.ModemManager1 > > > ExecStart=/usr/sbin/ModemManager --test-quick-suspend-resume > > > StandardError=null > > > Restart=on-abort > > > CapabilityBoundingSet=CAP_SYS_ADMIN CAP_NET_ADMIN > > > ProtectSystem=true > > > ProtectHome=true > > > PrivateTmp=true > > > RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_QIPCRTR > > > NoNewPrivileges=true > > > User=root > > > ? > > > [Install] > > > WantedBy=multi-user.target > > > Alias=dbus-org.freedesktop.ModemManager1.service > > > > It may not even use AT commands; it might be running through an > > > > MBIM > > > > service instead. At the moment I'm not sure of any unlock > > > > procedure for > > > > the Fibcom Qualcomm-based devices other than their binary > > > > tools. > > > The ModemManager log indicates that MBIM / QMI are present but > > > that's also the only clue I have, sadly. > > > > > > Once again, sorry for maybe not following the most methodical > > > approach - feels like throwing things on a wall and hope that > > > something sticks. > > > Maybe someone could help with solving that systemd ModemManager > > > startup issue? I can also provide the Dell-specific firmware file > > > if someone would like to investigate further. > > > > > > Best, Jo. > > > > > > > ? From johanngerbhoff at tutamail.com Tue May 20 08:14:22 2025 From: johanngerbhoff at tutamail.com (johanngerbhoff at tutamail.com) Date: Tue, 20 May 2025 10:14:22 +0200 (CEST) Subject: Support for the Dell DW5825e / Fibocom FM101 (Qualcomm X12 chipset) - what am I missing? In-Reply-To: <1bf700a18732d90312f70e8ef8134f3de68b8eeb.camel@ioncontrol.co-OQcwaCz--3-9> References: <5cd827704b485009fb2de8b8542b2ed2913c2643.camel@ioncontrol.co-OPmmPHX----9> <1bf700a18732d90312f70e8ef8134f3de68b8eeb.camel@ioncontrol.co-OQcwaCz--3-9> Message-ID: > It might be worth submitting the policy to Fibocomm's github repo as a > PR too. > Good idea! Might create a github account for that. > I think that would be "audit2allow -a -R -m fibocomservices" and then > you'll end up with a ".te" (type enforcement) file that you can put in > the PR. It should look something like > https://github.com/stefanberger/swtpm/blob/master/src/selinux/swtpm.te > > I'm a bit hazy on process of getting the .te file into something that > can get shipped with a package; looking at some Fedora packages that > ship SELinux policy looks more complicated than I recall. > > But the ".te" file is the start; would you be able to post that output > here? > Sure, here are the contents of the .te file: policy_module(fibocomservices, 1.0) require { type modemmanager_t; type systemd_logind_t; type init_t; type user_home_t; class file { execute execute_no_trans open read }; class msgq { associate create enqueue read unix_read unix_write write }; class msg { receive send }; class process setpgid; } #============= init_t ============== allow init_t self:msg { receive send }; allow init_t self:msgq { associate create enqueue read unix_read unix_write write }; allow init_t self:process setpgid; allow init_t user_home_t:file { execute execute_no_trans open read }; unconfined_server_stream_connectto(init_t) #============= modemmanager_t ============== dmidecode_exec(modemmanager_t) unconfined_server_stream_connectto(modemmanager_t) #============= systemd_logind_t ============== systemd_dbus_chat_logind(systemd_logind_t) > > Good work; thanks for sticking with it! > > Dan > Thanks, of course!? Jo -------------- next part -------------- An HTML attachment was scrubbed... URL: