How to Read Data from a Mass Storage USB Device in .NET?

116 Views Asked by At

I'm trying to receive data (in .NET) from a pH probe. When you press a button on the device, it sends the reading to the PC via USB. I'm having trouble figuring out how to receive this data.

I've tried out various USB libraries (e.g. Florian Leitner-Fischer's USB driver) that have receive data events, but none of them are even able to detect my device. They all require the product and vendor ID of the device in order to connect to it, which I've found in the hardware properties. I've also used USBDeview (software that lists all connected USB devices and their details) to confirm them:

pH Probe USB Details

enter image description here

Here is my Leitner-Fischer code, which is supposed to list every device with the specified vendor ID:

Dim usb As USBHIDDRIVER.USBInterface = New USBInterface("vid_1670")
Dim list As [String]() = usb.getDeviceList()

When I try it with the vids of my other USB devices, it returns the list of present devices. When I try it with the vid of the mass storage device, nothing is returned. The same thing happens with the code other libraries I've tried, such as LibUSBDotNet.

It is the only device out of all of my connected USB devices listed as mass storage. Am I taking the incorrect approach here because it is a mass storage device unlike the others, or is it more likely that the vendor and product IDs have been spoofed so that developers are prevented from doing this sort of thing?

0

There are 0 best solutions below