Still "Template"?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Maverick

Still "Template"?

Post by Maverick » Mon Jul 20, 2009 4:26 pm

Hello!

I'm experimenting with V-USB as replacement electronics for my Medion-SteeringWheel (which is a peace of crap and also not running on vista with original electronics.. Sorry, just had to tell that ;) ).
I've changed the "USB_CFG_VENDOR_NAME" and DEVICE_NAME in usbconfig to my own and adapted length constants, still when i connect the device it says "Template" in the game controllers list. What could I have missed?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Still "Template"?

Post by christian » Mon Jul 20, 2009 4:35 pm

Windows may have cached this info for your VID/PID pair. You can somehow flush that cache, but I'm not a Windows expert.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: Still "Template"?

Post by Grendel » Tue Jul 21, 2009 10:35 am

Yea, Windows will read the name only once -- the first time it sees a new device. It then stores it in the registry and will use that name afterwards. To fix it: While the device is connected, go to the device manager --> Human Interface Devices. Find the HID-Compliant game controller entry (check the VID/PID in the Properties/Details tab), right click the entry and Uninstall it. Disconnect and reconnect the device, it should now come up w/ the correct name.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Still "Template"?

Post by christian » Tue Jul 21, 2009 10:44 am

Is this new behavior in XP? If Windows caches the vendor and product string, our shared PID won't work. This used to work when I tested it...

Or do we still read the correct name if we use libusb? Or the method used to find HIDs?

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: Still "Template"?

Post by Grendel » Tue Jul 21, 2009 10:54 am

AFAIK Windows does that only for HID devices it takes control of (keyboards, mice & game controllers), vendor class devices are unaffected by that. Reading the name via libusb should always work since it bypasses most of the windows baggage. Reading the name via the HID api should work too, the buffering happens in the DI layer higher up.

There is a way around that BTW. Windows identifies a device by VID/PID and serial no. string if implemented -- the serial no. string would be a better "extended" device identfier than the name & vendor strings, at least for non-vendor class HID devices.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Still "Template"?

Post by christian » Tue Jul 21, 2009 11:09 am

Thanks for the info! The serial number is a good idea. We might spend some more PIDs for serial-number-based discrimination...

Post Reply