T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 9 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs= 3 P: Vendor=12d1 ProdID=15c1 Rev=01.02 S: Manufacturer=Huawei Technologies Co., Ltd. S: Product=HUAWEI Mobile S: SerialNumber=0123456789ABCDEF C: #Ifs= 0 Cfg#= 0 Atr= MxPwr= cat: '/sys/bus/usb/devices/usb1/1-2/1-*:?.*/bInterfaceNumber': No such file or directory cat: '/sys/bus/usb/devices/usb1/1-2/1-*:?.*/bAlternateSetting': No such file or directory cat: '/sys/bus/usb/devices/usb1/1-2/1-*:?.*/bNumEndpoints': No such file or directory cat: '/sys/bus/usb/devices/usb1/1-2/1-*:?.*/bInterfaceClass': No such file or directory cat: '/sys/bus/usb/devices/usb1/1-2/1-*:?.*/bInterfaceSubClass': No such file or directory cat: '/sys/bus/usb/devices/usb1/1-2/1-*:?.*/bInterfaceProtocol': No such file or directory /usr/bin/usb-devices: line 79: printf: (none): invalid number I: If#=0x Alt= 0 #EPs= 0 Cls=() Sub= Prot= Driver=(none)
diff --git a/40-usb_modeswitch.rules b/40-usb_modeswitch.rules index dae3e3a..16f404b 100644 --- a/40-usb_modeswitch.rules +++ b/40-usb_modeswitch.rules @@ -3,13 +3,13 @@ # Works with usb_modeswitch versions >= 2.4.0. Slash before %k parameter # is for compatibility only. Versions >= 2.5.0 don't need it. # -ACTION!="add|change", GOTO="modeswitch_rules_end" +ACTION!="add", GOTO="modeswitch_rules_end"
# Adds a symlink "gsmmodem[n]" to the lowest ttyUSB port with interrupt # transfer; checked against a list of known modems, or else no action KERNEL=="ttyUSB*", ATTRS{bNumConfigurations}=="*", PROGRAM="usb_modeswitch --symlink-name %p %s{idVendor} %s{idProduct} %E{PRODUCT}", SYMLINK+="%c"
# Generic entry for most Huawei devices, excluding Android phones ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'" -- 2.35.2
看着虽长,实则只修改了两处。打补丁后,执行以下命令使修改生效。
1 2
sudo udevadm control --reload-rules sudo udevadm trigger
模块工作模式
默认情况下,ME909S-821工作在 模式3:
1 2 3 4 5 6 7 8 9 10 11
$ sudo usb_modeswitch -v 0x12d1 -p 0x15c1
Look for default devices ... Found devices in default mode (1) Access device 008 on bus 001 Get the current device configuration ... Current configuration number is 3 Use interface number 0 with class 2 Warning: no switching method given. See documentation -> Run lsusb to note any changes. Bye!
Look for default devices ... found USB ID 8087:8001 found USB ID 1d6b:0002 found USB ID 1d6b:0003 found USB ID 12d1:15c1 vendor ID matched product ID matched found USB ID 24ae:4005 found USB ID 03f0:1f4a found USB ID 1d6b:0002 Found devices in default mode (1) Access device 005 on bus 001 Get the current device configuration ... Current configuration number is 3 Use interface number 0 with class 2
USB description data (for identification) ------------------------- Manufacturer: Huawei Technologies Co., Ltd. Product: HUAWEI Mobile V7R11 Serial No.: 0123456789ABCDEF ------------------------- Change configuration to 2 ... Looking for active drivers ... OK, driver detached Configuration was reset OK, configuration set Get the current device configuration ... The configuration was set successfully -> Run lsusb to note any changes. Bye!