#1 2009-11-22 17:31:41
[Lly] 鉅瞻(BandLuxe) C120 SniffUSB+USB_ModeSwitch
使用鉅瞻(BandLuxe) C120, 參考USB_ModeSwitch論壇的作法並無法順利切換(版本不同?), 所以只好用SniffUSB自己嗅出味道. 需將Pid由1000切換為1002, 才能使用modem功能.
機型: 華碩 WL-500gx
韌體: Lly 1.9.2.7-d-r740
3G modem: 鉅瞻 C120
1.) 未安裝程式前, 1a8d/1000
2.)安裝程式後, 1a8d/1002
3.) 查閱C:\Windows\UsbSnoop.log, 一一找出Message. 例如:
[180 ms] >>> URB 11 going down >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
PipeHandle = 845b93cc [endpoint 0x00000005]
TransferFlags = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000001f
TransferBuffer = 846741e8
TransferBufferMDL = 00000000
00000000: 55 53 42 43 60 e6 4f 84 24 00 00 00 80 00 06 12
00000010: 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00
UrbLink = 00000000
再將Message(5553424360e64f842400000080000612000000240000000000000000000000)經由USB_ModeSwitch傳入C120作切換, lsusb檢查是否切換為1002.
在WL-500gx操作
1.) 插入C120
$ dmesg
hub.c: new USB device 01:02.0-2, assigned address 2
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: BandLuxe Model: CDROM Rev: 1.01
Type: CD-ROM ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
$ lsusb
Bus 003 Device 001: ID 0000:0000
Bus 003 Device 002: ID 0409:0056 NEC Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 004: ID 1a8d:1000
2.) 傳入Message
$ usb_modeswitch -v 0x1a8d -p 0x1000 -M 55534243e0f6e4832400000080000612000000240000000000000000000000
Looking for default devices ...
Found default devices (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x05 (out) and 0x82 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached
Received inquiry data (detailed identification)
-------------------------
Vendor String: BandLuxe
Model String: CDROM
Revision String: 1.01
-------------------------
Error: could not get description string "manufacturer"
Error: could not get description string "product"
Error: could not get description string "serial number"
Device description data (identification)
-------------------------
Manufacturer:
Product:
Serial No.:
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x05 ...
OK, message successfully sent
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
$ lsusb
Bus 003 Device 001: ID 0000:0000
Bus 003 Device 002: ID 0409:0056 NEC Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 004: ID 1a8d:1000
沒有變化, 再努力...
3.) 再陸續傳入Message, 直到
$ lsusb
Bus 003 Device 001: ID 0000:0000
Bus 003 Device 002: ID 0409:0056 NEC Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 003: ID 1a8d:1002
$ dmesg
usbserial.c: Option GSM modem converter detected
usbserial.c: Option GSM modem converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usbserial.c: Option GSM modem converter detected
usbserial.c: Option GSM modem converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
$ ls -l /dev/usb/tts/
total 0
crw------- 1 admin root 188, 0 Jan 1 1970 0
crw------- 1 admin root 188, 1 Jan 1 1970 1
好了, 順利切換為modem了. 接下來可使用minicom測試AT command或設定3G撥號.
離線