1 Attachment(s)
How to get WMI USB Information
Hi,
I require to access Information(version) about Removeable Disk e. g. USB.
I want to access information(version) of USB Interface Version for selected logical drive (G) where USB is pluged in at USB port.
I want to check interface supported for that USB is having version greater than or equal to "USB 2.0 Enhanced".
I tried using WMI classes but from class hierarchy I am not able to get that Information.
Please see the Image file attached of WMI Browser where Red Mark indicates that accessing "USB 2.0 Enhanced" information from Logicakl Drive = F:.
How to access information from WMI hierarchy ?.
First I get input from user as Logical Disk Drive where USB is connected then I want to check that this USB drive is having version "USB 2.0 Enhanced" or not is the problem.
Is there different method to get "USB 2.0 Enhanced" information from Disk Drive.
Re: How to get WMI USB Information
Look at the Win32_USBHub class and check the USBVersion.
http://msdn.microsoft.com/library/de...n32_usbhub.asp
It's interesting though that I show a null value for this on my machine (idiot coders :D) Is that what you are talking about?
Other than that, I'd have to dig up some code from the DDK that samples the usb. Called usbview if I recall correctly.
Re: How to get WMI USB Information
Thanks,
I tried from Win32_USBHub class but it retrieves empty string.
So I found that path or hierarchy shown in image file attached with this thread. From that thread I can get USB interface information from Logical Disk drive letter. But I don;t know how to traverse in hierarchy of WMI.
Please see the file attached with this post.
Waiting for reply.
---- Rahul
1 Attachment(s)
Re: How to get WMI USB Information
Quote:
Originally Posted by RahulKateSys
Thanks,
I tried from Win32_USBHub class but it retrieves empty string.
So I found that path or hierarchy shown in image file attached with this thread. From that thread I can get USB interface information from Logical Disk drive letter. But I don;t know how to traverse in hierarchy of WMI.
Please see the file attached with this post.
Waiting for reply.
---- Rahul
Well, like I said, it looks like idiot developers that aren't populating the fields. At any rate, usbview shows the correct 2.0, so I'll post the source for that here. You can muck with it.
Quote:
Device Descriptor:
bcdUSB: 0x0200
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 (8)
idVendor: 0x045E (Microsoft Corporation)
idProduct: 0x009F
bcdDevice: 0x1111
iManufacturer: 0x01
iProduct: 0x02
iSerialNumber: 0x00
bNumConfigurations: 0x01
ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: Low
Device Address: 0x01
Open Pipes: 1
Endpoint Descriptor:
bEndpointAddress: 0x81
Transfer Type: Interrupt
wMaxPacketSize: 0x0006 (6)
bInterval: 0x0A
Quote:
Device Descriptor:
bcdUSB: 0x0200
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x40 (64)
idVendor: 0x054C (Sony Corporation)
idProduct: 0x0253
bcdDevice: 0x0100
iManufacturer: 0x01
iProduct: 0x02
iSerialNumber: 0x03
bNumConfigurations: 0x01
ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: Full
Device Address: 0x01
Open Pipes: 2
Endpoint Descriptor:
bEndpointAddress: 0x81
Transfer Type: Bulk
wMaxPacketSize: 0x0200 (512)
bInterval: 0x00
Endpoint Descriptor:
bEndpointAddress: 0x02
Transfer Type: Bulk
wMaxPacketSize: 0x0200 (512)
bInterval: 0x00
Re: How to get WMI USB Information
I have this code.
In that code method to access USB Version (BCD Code - 0x0200) is polling to every port by exploring Host Controller Devices and then Expolring Root Hub and then exploring Port then.
So its polling method that's why I choose through WMI.
I require different method to access USB Version of particular port.
Is there any different method?.
I have one problem with polling method as follows,
If there are four port
First port: USB connected for which USB 2.0 interface is connected.
Second Port: Audio Switching tool is running cand its connected through USB.
When this polling method executes if its poll to Second Port then my another utility Audio Switching tool is failed. Means driver call will interfere between communication.
Is WMI internally use the same(Polling) method or it access in a different way ?.
Please help me waiting for solutions
----- Rahul
Re: How to get WMI USB Information
Is there anybody who know abt core of USB Development ?
Please look to above problem?