你好,我最近在做华为ET128的3G驱动,网上说第一次插进开发板时是被认作CD-ROM 所以就要转换成MODEOM模式 所以我移植了usblib usb_modeswitch工具,信息如下:
[root@296144646 /]# usb 1-1: new full speed USB device using s3c2410-ohci and address 4
lusb 1-1: New USB device found, idVendor=12d1, idProduct=1da1
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: HUAWEI Mobile System Solution
usb 1-1: Manufacturer: HUAWEI Mobile
usb 1-1: SerialNumber: 000000-00-000000
usb 1-1: configuration #2 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
[root@296144646 /]# usb 1-1: reset full speed USB device using s3c2410-ohci and address 4
scsi 1:0:0:0: CD-ROM HUAWEI Mobile CMCC CD 1.25 PQ: 0 ANSI: 0
sr0: scsi-1 drive
[root@296144646/]# lsusb
Bus 001 Device 004: ID 12d1:1da1 Huawei Technologies Co., Ltd.
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[root@EmbedSky /]# usb_modeswitch -W
Reading config file: /etc/usb_modeswitch.setup
* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.2alpha (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x1da1
TargetVendor= 0x12d1
TargetProduct= not set
TargetClass= not set
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00
InquireDevice enabled (default)
Success check enabled, max. wait time 20 seconds
System integration mode disabled
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
searching devices, found USB ID 0100:0201
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 0100:0201
No devices in default mode or class found. Nothing to do. Bye.
我就是想问下found USB ID 0100:0201这个ID是啥啊 我没有这个ID的USB设备啊 他读的啥啊 (我用usb_modeswitch.c是1.1.2版本的)
希望研究过和做过这方面东西的高手指点下
补充:我将3G网卡拿掉,没有硬件时,信息如下(还是有个ID):
[root@296144646/]# lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[root@296144646/]# usb_modeswitch -W
Reading config file: /etc/usb_modeswitch.setup
* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.2alpha (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x1da1
TargetVendor= 0x12d1
TargetProduct= not set
TargetClass= not set
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00
InquireDevice enabled (default)
Success check enabled, max. wait time 20 seconds
System integration mode disabled
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 001
Looking for target devices ...
searching devices, found USB ID 0206:0203
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 0206:0203
No devices in default mode or class found. Nothing to do. Bye.
(/etc/usb_modeswitch.setup内容如下:
DefaultVendor= 0x12d1
DefaultProduct= 0x1da1
TargetVendor= 0x12d1
#TargetProduct= 0x1001
#TargetClass= 0x01
# only for reference and 0.x versions
#MessageEndpoint=0x01
CheckSuccess=20
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
HuaweiMode=0
)
[ 此帖被296144646在2010-06-11 12:31重新编辑 ]