數位天堂

Nokia:科技始終來自於人性; 拜耳:如果文明不能使我們更相愛,那科技便失去意義!
歡迎您的加入,讓我們一起討論科技與環保的整合應用...

您尚未登入。

#1 2009-11-22 17:31:41

hippo
天使
註冊日期: 2008-10-07
文章數: 1562
目前積分 :   20 

[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
https://digiland.tw/uploads/614_sniffusb_bandluxe_c120_1.gif
2.)安裝程式後, 1a8d/1002
https://digiland.tw/uploads/614_sniffusb_bandluxe_c120_2.gif
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撥號.




離線

 

#2 2009-12-15 12:49:57

trueblue
新生
註冊日期: 2009-05-30
文章數: 5
目前積分 :   

Re: [Lly] 鉅瞻(BandLuxe) C120 SniffUSB+USB_ModeSwitch

大大可以把所有抓到C120的MessageContent...po出來讓我試試看嗎????SniffUSB在windows7下使用會藍屏耶....



離線

 

#3 2009-12-15 21:33:30

hippo
天使
註冊日期: 2008-10-07
文章數: 1562
目前積分 :   20 

Re: [Lly] 鉅瞻(BandLuxe) C120 SniffUSB+USB_ModeSwitch

我之前紀錄的UsbSnoop.log檔案太大了, 也參雜了很多未必用的到的訊息. 建議您還是自己抓取紀錄後, 再進行測試.
或許您可先測試USB_ModeSwitch論壇所公佈的message, 如果不行, 再自己抓取紀錄來測試.
我沒Windows 7, SniffUSB我是在Windows XP下操作.


離線

 

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed