From owner-freebsd-questions@FreeBSD.ORG Fri Sep 26 12:40:54 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCD4D16A4B3 for ; Fri, 26 Sep 2003 12:40:54 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE87E44025 for ; Fri, 26 Sep 2003 12:40:51 -0700 (PDT) (envelope-from freebsd-questions@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A2ySP-0007rs-00 for ; Fri, 26 Sep 2003 21:40:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A2xtG-0006ac-00 for ; Fri, 26 Sep 2003 21:04:30 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A2xtG-00074o-00 for ; Fri, 26 Sep 2003 21:04:30 +0200 From: Thierry Thomas Date: Fri, 26 Sep 2003 21:02:17 +0200 Organization: Kabbale Eros Lines: 24 Message-ID: <26696831.59rnEVNmBy@graf.pompo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org User-Agent: KNode/0.7.2 X-Face: (hRbQnK~Pt7$ct`!fupO(`y_WL4^-Iwn4@ly-.,[4xC4xc; y=\ipKMNm<1J>lv@PP~7Z<.t KjAnXLs: Sender: news Subject: How-to use a USB joypad? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: thierry@pompo.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 19:40:54 -0000 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.