 |
|
|
 |
|
 |
I got it now! If you go to the device manager in control pael then got into the details tab of your device and select "Device Instance Path" from the list you get something like this.. "USB\VID_045E&PID_028E\038B48F" so VID is 45 and PID is 28
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
I downloaded the code. Program can detect my usb device according to vid and pid. However I can not receive data from my device . could you recommend me anything about this problem?
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |
|
|
 |
|
 |
I used this excellent component for detect USB Optocon Barcode Reader . But, the problem is when I typed 0x065a and 0x0001 to 2 textboxes and trace to CreateFile, Sniffer said that it has error 1008 ( ERROR_NO_TOKEN). My environment is Windows 7 ( had tried in XP but no luck ) I applied 64bit patch in threads before, and change Reserved field to UIntPtr too. The strange is if I use CreateFileW ( according to MS, if a path begin with "\\?\" so it should be read as Unicode ) and success get handle, but HID_PreparseData has error ... ?!?!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Uhm I found it. According to MS , if a device has detected as keyboard by windows using hid.dll, it won't be access in user mode. So the best way is hooking or write a keyboard filter for reading from them ...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
I've had reports that the device detection works in Win2K, but our USB card reader wouldn't read a card. Has anyone had any experience running this library under Win2K?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
instead of typing in the VID/PID of the usb. is it possible to write a program to auto detect the USB's VID/PID and display it in a GUI?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Anyone had a same problem with me? When I use USBlyzer(monitoring tool), my app just hang at
HIDDevice.cs protected void Write(OutputReport oOutRep) { try { here -->> m_oFile.Write(oOutRep.Buffer, 0, oOutRep.BufferLength); } catch { //Console.WriteLine(ex.ToString()); // The device was removed! throw new HIDDeviceException("Probbaly the device was removed"); } }
without using monitoring tools , it just works fine. when my app hangs, I cannot kill my app process. I have to press the power button for 5 seconds to shutdown.
is it something to do with bInterval value in endpoint?
Also is it possible to receive smaller data size then max packet size? If the usb device is composite device, how do I select second interface device?
USB is difficult.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi guys,
How can I get the friendly name of the HID device? For example, when I plug in a keyboard, I got the PID & VID,this good, but I need to get the friendly name (such as HID keyboard device etc), how can I do? thanks
tester and developer using c#,vb.net,VC++
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Friendly name is depend on "INF" file. Anybody knows where is "RTHID.DLL" official version?
http://sites.google.com/site/hidlibrary/
modified on Sunday, August 30, 2009 11:53 PM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I find my device and send some data and my data send me an other data. I'm sure because other program can see the data. but in my program receive data event doesn't fire.
there is a bug in dll. how can i fix it.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
i did every thing i overrided, set end points on pic and try another dll. and i see that .NET any of the dll is Good. Just send data but can't receive data. interrupt or bulk. AND anyone help 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I had the same issue. There is a small "feature" in the code where you can't receive data unless you add a handler for "OnSpecifiedDeviceArrived". I modified the code in UsbHidPort.cs on about line 224 from this:
if (OnSpecifiedDeviceArrived != null) { this.OnSpecifiedDeviceArrived(this, new EventArgs()); specified_device.DataRecieved += new DataRecievedEventHandler(OnDataRecieved); specified_device.DataSend += new DataSendEventHandler(OnDataSend); }
to this:
if (OnSpecifiedDeviceArrived != null) { this.OnSpecifiedDeviceArrived(this, new EventArgs()); } specified_device.DataRecieved += new DataRecievedEventHandler(OnDataRecieved); specified_device.DataSend += new DataSendEventHandler(OnDataSend);
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
 |
I try it but it doesn't work. I download again the library and I find this line in HIDDevice.cs m_hHandle = CreateFile(strPath, GENERIC_READ | GENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, IntPtr.Zero); And changed it;
m_hHandle = CreateFile(strPath, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_READ, IntPtr.Zero, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, IntPtr.Zero);
After that, I modified the code in UsbHidPort.cs on about line 224 from this:
if (OnSpecifiedDeviceArrived != null) { this.OnSpecifiedDeviceArrived(this, new EventArgs()); specified_device.DataRecieved += new DataRecievedEventHandler(OnDataRecieved); specified_device.DataSend += new DataSendEventHandler(OnDataSend); }
to this:
if (OnSpecifiedDeviceArrived != null) { this.OnSpecifiedDeviceArrived(this, new EventArgs()); //ABC - 9/3/2009 - Moved Recieved and Send outside of if so not dependent on OnSpecifiedDeviceArrived call } specified_device.DataRecieved += new DataRecievedEventHandler(OnDataRecieved); specified_device.DataSend += new DataSendEventHandler(OnDataSend);
but it doesn't work. it can find my usb hid mouse but it can't receive the data which come from mouse.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Also I have the same problem. I only updated the line 224 but nothing is happened. Program finds my device , sends data but there is no received data could you help me on this problem? or are there anything that I miss to add the given code ?
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
Please help me. are there anything that I miss to add the given code ?I can't send data and receive data from iPhone (I am working in the HID mode of iPhone.) I am sure to switch iPhone to HID mode. (iPhone: InputReportLength is 768byte, OutputReportLength is 256byte )
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |