Open tuxor1337 opened 3 months ago
Will do! Tomorrow will be a good time for testing.
Can you explain how to test it ? Ubuntu 24.04 LTS
I don't have Ubuntu. But here is how I test it under Fedora 40, and it should be the same under Ubuntu:
$ # for Fedora
$ sudo dnf builddep ModemManager libmbim
$
$ # for Ubuntu
$ sudo apt build-dep modemmanager libmbim
$ git clone https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git/
$ git clone https://gitlab.freedesktop.org/mobile-broadband/libmbim.git/
$ cd ModemManager
$ git fetch https://gitlab.freedesktop.org/tuxor1337/ModemManager.git/ port-xmm7360
$ git checkout -b 'ModemManager-port-xmm7360' FETCH_HEAD
$ cd ../libmbim
$ meson setup build --buildtype=debug --prefix=$PWD/dist/
$ ninja -C build install
$ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/dist/lib64/pkgconfig" $ export CFLAGS="-I$PWD/dist/include/libmbim-glib" $ export LDFLAGS="-L$PWD/dist/lib64"
$ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/dist/lib/x86_64-linux-gnu/pkgconfig" $ export CFLAGS="-I$PWD/dist/include/libmbim-glib" $ export LDFLAGS="-L$PWD/dist/lib/x86_64-linux-gnu"
4. Configure and compile ModemManager:
$ cd ../ModemManager $ meson setup build --buildtype=debug --prefix=$PWD/dist/ --sysconfdir=$PWD/dist/etc -Dudevdir=$PWD/dist/lib/udev $ ninja -C build install
5. Stop and Disable ModemManager with the following commands:
$ sudo systemctl stop ModemManager.service $ sudo systemctl disable ModemManager.service
6. Make sure the `iosm` kernel module is loaded. NOTE: You do not need any of the stuff from this GitHub repository. You don't need the xmm7360-pci kernel module, or the Python scripts.
$ sudo modprobe iosm
7. Run ModemManager in debug mode:
$ sudo ./build/src/ModemManager --debug
8. Set up a broadband connection with NetworkManager. Disable Wifi (and LAN) check whether you are connected to the internet with your broadband modem, e.g. by opening some websites.
9. If it doesn't work for you, make sure to give it another try after a fresh reboot of your computer because your previous setup might have screwed up your modem device.
Go to https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1200 and report about your experiences. Note that some things are known not to work. See the first post of the merge request for more information about what is and is not expected to work.
Will do! Tomorrow will be a good time for testing.
Done, works nicely!
$ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/dist/lib64/pkgconfig"
Note (to testers): check the path - it may be slightly different. My build (of libmbim
) created ./dist/lib/
(not ./dist/lib64/
)
Super! It's Wroks!
$ uname -a Linux x280 6.8.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:25:01 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux $ sudo dmidecode | grep -A 3 "System Information" System Information Manufacturer: LENOVO Product Name: 20KES0PC00 Version: ThinkPad X280
I would like to share my situation, unfortunately I can't get it to work though. I'm working on a X1 Carbon Gen 6, Ubuntu 24.04, all firmware / Bios updated. The Fibocom L850-GL works under Windows 11 without issue. After a clean reboot the Modem is in a 'failed' state with failed-reason "sim-missing". After installing the patched ModemManager (which appears to work well) I'm no longer getting any Modem in ModemManager. The debug output is this:
ModemManager[6306]: <msg> [1721982321.580557] [device /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0] creating modem with plugin 'Intel' and '4' ports
ModemManager[6306]: <dbg> [1721982321.580622] [plugin/intel] (intel) Intel XMM7360 in RPC mode found...
ModemManager[6306]: <dbg> [1721982321.584788] [modem0] port 'wwan/wwan0xmmrpc0' grabbed
ModemManager[6306]: <wrn> [1721982321.584879] [plugin/intel] could not grab port wwan0at1: Cannot add port 'wwan/wwan0at1', unhandled port type
ModemManager[6306]: <wrn> [1721982321.584986] [plugin/intel] could not grab port wwan0at0: Cannot add port 'wwan/wwan0at0', unhandled port type
ModemManager[6306]: <dbg> [1721982321.585149] [modem0] port 'net/wwan0' grabbed
ModemManager[6306]: <dbg> [1721982321.585249] [modem0] cleaning up port 'wwan/wwan0xmmrpc0'...
ModemManager[6306]: <dbg> [1721982321.585294] [modem0] cleaning up port 'net/wwan0'...
ModemManager[6306]: <dbg> [1721982321.585362] [modem0] completely disposed
ModemManager[6306]: <wrn> [1721982321.585407] [base-manager] couldn't create modem for device '/sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0': Failed to find primary AT port
ModemManager[6306]: <dbg> [1721982321.585443] [device /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0] port probe list reset...
ModemManager[6306]: <dbg> [1721982321.585509] [wwan0at0/at] device open count is 0 (close)
ModemManager[6306]: <dbg> [1721982321.585542] [wwan0at0/at] closing serial port...
ModemManager[6306]: <dbg> [1721982321.591878] [wwan0at0/at] serial port closed
ModemManager[6306]: <dbg> [1721982321.592116] [wwan0at0/at] forced to close port
I'm happy to take any pointers / or to try additional steps if I can help this effort. Kind regards, Stefan
Most likely, your modem device is in a frozen state. Make sure to completely disable any older version of ModemManager that you might have on your system. For example systemctl disable ModemManager.service
. An older version of ModemManager will try to interact with the modem device and might put it into a dead frozen state. Make sure to not only reboot the computer, but really shut down and boot again (cold boot), before trying to use the new version of ModemManager.
Missing step for ubuntu 24.04:
sudo apt install libglib2.0-dev libgirepository1.0-dev help2man meson build-essential libdbus-glib-1-dev libgudev-1.0-dev libsystemd-dev libpolkit-gobject-1-dev libqmi-glib-dev gettext xsltproc
Ubuntu 24.04.1 LTS Tested works well, but it was required shutdown laptop after disable service not sure why, without shutdown did not work, but after shutdown and run again it work well now.
uname -a
Linux nout 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 20:41:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Device:
System Information
Manufacturer: LENOVO
Product Name: 20U90006RT
Version: ThinkPad X1 Carbon Gen 8
sudo modprobe iosm return empty response
Based on the Python scripts in this repo, I created a merge request to add support for the XMM7360 in RPC mode to ModemManager: !1200 If anyone here has capabilities to test my implementation on their setup, please do and report about your experience in the MR. Thanks in advance!