output for HID joystick

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

output for HID joystick

Post by ulao » Mon Jul 13, 2009 8:56 pm

I have a device that uses a few projects in one, I want my user to see what is in use. ( i.e Device1 attached or Device2 attached) I was thinking of just changing the USB name. But based on my previous post, I'm now of the opinion I can't change an USB name once its been added to the registry. If I'm wrong let me know please...

So anyone have a thought as to how I can show some additional info about my device like a string?

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

Re: output for HID joystick

Post by Grendel » Mon Jul 13, 2009 9:18 pm

Different devices should not only have different device names but also different device IDs.

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: output for HID joystick

Post by ulao » Tue Jul 14, 2009 5:52 am

Grendel, I must have failed to explain.

I have a usb device that supports multiple analog/digital devices. As for as the computer is concerned its just one usb device. So say I plug in my Dohicky1 to my usb device. I would like to see "Dohicky1" in the game controller list. Now say I unplug the usb and plug in my Dohicky2, then plug in the usb device again and I would like to see "Dohicky2" in the game controller list. Much like your side wider project. But If I plug in my Dohicky1 first and then switch to my Dohicky2 ( even though I unplug from the usb device first ) the registry will remember the name as Dohicky1 ( or what ever was first plugged in ) I can however delete the registry key and Dohicky2 will now be displayed.

So I guess what I'm wondering is can I display my attached device in the game controller some how. I would prefer this over 32 separate leds, or installing an LED panned. However if its not possible, so be it.

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

Re: output for HID joystick

Post by Grendel » Tue Jul 14, 2009 7:49 am

Well, I think that's sort of what I ment -- Windows will read a devices name and store it in the registry the first time it sees it on a specific port. If you plug another device in that has a different name but the same device ID Windows will not read the device name again, after reading the IDs it'll use the name it got and stored from the 1st one. One possible workaround would be to implement a serial no. (while keeping the device ID), Windows will use it to differentiate between devices in that case. Not sure if it would work w/ different device names tho, something to try. If you want to play it safe you'll need different device IDs for Dohicky1 & 2.

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: output for HID joystick

Post by ulao » Tue Jul 14, 2009 1:55 pm

Ah ok then very good.

Post Reply