EM120R-GL for Linux

Thanks @Christoph for your answer.

Here is an automated script which does what @Christoph 's script does but in a fully automated manner (the TODO section is automated!)

#! /bin/bash
# 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 -p ~/lenovo/snap
cd ~/lenovo
# Download the snap
snap download lenovo-wwan-dpr --edge
# Extract the snap files
sudo mount -t squashfs -o ro lenovo-wwan-dpr_13.snap /home/$(whoami)/lenovo/snap
# Download script by Joar Wandborg
wget https://gist.githubusercontent.com/joar/416f37fe81558f5be0d5131018eb7f2a/raw/b6a2a83620b044efc2d13aee86910743969218de/fcc-unlock.c
# automatically change the defines in fcc-unlock.c
sed 's@#define MBIM_DEVICE_PATH \(.*\)$@#define MBIM_DEVICE_PATH "/dev/wwan0mbim0"@g' -i fcc-unlock.c
sed "s@#define MBIM2SAR_SO_PATH \(.*\)\$@#define MBIM2SAR_SO_PATH \"/home/$(whoami)/lenovo/snap/usr/lib/mbim2sar.so\"@g" -i fcc-unlock.c
# Compile the script
gcc -o fcc_unlock_v2 fcc-unlock.c
# Run the script
sudo env VERBOSE=1 ./fcc_unlock_v2 
# Enable the modem (use mmcli --list-modems to get the modem index - in this case 0)
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