tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Missile launchers vs uhid



On Tue, 29 Jan 2008, Matthias Drochner wrote:
[coming back to a thread of about a year ago because I just
got such a gadget between by fingers]

netbsd%precedence.co.uk@localhost said:
They both claim the device directly and try to detach the kernel uhid
driver before writing a very simple usb control message. This seems a
lot  simpler than messing around with libusbhid, but I can't see how
to achieve  it on NetBSD.

I've just tried -- the kernel uhid driver is absolutely not
in the way of supporting this thing. All the detach or
quirk stuff is unnecessary, it just works.

It wasn't necessarily that it was in the way (though other programs seemed to want to avoid using it), it was that its use (or rather libusbhid) was so poorly documented.

I'll append a minimal proof-of concept program, the magic constants
are taken from the pymissile script.
uhid1 is the one with interface 1, see the kernel messages:

uhidev1 at uhub3 port 1 configuration 1 interface 0
uhidev1: vendor 0x1130 Tenx Nonstandard Devic, rev 1.10/1.00, addr 2, iclass
3/0
uhid0 at uhidev1: input=0, output=64, feature=8
uhidev2 at uhub3 port 1 configuration 1 interface 1
uhidev2: vendor 0x1130 Tenx Nonstandard Devic, rev 1.10/1.00, addr 2, iclass
3/0
uhid1 at uhidev2: input=0, output=8, feature=0

Ah, that was the flaw in my understanding. Your concept program looks very similar to my initial attempts, but I was blindly using uhid0. It didn't work, so I looked for alternatives. D'oh!

--
Stephen




Home | Main Index | Thread Index | Old Index