Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I am assuming PID == productID. It is possible to open using the manuID productID, but there is no way to check if it is present or not, except for opening one device at a time using [open $1( and a number, then querying it. For example [open 0x046d 0xc01d( opens my mouse no matter what device number it is.
Do you have a use case where you would want to query and not just open?
And here's my use case that I'd like to solve somehow:
I have a Twin Playstation to USB-HID converted that I use to connect Playstation devices like a dancemat (e.g. for this, click VIDEO: http://www.discofon.de/discofon.html)
This converter provides two PSX-ports and shows up in the "print" list like this:
Device 4: 'bttv IR (card=24)' on '/dev/input/event4' Device 6: 'Twin USB Joystick' on '/dev/input/event6' Device 7: 'Twin USB Joystick' on '/dev/input/event7'
The Device numbers can change of course depending on the computer, connection order etc. Only one of the two Twin ports is actually connected to the dancemat.
I'd like to connect the right one. For this I think, I could open each of them, test if signals come in, and eventually select the connected one. I can do this by hand, but as this is for an installation, there may be operators who are not familiar with Pd so I'm looking for a way to automate the seleciton process a bit. Opening by Vendor or Product IDs would help,
Frank