华为 E3372 Mode_Switch 问题

华为 E3372 Mode_Switch 问题

我正在尝试切换调制解调器的模式,以便我可以在 Raspberry Pi 上访问互联网。

运行 lsusb 时:

lsusb
Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 022: ID 0a05:7211 Unknown Manufacturer hub
Bus 001 Device 021: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)
Bus 001 Device 018: ID 0a05:7211 Unknown Manufacturer hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

mode_switch.config 如下所示

 # Configuration for the usb_modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
#
# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher
#
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"


# Disable automatic mode switching globally (e.g. to access the original
# install storage)

DisableSwitching=0

# Disable check for MBIM module presence and configuration globally (to aid
# special embedded environments)

DisableMBIMGlobal=0

# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>" and probably others

EnableLogging=0


# Optional increase of "delay_use" for the usb-storage driver; there are hints
# that a recent kernel default change to 1 sec. may lead to problems, particu-
# larly with USB 3.0 ports. Set this to at least 3 (seconds) in that case.
# Does nothing if the current system value is same or higher

SetStorageDelay=4
DefaultVendor=0x12d1
DefaultProduct=0x14fe

TargetVendor=  0x12d1
TargetProduct= 0x1506

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

之后我运行 sudo usb_modeswitch -s 15 -I -H -c /etc/usb_modeswitch.conf

Look for target devices ...
 No devices in target mode or class found
Look for default devices ...
   product ID matched
 Found devices in default mode (1)
Access device 021 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 8
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI_MOBILE
     Product: HUAWEI_MOBILE
  Serial No.: 0123456789ABCDEF
-------------------------
Warning: MessageContent/StandardEject ignored; can't combine with special mode
Send old Huawei control message ...

lsusb 的输出保持不变。

Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 022: ID 0a05:7211 Unknown Manufacturer hub
Bus 001 Device 021: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)
Bus 001 Device 018: ID 0a05:7211 Unknown Manufacturer hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

我正在使用外部供电 USB 集线器上的调制解调器。请帮忙

答案1

  1. 打开mode_switch.config并启用以下标志:

    DisableSwitching=0
    
  2. 运行此命令:

    sudo usb_modeswitch -v 12d1 -p 14fe -V 12d1 -P 1506 -M '55534243123456780000000000000011060000000000000000000000000000'
    

相关内容