Hi and thanks for the help.
Unfortunately, I have so little experience working with USB devices that I don't know how to answer your questions. I'll try my best.
-----------------
When I plug in the device, Device Manager reports TWO new items under Human Interface Device.
One is labeled USB Input Device, and in the driver details, it report
C:\Windows\system32\DRIVERS\hidclass.sys
C:\Windows\system32\DRIVERS\hidparse.sys
C:\Windows\system32\DRIVERS\hidusb.sys
The other one is labeled HID-complaint device, but has no driver details listed.
Under the heading Universal Serial Bus controllers, nothing new is added.
-----------------------
>>If the device is HID class, you need to use the HID driver and interface, not WinUSB.
Sorry, this means nothing to me. I thought WinUSB was the bottom part of the stack to any USB device, and that HID was an abstraction layered on top.
------------------
>>1. See the comment just above the definition:
>>' ClassGUID value from Windows-provided winusb.inf for use if you want to search by ClassGUID.
As I said in the post, that variable is not used anywhere. It is an unused local constant.
Below it are some commented-out "if(queryObj).." lines.
Am I suppose to replace the line "If queryObj("PNPDeviceID").ToString().Contains(deviceIdString) Then" with one of them?
If that is the case, there still isn't anything in that block of code that sets variable _deviceReady to true, which means none of the communication functions used later will proceed, since they all check that variable before attempting to send/receive.
Examining other parts of the code, I see that in the FindMyDevice() function, it calls myWinUSBCommunications.InitializeDevice which returns handles, device speed information and such.
Those calls are NOT in FindDeviceUsingWmi() function. Shouldn't they be, so that the functions that send data know those parameters?
------------------
>>If you are writing the application to talk to a device, the device vendor should provide this information, or you can retrieve it using a protocol analyzer on device attachment.
The company is not very forthcoming. As I mentioned, they required a signed NDA before I could get the doc. The doc has lots of details about the command codes to send and what is returned, but essentially nothing about how to set up communications to the device. Here is what they write:
"Host to Logger communications happens on multiple levels. Here is a host to logger overview of the levels that communications goes through so a Windows application can access a datafile or sensor readings.
Client Host Application
Hid User Mode Library (includes HidD_SetFeature(), ReadFile(), etc.)
USB Library (System, Kernel)
...<snip>...
For low speed U-Family Devices, commands are sent from the Host to the USB device via 8-byte HID Feature Reports. Command data and command confirmation is returned to the host from the USB dev9ice via one or more 8-byte HID Interrupt Input Reports. The number of return packets are specific to each command and the host should know to clear extra interrupt inputs packs for each command sent to avoid getting out of sync."
--------------------
Bottom line: Am I totally wasting my time trying to get the demo code to talk to this device? This is frustrating in the extreme. Doesn't help that I'm working 14 hours a day 7 days a week (not an exaggeration) on this project and this temperature logger is only a tiny part.
Well, anyway, thanks for the help so far.