-- 我仍在努力获取此更新 --
我有一台由 O2 提供的 Alcatel X230D。它是 USB 3G 调制解调器。
它在 lsusb 中具有以下凭证:
Bus 003 Device 003: ID 1bbb:f017 T & A Mobile Phones
当跟踪 /var/log/syslog 时,我看到以下内容:
usb 3-2: new high-speed USB device number 5 using xhci_hcd
usb 3-2: New USB device found, idVendor=1bbb, idProduct=f017
usb 3-2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
usb 3-2: Product HSPA Data Card
usb 3-2: Manufacturer: USBModem
usb 3-2: SerialNumber: 1234567890ABCDEF
scsi9: usb-storage 3-2:1.0
mtp-probe: checking bus 3, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
mtp-probe: bus: 3, device: 5 was not an MTP device
kernel: [xxxxx.xxxxxx] scsi 9:0:0:0: Direct-Access ALCATEL Mass Storage 2.31 PQ: 0 ANSI: 2
kernel: [xxxxx.xxxxxx] scsi 9:0:0:1: CD-ROM ALCATEL Mass Storage 2.31 PQ: 0 ANSI: 2
kernel: [xxxxx.xxxxxx] sd 9:0:0:0: Attached scsi generic sg1 type 0
kernel: [xxxxx.xxxxxx] sd 9:0:0:0: [sdb] Attached SCSI removable disk
kernel: [xxxxx.xxxxxx] sr0: scsi-1 drive
kernel: [xxxxx.xxxxxx] sr 9:0:0:1: Attached scsi CD-ROM sr0
kernel: [xxxxx.xxxxxx] sr 9:0:0:1: Attached scsi generic sg2 type 5
usb_modeswitch: switching device 1bbb:f017 on 003/005
我尝试按照这个建议操作:https://askubuntu.com/a/131331/212什么也没发生。我尝试使用“Binary Free”和 AMD64 版本的脚本http://www.sakis3g.org,均标识为“HSPA 数据卡”,且均显示“连接失败”。
我已在 /etc/usb_modeswitch.conf 中启用了高级日志记录(EnableLogging=1)
相关细节(我相信)如下:
Extracting config 1bbb:f017 from collection /usb/share/usb_modeswitch/configPack.tar.gz
config: TargetVendor set to 1bbb
config: TargetProduct set to 0017
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
! matched, now switching
Command to be run:
/usr/sbin/usb_modeswitch -I -W -D -s 20 -c /run/usb_modeswitch/current_cfg -u 1 -v 1bbb -p f017 2>&1
<SNIP>
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.3 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
DefaultVendor= 0x1bbb
DefaultProduct= 0xf017
TargetVendor= 0x1bbb
TargetProduct= 0x0017
TargetClass= not set
TargetProductList=""
<SNIP>
Looking for target devices ...
searching devices, found USB ID 1bbb:f017
found matching vendor ID
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1bbb:f017
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 005 on bus 003
Skipping the check for the current configuration
using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
<SNIP>
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending
Trying to send message 1 to endpoint 0x01
OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
Checking for mode switch (max. 20 times, once per second) ...
Searching for target devices ...
searching devices, found USB ID 1bbb:f017
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1bbb:f017
found matching vendor ID
<SNIP>
Searching for target devices ...
searching devices, found USB ID 1bbb:f017
found matching vendor ID
No new devices in target mode or class found
Mode switch has failed. Bye.
我注意到了此条目:使用 xhci 的 ubuntu 12.04 无法识别阿尔卡特 X500 数据卡这表明 xHCI 可能存在问题,但是,与此人不同,我无法在我的 Acer V5-171 上的 BIOS 中禁用 xHCI。
所以......发布这篇文章后我做了一些挖掘,并找到了这个链接:http://www.draisberghof.de/usb_modeswitch/#contrib
我找到了一台合适的 Windows XP 机器,运行了该页面中提到的 USB Sniff 应用程序,并且(最终 - 我会在某个时候写博客)得到了这些数据:
[196 ms] >>> URB 5 going down >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 864fedf4 [endpoint 0x00000001]
TransferFlags = 00000002 (USBD_TRANSFER_DIRECTION_OUT, USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000001f
TransferBuffer = f7911184
TransferBufferMDL = 00000000
00000000: 55 53 42 43 78 56 34 12 01 00 00 00 80 00 06 06
00000010: f5 04 02 52 70 00 00 00 00 00 00 00 00 00 00
UrbLink = 00000000
根据此演练:http://blogger.ziesemer.com/2008/10/alltel-um175al-usb-evdo-ubuntu.html您从 PipeHandle 端点获取值,即 MessageEndpoint 值(0x01)加上 TransferBufferMDL 后的长值,即 MessageContent。
这给了我一个 usb_modeswitch.conf 条目:
DefaultVendor = 0x1bbb
DefaultProduct = 0xf017
MessageEndpoint = 0x01
MessageContent = 55534243785634120100000080000606f50402527000000000000000000000
但是,运行 sudo usb_modeswitch -c usb_modeswitch.conf 我得到
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 023 on bus 003 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
它就在那里...
好吧...事实证明,我可能有点操之过急了。
我解压了 /usr/share/usb_modeswitch/configPack.tar.gz 并使用新设置更新了 1bbb:f017。我拔下设备并重新插入,虽然花了一点时间才启动,但最终……它成功了!因此,我将向 USB_ModeSwitch 项目提交错误报告,以便将这条新消息添加到他们的发行版中。
将错误提交给 USB_ModeSwitch 后进行更新。结果发现上述所有操作都毫无意义。现有配置文件确实有效,但您需要手动运行几次。我只是在等待 USB_ModeSwitch 的反馈,以便获得一些修复此问题的想法!
答案1
只是为了澄清一下,看起来这个设备需要通过 usb_modeswitch 两次。详情请参阅此处。目前没有办法告诉 usb_modeswitch 运行两次,因此您需要手动执行第二次操作。