此卡有两个 SIM 卡,SIM0(或任何数字)和 SIM1。SIM0 是 eSIM,是默认 SIM,SIM1 是插槽内的物理 SIM。您需要将 SIM0 切换到 SIM1。这个问题之前已经讨论过了。我没有使用过 WWAN 调制解调器,但调制解调器本身似乎被正确检测到,而且我已经插入了 SIM。仍然显示mmcli -m 1
“sim-missing”,网络管理器显示:
以前有人经历过类似的事情吗?
请参阅下面我的 Ubuntu 22.04 的一些日志:
$ uname -a
Linux luminamdy 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ mmcli --list-modems
/org/freedesktop/ModemManager1/Modem/1 [quectel] EM120R_GL
$ mmcli -m 1
-----------------------------------
General | path: /org/freedesktop/ModemManager1/Modem/1
| device id: 259e11b87a3e93...
-----------------------------------
Hardware | manufacturer: quectel
| model: EM120R_GL
| firmware revision: EM120RGLAPR02A07M4G
| carrier config: ROW_Commercial
| carrier config revision: 08010809
| h/w revision: EM120R_GL
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 015930004772779
-----------------------------------
System | device: /sys/devices/pci0000:00/0000:00:02.5/0000:04:00.0
| drivers: mhi-pci-generic
| plugin: quectel
| primary port: wwan0mbim0
| ports: wwan0 (net), wwan0at0 (at), wwan0mbim0 (mbim),
| wwan0qcdm0 (qcdm)
-----------------------------------
Status | state: failed
| failed reason: sim-missing
| power state: low
| signal quality: 0% (cached)
-----------------------------------
Modes | supported: allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 3g, 4g; preferred: 4g
| allowed: 3g, 4g; preferred: 3g
| current: allowed: any; preferred: none
-----------------------------------
Bands | supported: utran-1, utran-3, utran-4, utran-6, utran-5, utran-8,
| utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7,
| eutran-8, eutran-12, eutran-13, eutran-14, eutran-17, eutran-18,
| eutran-19, eutran-20, eutran-25, eutran-26, eutran-28, eutran-29,
| eutran-30, eutran-32, eutran-38, eutran-39, eutran-40, eutran-41,
| eutran-42, eutran-43, eutran-46, eutran-48, eutran-66, utran-19
-----------------------------------
IP | supported: ipv4, ipv6, ipv4v6
-----------------------------------
SIM | primary sim path: /org/freedesktop/ModemManager1/SIM/3
| sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/2
| slot 2: /org/freedesktop/ModemManager1/SIM/3 (active)
$ lsmod | grep wwan
mhi_wwan_mbim 16384 0
mhi_wwan_ctrl 20480 0
mhi 94208 3 mhi_wwan_mbim,mhi_wwan_ctrl,mhi_pci_generic
$ nmcli device
DEVICE TYPE STATE CONNECTION
...
enp2s0f0 ethernet unavailable --
wwan0mbim0 gsm unavailable --
lo loopback unmanaged --
...
# use the listed device after "ifname":
$ nmcli c add type gsm ifname wwan0mbim0 con-name remoteConnection apn your-provider.something.com
# connect:
$ nmcli con up remoteConnection
Error: Connection activation failed: No suitable device found for this connection (device enp2s0f0 not available because profile is not compatible with device (mismatching interface name)).
# delete:
$ nmcli con delete remoteConnection
更新:
此卡有两个 SIM 卡,SIM0(或任何数字)和 SIM1。SIM0 是 eSIM,是默认 SIM,SIM1 是插槽内的物理 SIM。您需要将 SIM0 切换到 SIM1。这个问题之前已经讨论过了。
我认为这样的意思是:
sudo mmcli -m 1 --set-primary-sim-slot=0
从https://forums.lenovo.com/t5/Fedora/Lenovo-X1-Gen-9-Fedora-and-Quectel-EM120R/mp/5081326?page=7
这有效并且现在显示了我的 SIM 卡,我必须输入 PIN 码但它仍然不允许我连接它...它在 dmesg 中给我以下输出:
$ sudo dmesg |grep mhi
[ 0.804861] mhi-pci-generic 0000:04:00.0: BAR 0: assigned [mem 0xfd500000-0xfd500fff 64bit]
[ 0.804879] mhi-pci-generic 0000:04:00.0: enabling device (0000 -> 0002)
[ 0.805174] mhi mhi0: Requested to power ON
[ 0.805796] mhi mhi0: Power on setup success
[ 2.824741] mhi mhi0: Wait for device to enter SBL or Mission mode
但mmcli -m 1
它仍然显示disabled
:
Status | unlock retries: sim-pin (3), sim-pin2 (3)
| state: disabled
| power state: low
| signal quality: 0% (cached)
答案1
对于那些拥有笔记本电脑的人来说Lenovo Carbon X1 gen9
。
如上所述这里,运行以下脚本将自动修复此问题
#! /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
# TODO: manually modify the define statements in fcc_unlock.c appropriately
#define MBIM_DEVICE_PATH "/dev/wwan0mbim0"
#define MBIM2SAR_SO_PATH "/home/[username]/lenovo/snap/usr/lib/mbim2sar.so"
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
mmcli -v --modem=`mmcli -L |head -n1 | awk '{print$1}'` -e
答案2
当前形势一片混乱。看看你自己:https://forums.lenovo.com/t5/Fedora/Lenovo-X1-Gen-9-Fedora-and-Quectel-EM120R/mp/5081326
第一步是从 eSIM 切换到真实 SIM:
sudo mmcli -m 1 --set-primary-sim-slot=0
但 SIM 卡仍然无法启用。根据规定,似乎必须通过某种魔法来解锁设备。我编译了此代码这是建议这里。
但在此之前我必须从 snap 中获取 mbim2sar.so 文件:
sudo snap download lenovo-wwan-dpr
sudo mount -t squashfs -o ro /var/lib/snapd/snaps/lenovo-wwan-dpr_13.snap /home/user/snap/lenovo-wwan-dpr/13/
现在我们可以使用:
#define MBIM2SAR_SO_PATH "/home/user/snap/lenovo-wwan-dpr/13/usr/lib/mbim2sar.so"
gcc fcc-unlock.c -o fcc-unlock
sudo env VERBOSE=1 ./fcc-unlock
一旦运行最后一个命令,我就能够通过 WWAN 调制解调器连接到我的提供商。
但它非常不稳定。例如,当我进行速度测试时,网络管理器中的 WWAN 设置在网络管理器中消失,并且连接断开(如论坛中所述)。要重新启用它,我必须执行以下操作:
systemctl restart ModemManager.service
sudo env VERBOSE=1 ./fcc-unlock
更新:似乎下面链接代码的作者已经做了类似的分步描述这里。
答案3
由于联想已经更新了官方快照,这里复杂的答案有点过时了。
安装 snap,重新启动,然后移动宽带(在设置中)应该就可以正常工作了(tm)。
sudo snap install lenovo-wwan-dpr