问题描述
你好
首先感谢你看这个。
我想用USBClassLibrary告诉我系统USB端口连接的是什么。
一切看起来都不错,(我可以根据示例编译并运行代码,加载和运行类。
我的问题是,是否有可能以某种方式获取Device_ID / SerialNumber?
(通过DEVICE ID或SerialNumber我的意思是唯一的序列号一些USB设备有)
下面的例子取自微软的USB视图,我想从USBClassLibrary获得的项目是iSerialNumber的特性。
如果您需要更多信息,请随时给我发电子邮件:
Chuck
设备描述符:
bcdUSB:0x0200
bDeviceClass:0x00
bDeviceSubClass:0x00
bDeviceProtocol:0x00
bMaxPacketSize0:0x08(8)
idVendor:0x0403(Future Technology Devices International Limited)
idProduct:0x6001
bcdDevice: 0x0600
iManufacturer:0x01
0x0409:FTDI
iProduct:0x02
0x0409:FT232R USB UART
0x0409:FT232R USB UART
iSerialNumber:0x03
0x0409:A4011801
bNumConfigurations: 0x01
ConnectionStatus:DeviceConnected
当前配置值:0x01
设备总线速度:完整
设备地址:0x0C
打开管道:2
端点描述符:
bEndpointAddress:0x81 IN
转移类型:批量
wMaxPacketSize:0x0040(64)
bInterval:0x00
端点描述符:
bEndpointAddress:0x02 OUT
传输类型:批量
wMaxPacketSize:0x0040(64)
bInterval:0x00
配置描述符:
wTotalLength:0x0 020
bNumInterfaces:0x01
bConfigurationValue:0x01
iConfiguration:0x00
bmAttributes:0xA0(总线供电的远程唤醒)
MaxPower:0x2D(90 Ma)
接口描述符:
bInterfaceNumber:0x00
bAlternateSetting:0x00
bNumEndpoints:0x02
bInterfaceClass:0xFF
bInterfaceSubClass:0xFF
bInterfaceProtocol: 0xFF
iInterface:0x02
0x0409:FT232R USB UART
0x0409:FT232R USB UART
端点描述符:
bEndpointAddress:0x81 IN
传输类型:批量
wMaxPacketSize:0x0040(64)
bInterval:0x00
端点描述符:
bEndpointAddress:0x02 OUT
转移类型:批量
wMaxPacketSize:0x0040(64)
b间隔:0x00
Hello
First of all thanks for looking at this.
Im thinking of using USBClassLibrary to tell me what is connected on my systems USB ports.
All looks good, (I can compile and run the code, load and run the classes as per the example.
My question is, Is it possible to get the Device_ID / SerialNumber in some way?
(By DEVICE ID or SerialNumber I mean the unique serial number some USB devices have)
The example below is taken from Microsoft’s "USB View" and the item I would like to get from USBClassLibrary is the iSerialNumber properity.
If you need any more info please feel free to email me:
Chuck
Device Descriptor:
bcdUSB: 0x0200
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 (8)
idVendor: 0x0403 (Future Technology Devices International Limited)
idProduct: 0x6001
bcdDevice: 0x0600
iManufacturer: 0x01
0x0409: "FTDI"
iProduct: 0x02
0x0409: "FT232R USB UART"
0x0409: "FT232R USB UART"
iSerialNumber: 0x03
0x0409: "A4011801"
bNumConfigurations: 0x01
ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: Full
Device Address: 0x0C
Open Pipes: 2
Endpoint Descriptor:
bEndpointAddress: 0x81 IN
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00
Endpoint Descriptor:
bEndpointAddress: 0x02 OUT
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00
Configuration Descriptor:
wTotalLength: 0x0020
bNumInterfaces: 0x01
bConfigurationValue: 0x01
iConfiguration: 0x00
bmAttributes: 0xA0 (Bus Powered Remote Wakeup)
MaxPower: 0x2D (90 Ma)
Interface Descriptor:
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x02
bInterfaceClass: 0xFF
bInterfaceSubClass: 0xFF
bInterfaceProtocol: 0xFF
iInterface: 0x02
0x0409: "FT232R USB UART"
0x0409: "FT232R USB UART"
Endpoint Descriptor:
bEndpointAddress: 0x81 IN
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00
Endpoint Descriptor:
bEndpointAddress: 0x02 OUT
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00
推荐答案
这篇关于USBClassLibrary设备ID或序列号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!