移动宽带无法与 Ubuntu 13.10 上的 Thinkpad T440p 配合使用

移动宽带无法与 Ubuntu 13.10 上的 Thinkpad T440p 配合使用

我有一台新的联想 T440p,内置移动宽带,联想 N5321gw(我猜它是重新命名的爱立信 H5321gw)。

Ubuntu 可以正常检测到它,我可以对其进行配置并提供 PIN 码。但是,只要我按下“连接”,它就会尝试连接,然后失败,日志中显示以下内容:

Jan 21 19:13:36 maximus kernel: [   54.432298] usb 3-10: new high-speed USB device number 8 using xhci_hcd
Jan 21 19:13:36 maximus kernel: [   54.449019] usb 3-10: New USB device found, idVendor=0bdb, idProduct=193f
Jan 21 19:13:36 maximus kernel: [   54.449022] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Jan 21 19:13:36 maximus kernel: [   54.449024] usb 3-10: Product: N5321 gw
Jan 21 19:13:36 maximus kernel: [   54.449025] usb 3-10: Manufacturer: Lenovo
Jan 21 19:13:36 maximus kernel: [   54.449027] usb 3-10: SerialNumber: 44********
Jan 21 19:13:36 maximus pppd[2782]: Exit.

--- Pressing connect here ---

Jan 21 19:14:26 maximus kernel: [  104.463741] usbhid 3-10:1.0: can't add hid device: -110
Jan 21 19:14:26 maximus kernel: [  104.463772] usbhid: probe of 3-10:1.0 failed with error -110
Jan 21 19:14:26 maximus kernel: [  104.463895] usb 3-10: USB disconnect, device number 8
Jan 21 19:14:26 maximus kernel: [  104.703794] usb 3-10: new high-speed USB device number 9 using xhci_hcd
Jan 21 19:14:26 maximus kernel: [  104.722786] usb 3-10: New USB device found, idVendor=0bdb, idProduct=193e
Jan 21 19:14:26 maximus kernel: [  104.722800] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 21 19:14:26 maximus kernel: [  104.722808] usb 3-10: Product: N5321 gw
Jan 21 19:14:26 maximus kernel: [  104.722815] usb 3-10: Manufacturer: Lenovo
Jan 21 19:14:26 maximus kernel: [  104.722821] usb 3-10: SerialNumber: 44************
Jan 21 19:14:26 maximus kernel: [  104.756813] cdc_acm 3-10:1.1: ttyACM0: USB ACM device
Jan 21 19:14:26 maximus kernel: [  104.760797] cdc_acm 3-10:1.3: ttyACM1: USB ACM device
Jan 21 19:14:26 maximus kernel: [  104.768804] cdc_wdm 3-10:1.5: cdc-wdm1: USB WDM device
Jan 21 19:14:26 maximus kernel: [  104.796140] cdc_mbim 3-10:1.6: cdc-wdm2: USB WDM device
Jan 21 19:14:26 maximus kernel: [  104.796491] cdc_mbim 3-10:1.6 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-10, CDC MBIM, ce:bc:1e:4a:d7:9f
Jan 21 19:14:26 maximus kernel: [  104.797298] cdc_wdm 3-10:1.8: cdc-wdm3: USB WDM device
Jan 21 19:14:26 maximus kernel: [  104.797767] cdc_acm 3-10:1.9: ttyACM2: USB ACM device
Jan 21 19:14:26 maximus mtp-probe: checking bus 3, device 9: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-10"
Jan 21 19:14:26 maximus mtp-probe: bus: 3, device: 9 was not an MTP device
Jan 21 19:14:26 maximus NetworkManager[902]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.6/net/wwan0, iface: wwan0)
Jan 21 19:14:26 maximus NetworkManager[902]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.6/net/wwan0, iface: wwan0): no ifupdown configuration found.
Jan 21 19:14:26 maximus modem-manager[846]: <info>  (ttyACM1) opening serial port...
Jan 21 19:14:26 maximus modem-manager[846]: <info>  (ttyACM0) opening serial port...
Jan 21 19:14:26 maximus modem-manager[846]: <info>  (ttyACM2) opening serial port...
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (ttyACM1) closing serial port...
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (ttyACM1) serial port closed
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (Generic): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10 claimed port ttyACM1
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (ttyACM0) closing serial port...
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (ttyACM0) serial port closed
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (Generic): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10 claimed port ttyACM0
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (ttyACM2) closing serial port...
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (ttyACM2) serial port closed
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (Generic): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10 claimed port ttyACM2
Jan 21 19:14:30 maximus modem-manager[846]: <info>  (ttyACM0) opening serial port...
Jan 21 19:14:30 maximus NetworkManager[902]: <warn> (ttyACM0): failed to look up interface index
Jan 21 19:14:30 maximus NetworkManager[902]: <info> WWAN now disabled by management service
Jan 21 19:14:30 maximus NetworkManager[902]: <info> (ttyACM0): new GSM/UMTS device (driver: 'cdc_acm' ifindex: 0)
Jan 21 19:14:30 maximus NetworkManager[902]: <info> (ttyACM0): exported as /org/freedesktop/NetworkManager/Devices/3
Jan 21 19:14:30 maximus NetworkManager[902]: <info> (ttyACM0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Jan 21 19:14:30 maximus NetworkManager[902]: <info> (ttyACM0): deactivating device (reason 'managed') [2]
Jan 21 19:14:30 maximus NetworkManager[902]: <info> (ttyACM0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Jan 21 19:14:33 maximus modem-manager[846]: <info>  Modem /org/freedesktop/ModemManager/Modems/1: unlock no longer required
Jan 21 19:14:33 maximus modem-manager[846]: <info>  (ttyACM0) closing serial port...
Jan 21 19:14:33 maximus modem-manager[846]: <info>  (ttyACM0) serial port closed
Jan 21 19:14:56 maximus NetworkManager[902]: <info> Activation (ttyACM0) starting connection 'Telia Telia 3G 1'
Jan 21 19:14:56 maximus NetworkManager[902]: <info> (ttyACM0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jan 21 19:14:56 maximus NetworkManager[902]: <info> Activation (ttyACM0) Stage 1 of 5 (Device Prepare) scheduled...
Jan 21 19:14:56 maximus NetworkManager[902]: <info> Activation (ttyACM0) Stage 1 of 5 (Device Prepare) started...
Jan 21 19:14:56 maximus NetworkManager[902]: <info> Activation (ttyACM0) Stage 1 of 5 (Device Prepare) complete.
Jan 21 19:14:56 maximus modem-manager[846]: <info>  (ttyACM0) opening serial port...
Jan 21 19:14:56 maximus whoopsie[1132]: offline
Jan 21 19:14:56 maximus modem-manager[846]: <info>  Modem /org/freedesktop/ModemManager/Modems/1: state changed (disabled -> enabling)
Jan 21 19:14:56 maximus modem-manager[846]: <info>  (ttyACM1) opening serial port...
Jan 21 19:14:56 maximus modem-manager[846]: <info>  (ttyACM0): using PDU mode for SMS
Jan 21 19:14:56 maximus modem-manager[846]: <info>  Modem /org/freedesktop/ModemManager/Modems/1: state changed (enabling -> enabled)
Jan 21 19:14:56 maximus NetworkManager[902]: <info> WWAN now enabled by management service
Jan 21 19:14:56 maximus modem-manager[846]: <info>  Modem /org/freedesktop/ModemManager/Modems/1: state changed (enabled -> registered)
Jan 21 19:14:57 maximus modem-manager[846]: <info>  Modem /org/freedesktop/ModemManager/Modems/1: state changed (registered -> connecting)
Jan 21 19:14:58 maximus modem-manager[846]: <info>  Modem /org/freedesktop/ModemManager/Modems/1: state changed (connecting -> connected)
Jan 21 19:14:58 maximus NetworkManager[902]: <info> Activation (ttyACM0) Stage 2 of 5 (Device Configure) scheduled...
Jan 21 19:14:58 maximus NetworkManager[902]: <info> Activation (ttyACM0) Stage 2 of 5 (Device Configure) starting...
Jan 21 19:14:58 maximus NetworkManager[902]: <info> (ttyACM0): device state change: prepare -> config (reason 'none') [40 50 0]
Jan 21 19:14:58 maximus NetworkManager[902]: <info> Activation (ttyACM0) Stage 2 of 5 (Device Configure) successful.

此后我需要重新启动计算机才能再次启用它。

所以我下载了 modem-manager-gui 并查看了一下。它还可以检测移动宽带,我还可以启用它并扫描网络,它运行良好。它检测到正确的提供商。我还可以发送短信,而且我确实收到了。SIM 卡之前已在另一台计算机上成功使用过。

$> for n in `ls /sys/class/*/*{ACM,wdm}*/device/interface`;do echo $(echo $n|awk -F '/' '{print $5}') : $(cat $n);done
ttyACM0 : N5321 gw Mobile Broadband Modem
ttyACM1 : N5321 gw Mobile Broadband Data Modem
ttyACM2 : N5321 gw Mobile Broadband GPS Port
cdc-wdm1 : N5321 gw Mobile Broadband Device Management
cdc-wdm2 : N5321 gw Mobile Broadband USIM Port
cdc-wdm3 : Ericsson N5321 gw

有人知道什么问题吗?

/BR埃里克

答案1

这些模块在一个函数中同时实现了 NCM 和 MBIM 协议,这意味着内核必须代表用户做出选择,因为选择是在选择适当的驱动程序时做出的。这很不幸,因为内核既不了解用户空间应用程序支持,也不了解用户偏好。您的情况的问题是 MBIM 是由内核选择的,但您拥有的 ModemManager 版本尚不支持。

长期解决方案是使用具有适当 MBIM 支持的较新的 ModemManager。但在 Ubuntu 中提供此功能之前,您可以告诉内核做出不同的选择。可以通过执行以下操作暂时覆盖默认首选项

 echo N >/sys/module/cdc_ncm/parameters/prefer_mbim

或者通过创建例如永久改变/etc/modprobe.d/ncm.conf文件中有如下一行:

 options cdc_ncm prefer_mbim=N

请注意,此新首选项仅在下一次驱动程序探测时生效,因此您必须“拔下”调制解调器并重新插入才能使其生效。由于您的调制解调器是内置的,这可能意味着使用 rfkill。或者只需创建文件并卸载/重新加载驱动程序。或者如果您觉得最简单,请重新启动。请注意,上面给出的临时解决方案仅适用于基于 rfkill 的方法。

上述方法仅应视为临时解决方法。一旦 ModemManager 支持到位,您就有充分的理由希望将来将 MBIM 用于移动宽带设备。NCM 接口管理基于一些特定于供应商的 AT 命令。MBIM 提供了标准化且更加完整的 3G/LTE 调制解调器管理协议。

相关内容