我的新 USB LTE 调制解调器有问题布罗维 E3372-325
我无法让它在 Linux 上运行。连接到 USB 端口时,调制解调器将自身标识为:
# dmesg
...
[ 6731.401923] usb 1-3.4.4: new high-speed USB device number 22 using xhci_hcd
[ 6731.503252] usb 1-3.4.4: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[ 6731.503261] usb 1-3.4.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 6731.503265] usb 1-3.4.4: Product: Mobile
[ 6731.503268] usb 1-3.4.4: Manufacturer: Mobile
[ 6731.503271] usb 1-3.4.4: SerialNumber: 123456789ABCD
[ 6731.505527] usb-storage 1-3.4.4:1.0: USB Mass Storage device detected
[ 6731.505830] scsi host1: usb-storage 1-3.4.4:1.0
[ 6732.534864] scsi 1:0:0:0: CD-ROM Linux File-Stor Gadget 0310 PQ: 0 ANSI: 2
[ 6732.535947] sr 1:0:0:0: Power-on or device reset occurred
[ 6732.536717] sr 1:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy
[ 6732.540429] sr 1:0:0:0: Attached scsi CD-ROM sr0
[ 6732.540983] sr 1:0:0:0: Attached scsi generic sg1 type 5
[ 6732.803382] ISO 9660 Extensions: RRIP_1991A
# lsusb -vvv
...
Bus 001 Device 028: ID 3566:2001 Mobile Mobile
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x3566
idProduct 0x2001
bcdDevice ff.ff
iManufacturer 2 Mobile
iProduct 3 Mobile
iSerial 4 123456789ABCD
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0020
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 1 Mass Storage
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x0016
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000000
(Missing must-be-set LPM bit!)
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x0004
Device can operate at High Speed (480Mbps)
bFunctionalitySupport 4
Lowest fully-functional device speed is at an unknown speed!
bU1DevExitLat 1 micro seconds
bU2DevExitLat 500 micro seconds
Device Status: 0x0000
(Bus Powered)
现在我将它们切换到“调制解调器” usb_modeswitch -v 3566 -p 2001 -X
::
# dmesg
...
[ 6971.308148] usb 1-3.4.4: USB disconnect, device number 22
[ 6971.544052] usb 1-3.4.4: new high-speed USB device number 23 using xhci_hcd
[ 6971.645772] usb 1-3.4.4: New USB device found, idVendor=3566, idProduct=2001, bcdDevice=ff.ff
[ 6971.645787] usb 1-3.4.4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 6971.645794] usb 1-3.4.4: Product: Mobile
[ 6971.645799] usb 1-3.4.4: Manufacturer: Mobile
[ 6971.645804] usb 1-3.4.4: SerialNumber: 123456789ABCD
[ 6971.647121] usb 1-3.4.4: Interface #0 referenced by multiple IADs
[ 6971.647643] usb 1-3.4.4: Interface #1 referenced by multiple IADs
[ 6971.678702] cdc_ncm 1-3.4.4:1.5: MAC-Address: c2:ab:11:ee:2f:15
[ 6971.679449] cdc_ncm 1-3.4.4:1.5 usb0: register 'cdc_ncm' at usb-0000:00:14.0-3.4.4, CDC NCM, c2:ab:11:ee:2f:15
[ 6971.743416] cdc_ncm 1-3.4.4:1.5 enxc2ab11ee2f15: renamed from usb0
# ip a s enxc2ab11ee2f15
14: enxc2ab11ee2f15: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether c2:ab:11:ee:2f:15 brd ff:ff:ff:ff:ff:ff
# mmcli -L
No modems were found
# lsusb -vvv
Bus 001 Device 029: ID 3566:2001 Mobile Mobile
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x3566
idProduct 0x2001
bcdDevice ff.ff
iManufacturer 2 Mobile
iProduct 3 Mobile
iSerial 4 123456789ABCD
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x00f9
bNumInterfaces 7
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 10 CDC Serial
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 8 CDC Abstract Control Model (ACM)
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 05 24 01 00 01
** UNRECOGNIZED: 04 24 02 02
** UNRECOGNIZED: 05 24 06 00 01
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x000a 1x 10 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 9 CDC ACM Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 11 Marvell DIAG
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 3
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 14 CDC Serial
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 12 CDC Abstract Control Model (ACM)
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 05 24 01 00 04
** UNRECOGNIZED: 04 24 02 02
** UNRECOGNIZED: 05 24 06 03 04
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x000a 1x 10 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 13 CDC ACM Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 13
bFunctionProtocol 0
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 5
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 13
bInterfaceProtocol 0
iInterface 0
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 5
bSlaveInterface 6
CDC Ethernet:
iMacAddress 17 FE1EA1E4D9D7
bmEthernetStatistics 0x00000000
wMaxSegmentSize 1514
wNumberMCFilters 0x0000
bNumberPowerFilters 0
CDC NCM:
bcdNcmVersion 1.00
bmNetworkCapabilities 0x01
packet filter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 6
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 6
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 0x0016
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000000
(Missing must-be-set LPM bit!)
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x0004
Device can operate at High Speed (480Mbps)
bFunctionalitySupport 4
Lowest fully-functional device speed is at an unknown speed!
bU1DevExitLat 1 micro seconds
bU2DevExitLat 500 micro seconds
Device Status: 0x0000
(Bus Powered)
但缺少/dev
接口(类似/dev/cdc*
/ /dev/ttyUSB*
)。
在具有内核 5.15 的 Ubuntu 22.04 和具有内核 5.19 的 Ubuntu 23.04(每日构建)上进行了测试。没有成功。
我尝试过dhclient enxc2ab11ee2f15
,ip link enxc2ab11ee2f15 up
-没有成功。对于qmicli
/mbimcli
缺少/dev/cdc*
接口。
在 Windows 10 PC 上,它会自动连接并从 DHCP 获取 IP。它使用 RNDIS 驱动程序。
你能帮我么?如何将调制解调器切换到正确的模式?
答案1
我找到了一个有效的解决方案:https://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=3043&p=20026#p20054
/etc/udev/rules.d/40-huawei.rules
:
# This is part of USB_ModeSwitch version 1.x.x
#
ACTION!="add", GOTO="modeswitch_rules_end"
SUBSYSTEM!="usb", GOTO="modeswitch_rules_end"
# All known install partitions are on interface 0
ATTRS{bInterfaceNumber}!="00", GOTO="modeswitch_rules_end"
# only storage class devices are handled; negative
# filtering here would exclude some quirky devices
ATTRS{bDeviceClass}=="e0", GOTO="modeswitch_rules_begin"
ATTRS{bInterfaceClass}=="e0", GOTO="modeswitch_rules_begin"
GOTO="modeswitch_rules_end"
LABEL="modeswitch_rules_begin"
# Huawei E3372-325
ATTRS{idVendor}=="3566", ATTRS{idProduct}=="2001", RUN+="/sbin/usb_modeswitch -v 3566 -p 2001 -W -R -w 400"
ATTRS{idVendor}=="3566", ATTRS{idProduct}=="2001", RUN+="/sbin/usb_modeswitch -v 3566 -p 2001 -W -R"
LABEL="modeswitch_rules_end"
答案2
同样的小玩意,同样的设置,同样的问题。
然而,今天我对此进行了更多的尝试,并且真正发挥了作用。基本上步骤是:
- Ubuntu 22.04 具有最新更新
- 一旦启动并在桌面模式下运行
- 插入棒子
- 将启动设置为大容量存储模式
- 安装USB串口
modprobe usbserial vendor=0x3566 product=0x2001
- 然后
sudo usb_modeswitch -v 3566 -p 2001 -X
- 查看底部
dmesg
,您应该看到它注册了 cdc_ncm 驱动程序。此外,调制解调器管理器现在应该能够看到该设备。此时您应该在设置窗口中看到移动网络选项。填写正确的值并连接(见下文)
当需要时我可以尝试从系统中获取更多信息。在现阶段,我正在寻求自动化,以便可以避免使用移动网络选项的手动步骤。
似乎通过这个过程它创建了 ppp0 链接。所以,有些生活与此但不是最佳设置恕我直言
答案3
就我而言,我需要做三件事才能使其发挥作用:
- 从 SIM 卡中删除 PIN
- 按照其中一条消息中的描述使用
modprobe option
和写入/sys/bus/usb-serial/drivers/option1/new_id
https://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=3043&p=20026#p20054 - 使用
wvdial
(来自https://blog.tanatos.org/posts/huawei_e3372h-325_brovi_with_linux_stickmode/)
我没有使用,udev
因为我的 Raspberry Pi 将始终插入加密狗。几分钟前我使它工作,脚本将得到改进,但到目前为止它可以工作,wvdial
如果死机它会重新启动:
#!/bin/bash
set -e
set -u
set -o pipefail
modprobe option
sleep 2
echo 3566 2001 ff > /sys/bus/usb-serial/drivers/option1/new_id
usb_modeswitch -v 3566 -p 2001 -W -R || true
sleep 2
usb_modeswitch -v 3566 -p 2001 -W -X || true
sleep 2
wvdial &
while /bin/true ; do
sleep 10
jobs %1 || { echo "wvdial is not running. exiting now." ; exit 1 ; }
echo "still running :)"
done
我不确定这些是否sleep
真的需要。
答案4
我花了一些时间试图让它发挥作用,但最终我成功了。这是我的配置:
Linux Mint 20.3,Brovi USB 记忆棒型号 E3372-325
- 编辑
modules.conf
:
然后在文件末尾添加:sudo nano /etc/modules-load.d/modules.conf
usbserial
- 安装
usb-modeswitch
sudo apt install usb-modeswitch
- 配置
usb-modeswitch
并确保取消注释:sudo nano /etc/usb_modeswitch.conf
然后DisableSwitching=0
并插入以下内容:sudo nano /etc/usb_modeswitch.d/3566:2001
TargetVendor=0x3566 TargetProduct=0x2001 WaitBefore=4 TargetClass=0xff HuaweiAltMode=1
- 编辑
usbserial.conf
并插入:sudo nano /etc/modprobe.d/usbserial.conf
options usbserial vendor=0x3566 product=0x2001
- 编辑 UDev 规则
并插入:sudo nano /etc/udev/rules.d/40-brovi_usb_lte.rules
ACTION!="add|remove", GOTO="modeswitch_rules_end" SUBSYSTEM!="usb", GOTO="modeswitch_rules_end" GOTO="modeswitch_rules_begin" LABEL="modeswitch_rules_begin" ACTION=="add", ATTRS{idVendor}=="3566", ATTRS{idProduct}=="2001", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%k'" ACTION=="remove", ATTRS{idVendor}=="3566", ATTRS{idProduct}=="2001", RUN+="/usr/sbin/modprobe -r option" LABEL="modeswitch_rules_end"
最后建议健康良好地重新启动。
一些解释:
所需的“串行”模块必须配置为在启动时加载,因为它是可选的,因此不在内核中编译。跑步
sudo modprobe serial
然后检查它是否加载:
lsmod | grep serial
最后运行:
sudo udevadm control --reload-rules && udevadm trigger
以加载最新的配置。
当插入棒时,模块“选项”应该自动加载。问题是,当棒被拔出时,它仍然处于加载状态,而当再次插入时,它就不再工作了。这就是我使用该指令的原因
ACTION=="remove", ATTRS{idVendor}=="3566", ATTRS{idProduct}=="2001", RUN+="/usr/sbin/modprobe -r option"
在 udev 规则中,以便每次拔出棒时从内核中删除该模块。
您应该使用 lsusb -t 检查每个接口是否已加载模块/驱动程序(如串行、选项等)。
您还应该提供特定于您的运营商的移动宽带网络连接。可以通过安装 ModemManager 并确保列出调制解调器 ZOWEE Technology 等来完成。
最后,我必须告诉大家的是,我拥有一台华为 E8372h-320,它可以完美地即插即用,无需任何配置,甚至可以作为使用固件 7.11 的 Mikrotik 路由器的 USB 备份路由。