Recent Posts

Pages: 1 ... 5 6 [7] 8 9 10
61
USB / Re: Windows & USB, problems & two utilities
« Last post by Jolly on August 08, 2022, 06:34:37 pm »
I use a batch script with enumusb frequently - for example:
c:\UsbTools\enumusb.exe /v046D /pC539 /f"Logitech Wireless Receiver"

It works great to set the FriendlyName registry key for USB devices, but won't set it for HID devices. 

I'm wondering about the potential to upgrade the enumusb.exe utility to also set the reg key for HID entries:
For example:
 
In this example, enumusb sets the friendly name for the USB devices - so they show up with the appropriate name, but not the HID entries.  If I manually create the FriendlyName key for the HID device it does work. 

I can probably hex edit the utility or write a script myself, but figured id post here first.

62
USB / Re: Windows & USB, problems & two utilities
« Last post by Renate on July 19, 2022, 11:55:53 am »
One slight potential improvement - generalize it to add the FriendlyName for HID devices as well. 

Also I'm not quite sure the difference between the FriendlyName setting and the CustomName (that USBDeviceTree seems to use to name devices)
Quite often the Product strings out of a USB device are not very helpful.
Windows has the Friendly names which are writeable.
For some reasons these names get cleared sometimes, also, USB devices without a Serial string will not be recognized when the specific USB port changes.
That's one use for the EnumUsb.exe utility:
Code: [Select]
C:\>enumusb /v1A40 /p0201 /f"StarTech 7 port hub Rev 2"Since this doesn't have a Serial string, it's helpful if you put a bunch of these commands in a batch file so that you can rerun it if ports get switched.
*Requires Windows Admin mode to set Friendly.
63
USB / Re: Windows and HID Device questions
« Last post by bpaddock on July 08, 2022, 08:16:20 am »
If you've not already found it HDIPAI from the libusb project will be helpful for you, for the PC end.

https://github.com/libusb/hidapi

64
USB / Re: Windows and HID Device questions
« Last post by jhinkle on July 07, 2022, 07:46:29 pm »
Thanks Jan.  All the microcontrollers I use have a USB cell onboard but I have never used it.  The FTDI prices are going up and availability going down.  Just from a knowledge base, I want to get a total USB communication going and understand the complete implementation.  I spent today converting the USB device from HID to CDC.  I just need to test enumeration and host communication. 

I a very old fart and have never cared for C#.  All my embedded work is in assembler and C with the PC tools developed in C++.

Thanks for your reply.
65
USB / Re: Windows and HID Device questions
« Last post by Jan Axelson on July 07, 2022, 06:33:34 pm »
Only low speed is limited to 8 byte packets.

For a custom HID you would need to use API calls or a third party tool. For CDC you can use. NET SerialPort class or similar. If the ftdi interface works for your project, nothing wrong with continuing to use it.
66
USB / Windows and HID Device questions
« Last post by jhinkle on July 07, 2022, 08:57:44 am »
In the past, I used an FTDI device to provide a USB to controller (via a uart) to pass data back and forth.

I finally decided to understand USB and use the internal microcontroller's USB component.

After reading Jan's Second and Fifth USB editions, and others - I was left with the assumption that a HID class device (using my own defined report structures) would be easy.

Question 1:  If attempting to use a Windows provided HID driver - can the endpoint support 64 byte transfers or are they limited to 8?

I am developing on a STM32F103 device.  I have developed the device side code and it successfully enumerates.  I'm using a Beagle USB 12 tool to analyze the USB packets.

I wrote a test C++ application to communicate with the HID device but found windows failed to open the device.  Looking in "Device Manager", I found my HID device - it showed it enumerated properly but the third event stated "was not migrated due to partial or ambiguous match" - so I suspect a driver related issue.

Question 2:  I plan on having only my custom Win10 Application communicate with my device (not commercial - just a personal hobby project) - Which device class would be best/easiest to implement - HID - or a CDC (virtual com port)?

Depending on any reply to my questions above - I will ask more questions.  Thanks in advance for any reply/insight.

 
67
USB / Re: Windows & USB, problems & two utilities
« Last post by Jolly on June 28, 2022, 04:09:42 am »
This utility is great, thanks!
One slight potential improvement - generalize it to add the FriendlyName for HID devices as well. 


Also I'm not quite sure the difference between the FriendlyName setting and the CustomName (that USBDeviceTree seems to use to name devices)
68
USB / Re: Alternate Device for USB embedded development
« Last post by Jan Axelson on June 21, 2022, 12:49:10 pm »
Thank you, I'm glad you've found my books useful!
69
USB / Re: Alternate Device for USB embedded development
« Last post by b0bf0rt on June 16, 2022, 04:24:41 pm »
Thank you!  Your books are awesome!  :D
70
USB / Re: Alternate Device for USB embedded development
« Last post by Jan Axelson on June 15, 2022, 03:54:14 pm »
Yes, a Raspberry Pi can function as a USB host. My USB Embedded Hosts book will help you understand the host function. The Raspberry Pi community and possibly other books can help with the Pi-specific things.
Pages: 1 ... 5 6 [7] 8 9 10