Recent Posts

Pages: 1 [2] 3 4 ... 10
11
USB / Re: Control transfer through Windows HID driver?
« Last post by Renate on March 20, 2020, 08:07:08 pm »
I guess that the long and short of it is that hidusb.sys does not allow custom control transfers.
Of course, you could make this a composite device with an interface bound to WinUSB, then you could WinUsb_ControlTransfer to the same darn control endpoint.

There are other limitations that don't make particular sense too.
Why can't hidusb.sys pass through IOCTL_HID_GET_REPORT_DESCRIPTOR?
You can trivially get the report descriptor in Linux with HIDIOCGRDESCSIZE/HIDIOCGRDESC.
12
USB / Re: Control transfer through Windows HID driver?
« Last post by Jan Axelson on March 18, 2020, 12:38:02 pm »
All data to and from HIDs is contained in defined reports.

To send a vendor-defined message to a device, define an Output or Feature report of the desired length and use  HidD_SetOutputReport or HidD_SetFeature to send it. The device must have firmware support to receive the report and take the desired action.
13
USB / Re: Control transfer through Windows HID driver?
« Last post by Renate on March 17, 2020, 07:48:26 pm »
Yes, those are control transfers, but they are not my control transfers.
How do I send {0x40, 0xb0, 0x0000, 0x0000, 0x0000}?
14
USB / Re: Control transfer through Windows HID driver?
« Last post by Jan Axelson on March 17, 2020, 06:19:50 pm »
With device firmware support, hosts can do control transfers with:

HidD_GetInputReport
HidD_SetOutputReport
HidD_GetFeature
HidD_SetFeature
15
USB / Control transfer through Windows HID driver?
« Last post by Renate on March 17, 2020, 10:14:25 am »
There are two generic built-in drivers in Windows, WinUSB and HID.
In WinUSB we have WinUsb_ControlTransfer to send control transfers.
For HID there does not seem to be any way to send a control transfer (from user space).
Ive looked at all the HidD_, HidP_ and even IOCTLs.
Considering that HidD_SetReport uses endpoint zero anyway (in the absence of an out endpoint), this seems like an omission.
Is there anything?
I've even tried WinUsb_Initialize on a HID handle.

The application is using a vendor control message to put a device into bootloader mode without using an out endpoint or even a report.

P.S. I did notice the undocumented DWORD WINAPI HidD_Hello(char *buf, DWORD size)
16
USB / Re: good board to get feet wet with USB HID
« Last post by Renate on March 06, 2020, 10:03:30 pm »
I've implemented a lot of HID devices using the Teensy 2.0 (ATMega32u4, 8 bit AVR).
For something with Full Speed USB 2.0 the throughput is plenty.
Ok, this device is getting long in the tooth, but they're still selling them.

If I wanted High Speed USB 2.0 I'd go to the newer Teensy 4.0 (iMXRT1062, 600 MHz Cortex-M).
But that's a lot more complicated and a lot more power consumption.
Ok, if you are using the manufacturer's libraries it's not any more complicated.

Realistically, your Teensy LC is a fine choice.
Still, sending an HID report 10 times a second makes me want to grab the simplest device.
17
USB / Re: Generic HID Tester VB.NET 2010
« Last post by ieee488 on February 19, 2020, 05:46:50 pm »
Device Not Found.


Edit
===
So, I think I misunderstood what I am suppose to do.

1. F5
2. Change the Vendor ID and Product ID text boxes.
then
3. Click on Find My Device

.
device is found
.
18
USB / Re: Generic HID Tester VB.NET 2010
« Last post by Jan Axelson on February 19, 2020, 05:34:31 pm »
Where is it failing?
19
USB / Generic HID Tester VB.NET 2010
« Last post by ieee488 on February 19, 2020, 05:20:03 pm »
I have the Teensy LC and its Vendor ID = 0x16C0 and Product ID = 0x0486

I have it connected to a PC running Windows 10 Pro v1909 64-bit.

On this PC, VB.NET 2010 Express is installed.

I opened Generic HID Tester  generic_hid_vb_50  and VB.NET 2010 did its upgrade.
No problem.

I changed the Vendor ID and Product ID text boxes to match the Teensy LC.

Click the Start Debugging arrow (F5).

Click the Find My Device button.

The program found three (3) devices and about a dozen or so system cannot find the path specified errors.

Any pointers on what I am doing wrong?

I am able to upload code to the Teensy so I know it is working.

20
USB / Re: good board to get feet wet with USB HID
« Last post by Jan Axelson on February 16, 2020, 11:14:13 am »
Right, you said that! I think it's a good choice. Good luck with it.
Pages: 1 [2] 3 4 ... 10