EM120R-GL for Linux

Dear,

I bought the latest Lenovo X9, used Fedora on it, and only hardware not working out of the box is the Quectel modem.

I can see it under a lspci:
08:00.0 Unassigned class [ff00]: Device 1eac:1001

Seams driver is missing.

Would it be possible to get a working driver for Linux, please?

Thanks!

1 Like

Hi,
Thanks for your query in Quectel forums.
We cannot provide this linux driver directly to the end user, because there will be authentication problems when installing this driver. Lenovo will launch a customized ubuntu in the future. It is recommended that you obtain it from Lenovo.
Thanks.

This device is supported by the mhi_pci_generic driver in Linux v5.13 and later. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/bus/mhi/pci_generic.c?id=ac4bf60bbaa090d3abfc5a340bd01ae933fadacf

You’d want to run the mhi_net driver on top of that for MBIM support.

But there might be Lenovo platform specific issues, as @Kerr.Yang-Q indicates.

After you have the 5.13+ kernel installed you will see the device in network-manager. The main problem is that there is still an FCC lock on it which prevents you from enabling it in modem-manager. Hopefully it gets added to the https://snapcraft.io/lenovo-wwan-dpr snap. Until then I was able to get it working on a Lenovo X1 Yoga (Gen 6), Ubuntu 20.10, 5.13 kernel, Google Fi Data-Only SIM, and the following…

# Download network-manager, modem-manager, etc.,...
sudo apt update
sudo apt install network-manager network-manager-gnome modemmanager libqmi-utils gcc
# Reference: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/402#note_1064882
mkdir ~/Downloads/lenovo/snap
cd ~/Downloads/lenovo
# Download the snap
snap download lenovo-wwan-dpr --edge
# Extract the snap files
sudo mount -t squashfs -o ro lenovo-wwan-dpr_5.snap /home/$whoami/Downloads/lenovo/snap
# Download script by Joar Wandborg
wget https://gist.githubusercontent.com/joar/416f37fe81558f5be0d5131018eb7f2a/raw/b6a2a83620b044efc2d13aee86910743969218de/fcc-unlock.c
# TODO: manually modify the define statements in fcc_unlock.c appropriately
#define MBIM_DEVICE_PATH "/dev/wwan0p2MBIM"
#define MBIM2SAR_SO_PATH "/home/jonfen/Downloads/lenovo/snap/usr/lib/mbim2sar.so"
# Compile the script
gcc -o fcc_unlock_v2 fcc_unlock.c
# Run the script
sudo env VERBOSE=1 ./fcc_unlock_v2 
# Enable the modem
mmcli -v --modem=0 -e
# Setup the connection, for Google Fi just pick the default T-Mobile profile, ignore their h2g2 APN  
nm-connection-editor &
modem-manager-gui &
1 Like

That’s very interesting. I wonder if it would be possible to snoop those MBIM messages so that we could add proper open source support for them? This would allow automatic unlocking from ModemManager, similar to what we have for the Sierra Wireless FCC lock implementation.

Maybe add some debug buffer printk’s in drivers/net/wwan/wwan_core.c? If I read the code correctly, those messages go through wwan_port_fops_write() and wwan_port_fops_read(). Should be pretty simple fo add a couple of print_hex_dump() lines there.

EDIT: forget it. I see that Joar already included those dumps with the tool. Full discussion at https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/402