From owner-freebsd-usb@FreeBSD.ORG Tue Oct 3 09:36:00 2006 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57B5316A415 for ; Tue, 3 Oct 2006 09:36:00 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1078243D5A for ; Tue, 3 Oct 2006 09:35:58 +0000 (GMT) (envelope-from r.c.ladan@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so136717nfc for ; Tue, 03 Oct 2006 02:35:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=TEA/x6A372ZGDw6KFlM+CPYDVT3CRpJtNhqVCDaY/Jeg3WBPkW6plXzk5O72ZUjx5Uh8zqcFw+wHgQ3eGykxmn7xqXkgOxYs3PS7l3xsvTqUNa4a7fQt1OKzYIrYJyC9Cro7KUtSa20d6vvrwcaD1r/oih2PP/OCcJAQHK4a6ow= Received: by 10.49.94.20 with SMTP id w20mr540761nfl; Tue, 03 Oct 2006 02:35:56 -0700 (PDT) Received: from ?131.155.68.222? ( [131.155.68.222]) by mx.gmail.com with ESMTP id p72sm655792nfc.2006.10.03.02.35.55; Tue, 03 Oct 2006 02:35:56 -0700 (PDT) Message-ID: <45222EF4.5000101@gmail.com> Date: Tue, 03 Oct 2006 11:35:48 +0200 From: Rene Ladan User-Agent: Thunderbird 1.5.0.7 (X11/20060914) MIME-Version: 1.0 To: Jindra Fucik References: <450DA217.9080602@gmail.com> <049001c6e6cb$1c70c560$c4cd9109@PC2088> In-Reply-To: <049001c6e6cb$1c70c560$c4cd9109@PC2088> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: anyone working on setting output items with usbhidctl(1) ? 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: Tue, 03 Oct 2006 09:36:00 -0000 Jindra Fucik schreef: >> Hi, >> >> is anyone working on setting output items with usbhidctl(1) ? >> >> I thought that something like -s "feature1=value1,feature2=value2,..." >> would be nice to have. > > Hi Rene, have you any progress? I do some tests on uhid & write and have > no positive feedback. > There is some progress. I've sent PR usb/103418 containing a patch to usbhidctl(1). You can test the patch if you have a hid with a known output descriptor: # usbhidctl -f /dev/uhid0 -w name=value should do the trick. When I test the patch with my Xbox 360 controller which contains a reverse-engineered output descriptor it crashes when calling hid_set_data() from libusbhid. I guess I'm not initializing the variable *buf correctly (it contains 0x800). Alternatively you can import usbhidctl(1) from OpenBSD/NetBSD (some trivial patches are needed, like s/hid_start()/hid_init() ) which has hopefully a working -w option. Regards, Rene -- GPG fingerprint = E738 5471 D185 7013 0EE0 4FC8 3C1D 6F83 12E1 84F6 (subkeys.pgp.net) "It won't fit on the line." -- me, 2001