Hi everyone,
I’ve spent some time to get the Dell DW5825e LTE modem working on Tumbleweed and have recently succeeded in doing so.
This is a Fibocom FM101R-GL card with a Qualcomm Snapdragon X12 chipset needing Fibocom’s applications for configuration and FCC unlock. (The fibo_ma application for the FCC unlock unfortunately is closed-source only, all the other applications are open-source).
So far, this modem has only been supported by Dell’s OEM version of Ubuntu 22.04, leading me to snoop around the Ubuntu image and replicate the setup for OpenSuse Tumbleweed. I’ve managed to build the required apps and get the modem to work consistently on TW but I was wondering if someone would be up for maintaining and packaging the required software. Unfortunately I myself have neither the required knowledge nor capacity to do so.
The build itself is also a little messy as the build process for the Fibocom apps requires libdbus-1.so.3 to be linked to libdus-1.so → does someone have a better idea to satisfy this requirement?
Setup and build instructions follow below:
Best,
Jo
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. The firmware flashed is persistent though, so I think a once successfully flashed modem should continue working successfully - even if it was flashed on Windows.
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?)
### 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
--> clean up and remove all Makefiles and headers from build dir.
--> create /opt/fibocom directory
--> copy fibo_config_service, fibo_flash_service and fibo_helper_service directories from build/application directory to /opt/fibocom/
--> copy fibo_ma directory to /opt/fibocom directory.
--> Create dbus config for fibocom helper: /usr/share/dbus-1/system.d/com.fibocom.helper.conf
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- This config allows anyone to control mcdm -->
<policy context="default">
<allow send_destination="com.fibocom.helper"/>
</policy>
<policy user="root">
<allow own="com.fibocom.helper"/>
</policy>
</busconfig>
--> 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 - fails when only using sudo)
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@sinaro.es>
#
# Fibocom FM101 FCC unlock mechanism
#
# run fcc-unlock binary
/opt/fibocom/fibo_ma_service/fibo_ma
exit $?
--> set script as executable
sudo chmod +x /usr/share/ModemManager/fcc-unlock.available.d/413c:8213
--> 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
--> if using SELinux: continue with SELinux Setup. Else, reboot, set your APN settings in NetworkManager and everything should work.
### 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.
### Directory structure after build ###
/opt/fibocom/
|--> fibo_config_service
|--> fibo_flash_service
|--> fibo_helper_service
|--> fibo_ma_service