From owner-freebsd-usb@FreeBSD.ORG Mon Mar 15 17:44:50 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0192106566B for ; Mon, 15 Mar 2010 17:44:50 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from mail-ew0-f227.google.com (mail-ew0-f227.google.com [209.85.219.227]) by mx1.freebsd.org (Postfix) with ESMTP id 61BBE8FC16 for ; Mon, 15 Mar 2010 17:44:49 +0000 (UTC) Received: by ewy27 with SMTP id 27so2228637ewy.34 for ; Mon, 15 Mar 2010 10:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=pGPLCwkqs3AHFLkDdP/mt54GGi9n+70sWev868/sdaA=; b=AD72riQMoRStqTpK/IWCkNmPPR0bEvcQWSj74sMxvflOzgtcCrBqrtcPucD5S7ayGv Iwul/22d94+aaYYLgyVGedOqYIR6rQvM/6AA3lFxUm6aZErhMViBiXa0lFzY/nx/qqZn rhPOcpxGpqWaP8va65p3NOdcoOSWU4GQFlobM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=veqMHEewnUh4SrPTyVzCMcUlnuTe2Mzu5ZlFTfi31vcq48xydvwfYFK1NWhYSSjqPp X/lSNtsPnT4e99EosKLXg+7oaA+0YWtUk6FaCkxuiK5J3CElnyimlmVpnaJwUGZpDzi8 eN8DnlOUGUOluRZ+lC1wuJ5xBhQN/E1GC3INU= Received: by 10.213.96.212 with SMTP id i20mr1192178ebn.35.1268493102681; Sat, 13 Mar 2010 07:11:42 -0800 (PST) Received: from localhost (81-233-38-26-no36.tbcn.telia.com [81.233.38.26]) by mx.google.com with ESMTPS id 14sm1613511ewy.2.2010.03.13.07.11.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Mar 2010 07:11:41 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.71 (FreeBSD)) (envelope-from ) id 1NqT08-0000ir-5a; Sat, 13 Mar 2010 16:11:40 +0100 Received: (from kaiw@localhost) by localhost.my.domain (8.14.3/8.14.3/Submit) id o2DFBdO6002780; Sat, 13 Mar 2010 16:11:39 +0100 (CET) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaiw set sender to kaiwang27@gmail.com using -f Date: Sat, 13 Mar 2010 16:11:39 +0100 From: Kai Wang To: Alexander Best Message-ID: <20100313151139.GA2634@viskning> References: <201003131343.48106.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-usb@freebsd.org Subject: Re: PS3's Joystick on FreeBSD (can be possible?) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 17:44:51 -0000 On Sat, Mar 13, 2010 at 02:56:21PM +0100, Alexander Best wrote: > Hans Petter Selasky schrieb am 2010-03-13: > > On Saturday 13 March 2010 13:21:10 Paul B Mahol wrote: > > > On 3/13/10, Alexander Best wrote: > > > > Paul B Mahol schrieb am 2010-03-13: > > > >> On 3/13/10, Alexander Best wrote: > > > >> > i'm sorry to hijack this thread, but i've been having similar > > > >> > issues as > > > >> > Vinicius with his PS3 controller with my logitech cordless > > > >> > gamepad. > > > >> > this is > > > >> > the attach message: > > > > >> > ugen3.3: at usbus3 > > > >> > uhid0: > > >> > 1.10/2.00, > > > >> > addr > > > >> > 3> on usbus3 > > > > >> > the output of `usbhidctl -f /dev/uhid0 -r` is: > > > > >> > Report descriptor: > > > >> > Collection page=Generic_Desktop usage=Game_Pad > > > >> > Total input size 0 bytes > > > >> > Total output size 0 bytes > > > >> > Total feature size 0 bytes > > > > >> > if i do `hd /dev/uhid0` is see output like this when pressing > > > >> > buttons on the > > > >> > gamepad: > > > > >> > 00000000 01 78 72 88 69 08 00 01 01 80 7f 7f 80 18 00 00 > > > > >> > |.xr.i...........| > > > > >> > 00000010 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 08 00 00 > > > > >> > |................| > > > > >> > 00000020 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 28 00 00 > > > > >> > |.............(..| > > > > >> > 00000030 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 48 00 00 > > > > >> > |.............H..| > > > > >> > 00000040 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 88 00 00 > > > > >> > |................| > > > > >> > 00000050 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 08 01 00 > > > > >> > |................| > > > > >> > 00000060 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 08 02 00 > > > > >> > |................| > > > > >> > 00000070 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 08 04 00 > > > > >> > |................| > > > > >> > 00000080 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 08 08 00 > > > > >> > |................| > > > > >> > 00000090 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 08 10 00 > > > > >> > |................| > > > > >> > 000000a0 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 08 20 00 > > > > >> > |.............. > > > > >> > .| > > > >> > 000000b0 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 04 00 00 > > > > >> > |................| > > > > >> > 000000c0 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 06 00 00 > > > > >> > |................| > > > > >> > 000000d0 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 00 00 00 > > > > >> > |................| > > > > >> > 000000e0 01 80 7f 7f 80 08 00 00 01 80 7f 7f 80 02 00 00 > > > > >> > |................| > > > > >> > the pad has 10 buttons, 1 analog stick, 2 digital sticks, a > > > >> > "mode" > > > >> > button > > > >> > and > > > >> > a "vibration" button. > > > > >> There was/is ujoy in development but that is all. > > > > > thanks for the hint. i mailed the developer a year or so ago due > > > > to his > > > > post on the freebsd-drivers@ mailinglist [1], but he told > > > > development of > > > > the ujoy driver had ceased. i checked the site mentioned in his > > > > post and > > > > the ujoy driver from back then is also no longer available. > > > > > so there is no way of xorg or hal working directly with uhid > > > > devices > > > > then? > > > > There is xf86-input-joystick, but I dunno about its usability. > > > > Also look here: > > > http://wiki.freebsd.org/uhidd > > thanks for the hint. i'm about to try it out. however i'm having difficulties > recompiling my kernel without ukbd (which is required for using uhidd): You don't need to remove ukbd from kernel unless you want to use uhidd's own keyboard "driver". Since it's a gamepad, you only need to compile the kernel without uhid(4) and start uhidd with "uhidd -hs /dev/ugen.X.Y". Then you can try something like "usbhidctl -f /dev/uvhid0"... However, uhidd doesn't have specific joystick/gamepad support at the moment. The only benefit of using uhidd on joystick/gamepad is: 1) split multiple joysticks using one endpoint (for converters, very rare). 2) strip the report id byte so usbhidctl and the userland usbhid(3) parser can support the device. Cheers, Kai