Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Sep 2003 21:02:17 +0200
From:      Thierry Thomas <tthomas@mail.dotcom.fr>
To:        freebsd-questions@freebsd.org
Subject:   How-to use a USB joypad?
Message-ID:  <26696831.59rnEVNmBy@graf.pompo.net>

next in thread | raw e-mail | index | archive | help
Hello,

I have got a USB joypad, and it is sensed by the system (either 4.9 or
5.1):

uhid0: Microsoft Microsoft SideWinder Plug & Play Game Pad, rev
1.00/1.01, addr 2, iclass 3/0

I have got a new device /dev/uhid0 and kldloaded joy.ko.

When I run

perl -e 'open(JOY,"/dev/uhid0")||die;while(1)
{sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\n";sleep(1);}'

(adapted from `man 4 joy'), it returns a list of numbers for each action
on the pad, but nothing usable.

I've tried to link /dev/joy0 -> /dev/uhid0, but without success with
several games.

What am I missing?
-- 
Th. Thomas.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?26696831.59rnEVNmBy>