From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 2 20:24:05 2011 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B20C106564A for ; Mon, 2 May 2011 20:24:05 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by mx1.freebsd.org (Postfix) with ESMTP id CA2028FC15 for ; Mon, 2 May 2011 20:24:04 +0000 (UTC) Received: by bwz13 with SMTP id 13so8660005bwz.17 for ; Mon, 02 May 2011 13:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KrOaKo5zmLWrzQOdtHuIawFAXCcGwbz7c/3yvQhuZyU=; b=Q1hmJhrxaofnamqNeJDAqNKmaTBKAhY3knixBR8Xva8RxiIb+pj9AMutaSfRynOKRB tA3tArz/r3mGoxsKirmeffVVNblxEkKAL4sHVy7nDGJgDALMfCtoCD2RjEqTb5LdYdPZ D6/cGKR4+WfdDtDcWHLKoUW7sZRa3BerZAIUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=TFKtBwJl0nBjfVqJ6p4B2Vb8svF8881gYtZMBuoRmPYMPeRjW+X+3wt+/aLSqyya2g dFf/wP7XMPNkd9AKFOinc/i+73P0q1fpjcCAi1JGEzgd2yYcC5PvaqqW81tEj/QSFAP+ elxttS7Fp+kXnvKFKaz7+oKsJIAzrgxm8nOik= MIME-Version: 1.0 Received: by 10.204.128.90 with SMTP id j26mr1381297bks.116.1304367843600; Mon, 02 May 2011 13:24:03 -0700 (PDT) Received: by 10.204.39.133 with HTTP; Mon, 2 May 2011 13:24:03 -0700 (PDT) In-Reply-To: <4DBF0D26.8020703@gmail.com> References: <4D3889D2.80508@gmail.com> <201101202043.p0KKhDIB076736@lurza.secnetix.de> <4DBF0D26.8020703@gmail.com> Date: Mon, 2 May 2011 13:24:03 -0700 Message-ID: From: Maksim Yevmenkin To: David Demelier Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth mouse does not connect after reboot X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 20:24:05 -0000 On Mon, May 2, 2011 at 12:59 PM, David Demelier wrote: > > I'm sorry to disturb you again.. I'm still guessin where to search how to > get these horizontal events with my bluetooth mouse. I thing the mouse_info > structure does not need to be extended I have a USB mouse that has the same > horizontal buttons and they just works ! > > They sends 7 and 8 events to X (checked with xev) > > What can I do to extend bthidd and this button support ? like i said before, you need to decode AC_Pan data from the report. i just took a quick look at ums(4) driver and, it appears, that AC_Pan events are translated into button events, i.e. values < 0 is mask (1 << 3) and values > 0 is mask (1 << 4) . you can add identical translation to bthidd(8) to see if it works. you will need to modify hid_interrupt() function in hid.c thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue May 3 16:54:11 2011 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32A3B106566B for ; Tue, 3 May 2011 16:54:09 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 34DFD8FC14 for ; Tue, 3 May 2011 16:54:08 +0000 (UTC) Received: by bwz12 with SMTP id 12so399690bwz.13 for ; Tue, 03 May 2011 09:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eyX1ZhHFNaq15BEvdI+m6IvFkNMOMQ9cCOI7WoDx6Jg=; b=Tg8lxb722z3g/5SoawfAAGXNGELrOK1P1gXnOuL3+ILYMUwvMirt5Y0geIPgM6r60X WG2phJqnqjoZvih+i7wAvV3ZdyC+0CIFXgicbO8sESf71f2enRuXxWObTbknEpOgDII4 M3RIPoAix3L27wY80mpko3Bm8TQDkISCS8tgw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=A7fo5TIsWjkkvQpNVfJkDQwqg+MVg4yhL0sAeM3k06J22Es5Vo47Tl/S5+kz3j4Qja 6EaMvtBAG90Uq+q1oXvmHwCCKPYbH4DIrp+0M9due+2OwoOupIhDD6Q7GEHtt41ZszIT UXxffZvqFVEVD4tlBEjpAaltZ84S+olvoFzP0= MIME-Version: 1.0 Received: by 10.204.16.72 with SMTP id n8mr76597bka.8.1304441647968; Tue, 03 May 2011 09:54:07 -0700 (PDT) Received: by 10.204.39.133 with HTTP; Tue, 3 May 2011 09:54:07 -0700 (PDT) In-Reply-To: <4DBFA6D0.3010208@gmail.com> References: <4D3889D2.80508@gmail.com> <201101202043.p0KKhDIB076736@lurza.secnetix.de> <4DBF0D26.8020703@gmail.com> <4DBFA6D0.3010208@gmail.com> Date: Tue, 3 May 2011 09:54:07 -0700 Message-ID: From: Maksim Yevmenkin To: David Demelier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth mouse does not connect after reboot X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 16:54:11 -0000 Hello David, On Mon, May 2, 2011 at 11:55 PM, David Demelier wrote: [...] >>> I'm sorry to disturb you again.. I'm still guessin where to search how = to >>> get these horizontal events with my bluetooth mouse. I thing the >>> mouse_info >>> structure does not need to be extended I have a USB mouse that has the >>> same >>> horizontal buttons and they just works ! >>> >>> They sends 7 and 8 events to X (checked with xev) >>> >>> What can I do to extend bthidd and this button support ? >> >> like i said before, you need to decode AC_Pan data from the report. i >> just took a quick look at ums(4) driver and, it appears, that AC_Pan >> events are translated into button events, i.e. values< =A00 is mask (1 >> << =A03) and values> =A00 is mask (1<< =A04) . you can add identical >> translation to bthidd(8) to see if it works. you will need to modify >> hid_interrupt() function in hid.c > > Thanks, > > I made the following change into hid.c : > > markand@Melon ...sr.sbin/bluetooth/bthidd $ diff -ub hid.c.orig hid.c > --- hid.c.orig =A02011-05-02 22:09:48.000000000 +0200 > +++ hid.c =A0 =A0 =A0 2011-05-03 08:50:45.000000000 +0200 > @@ -168,6 +168,16 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage =3D HID_USAGE(h.usage); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0val =3D hid_get_data(data, &h); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Horizontal buttons */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (page =3D=3D HUP_CONSUMER && usage =3D= =3D HUC_AC_PAN) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (val =3D=3D -1) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_butt = |=3D (1 << 3); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else if (val =3D=3D 1) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_butt = |=3D (1 << 4); ums(4) has this like if (val < 0) mouse_butt |=3D (1 << 3); else if (val > 0) mouse_butt |=3D (1 << 4); > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mevents ++; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > + > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (page) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case HUP_GENERIC_DESKTOP: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (usage) { > > Now xev detect the back / next buttons like my USB one, as Button 6 and 7 > but they do not works in firefox. > > I may need to add some flags? thank you for trying this out. just to confirm, according to xev(1) wired (usb) and wireless (bluetooth) mice send identical events, is that correct? if so, does wires (usb) mouse works in firefox? thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue May 3 19:09:40 2011 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C616106566B for ; Tue, 3 May 2011 19:09:40 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 983218FC08 for ; Tue, 3 May 2011 19:09:39 +0000 (UTC) Received: by bwz12 with SMTP id 12so546044bwz.13 for ; Tue, 03 May 2011 12:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=YHIcyveEZmxHiYD0MA6rfmxmy2btwv1H4kJxkcWxB0o=; b=op2zc4Cj5/Jdvzw9KqF0+CYr00t6Gggof4IohRbWMF/oRET08mMpq1TT3JFdjzUcW0 L2P5OPXOiuDYGmmI1qgPqgJjvwTUUl6fY0441joZ4NuqxYMBR5x5ywYv2RAQMqYXXhVI lnZgT2a7HallUfJ8VBOr9G4QDbVDq2PkbxyQ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=MEFboCD2r8DCqPTlDJRtBkMcOHsNe3CFOuuLTEeHe5igInYHVwGBcY60NyaIQ1cuDF TtDERDP9woOkkg1Z4ju0uJxLtVAyOUrIV/71G6Ju38r7cxj3zG2lWp5QmKCmGMuKGJcc 4y3zwRQ2wBiHoN2nRfb3QvIk9p1xKegDPmipw= MIME-Version: 1.0 Received: by 10.204.16.72 with SMTP id n8mr207017bka.8.1304449778299; Tue, 03 May 2011 12:09:38 -0700 (PDT) Received: by 10.204.39.133 with HTTP; Tue, 3 May 2011 12:09:38 -0700 (PDT) In-Reply-To: <4DC04F31.6050405@gmail.com> References: <4D3889D2.80508@gmail.com> <201101202043.p0KKhDIB076736@lurza.secnetix.de> <4DBF0D26.8020703@gmail.com> <4DBFA6D0.3010208@gmail.com> <4DC04F31.6050405@gmail.com> Date: Tue, 3 May 2011 12:09:38 -0700 Message-ID: From: Maksim Yevmenkin To: David Demelier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth mouse does not connect after reboot X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:09:40 -0000 On Tue, May 3, 2011 at 11:53 AM, David Demelier wrote: > On 03/05/2011 18:54, Maksim Yevmenkin wrote: >> >> Hello David, >> >> On Mon, May 2, 2011 at 11:55 PM, David Demelier >> =A0wrote: >> >> [...] >> >>>>> I'm sorry to disturb you again.. I'm still guessin where to search ho= w >>>>> to >>>>> get these horizontal events with my bluetooth mouse. I thing the >>>>> mouse_info >>>>> structure does not need to be extended I have a USB mouse that has th= e >>>>> same >>>>> horizontal buttons and they just works ! >>>>> >>>>> They sends 7 and 8 events to X (checked with xev) >>>>> >>>>> What can I do to extend bthidd and this button support ? >>>> >>>> like i said before, you need to decode AC_Pan data from the report. i >>>> just took a quick look at ums(4) driver and, it appears, that AC_Pan >>>> events are translated into button events, i.e. values< =A0 =A00 is mas= k (1 >>>> << =A0 =A03) and values> =A0 =A00 is mask (1<< =A0 =A04) . you can add= identical >>>> translation to bthidd(8) to see if it works. you will need to modify >>>> hid_interrupt() function in hid.c >>> >>> Thanks, >>> >>> I made the following change into hid.c : >>> >>> markand@Melon ...sr.sbin/bluetooth/bthidd $ diff -ub hid.c.orig hid.c >>> --- hid.c.orig =A02011-05-02 22:09:48.000000000 +0200 >>> +++ hid.c =A0 =A0 =A0 2011-05-03 08:50:45.000000000 +0200 >>> @@ -168,6 +168,16 @@ >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage =3D HID_USAGE(h.usage); >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0val =3D hid_get_data(data,&h); >>> >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Horizontal buttons */ >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (page =3D=3D HUP_CONSUMER&& =A0usage = =3D=3D HUC_AC_PAN) { >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (val =3D=3D -1) >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_but= t |=3D (1<< =A03); >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else if (val =3D=3D 1) >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_but= t |=3D (1<< =A04); >> >> ums(4) has this like >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (val< =A00) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mouse_but= t |=3D (1<< =A03); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else if (val> =A00) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mouse_but= t |=3D (1<< =A04); >> >>> + >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mevents ++; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >>> + >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (page) { >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case HUP_GENERIC_DESKTOP: >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (usage) { >>> >>> Now xev detect the back / next buttons like my USB one, as Button 6 and= 7 >>> but they do not works in firefox. >>> >>> I may need to add some flags? >> >> thank you for trying this out. just to confirm, according to xev(1) >> wired (usb) and wireless (bluetooth) mice send identical events, is >> that correct? if so, does wires (usb) mouse works in firefox? > > In fact I just realized that my usb mouse sends button 8 and 9, but if I = saw > well ums also set a UMS_FLAG_T_AXIS and the following may be needed ? > > =A0467 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ((flags & MOUSE_FLAGS_MASK) =3D= =3D MOUSE_FLAGS) > =A0468 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 info->sc_flags |= =3D UMS_FLAG_T_AXIS; > > I'm guessing why the buttons are recognized as 6 and 7 by xev, we are usi= ng > the same mask (1 << 3) and (1 << 4) as ums. well, in this case, can you please try to change the mask to be (1 << 5) and (1 << 6)? thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue May 3 19:13:10 2011 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF1041065674 for ; Tue, 3 May 2011 19:13:09 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 77CD98FC0C for ; Tue, 3 May 2011 19:13:09 +0000 (UTC) Received: by bwz12 with SMTP id 12so549887bwz.13 for ; Tue, 03 May 2011 12:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=diZG4/KRffeml5k1cZcF0Kd76dDUTVlhirsez9RLa2s=; b=AjoMn0W9vXzWI5XZRVomSb60T6fxJOQ2guTYTOVJnIlr/NyKyg+d3LRP5dEpYrm4iF TfF1U9eKK9e6aDc2m78NUWfjwOGtD10tRWzkCZumXEATmbjELOAk8BleVR1aw56/pnl0 8dCbbFNF0L1fHfc4//ya9p7F+UHrKEqXlk4rY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=rfE80MzDBaugJmKOJuGU/wpQMXgCzf0qz0f/6kD5hbMzw3I9+Z5LmHbsYHYoLfCPw6 XlL4s8uLavTrxWf/OK8i5dG5h2UrbVuuB4ypIXtq4+9qka5Lx7NO0s5ZXpM9G3dXlH26 nyX0NJ4TzKbwaxNCwxa0Os4o8PfeYDIRwJ/b8= MIME-Version: 1.0 Received: by 10.204.25.194 with SMTP id a2mr171855bkc.197.1304449988177; Tue, 03 May 2011 12:13:08 -0700 (PDT) Received: by 10.204.39.133 with HTTP; Tue, 3 May 2011 12:13:08 -0700 (PDT) In-Reply-To: <4DC0513A.5000805@gmail.com> References: <4D3889D2.80508@gmail.com> <201101202043.p0KKhDIB076736@lurza.secnetix.de> <4DBF0D26.8020703@gmail.com> <4DC0513A.5000805@gmail.com> Date: Tue, 3 May 2011 12:13:08 -0700 Message-ID: From: Maksim Yevmenkin To: David Demelier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth mouse does not connect after reboot X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:13:10 -0000 On Tue, May 3, 2011 at 12:02 PM, David Demelier wrote: > On 02/05/2011 22:24, Maksim Yevmenkin wrote: >> >> On Mon, May 2, 2011 at 12:59 PM, David Demelier >> =A0wrote: >> >>> >>> I'm sorry to disturb you again.. I'm still guessin where to search how = to >>> get these horizontal events with my bluetooth mouse. I thing the >>> mouse_info >>> structure does not need to be extended I have a USB mouse that has the >>> same >>> horizontal buttons and they just works ! >>> >>> They sends 7 and 8 events to X (checked with xev) >>> >>> What can I do to extend bthidd and this button support ? >> >> like i said before, you need to decode AC_Pan data from the report. i >> just took a quick look at ums(4) driver and, it appears, that AC_Pan >> events are translated into button events, i.e. values< =A00 is mask (1 >> << =A03) and values> =A00 is mask (1<< =A04) . you can add identical >> translation to bthidd(8) to see if it works. you will need to modify >> hid_interrupt() function in hid.c > > Max, > > I successfully made the patch but it's not the same mask. This diff just > works! > > --- hid.c.orig =A02011-05-02 22:09:48.000000000 +0200 > +++ hid.c =A0 =A0 =A0 2011-05-03 20:57:46.000000000 +0200 > @@ -168,6 +168,16 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage =3D HID_USAGE(h.usage); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0val =3D hid_get_data(data, &h); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Horizontal buttons */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (page =3D=3D HUP_CONSUMER && usage =3D= =3D HUC_AC_PAN) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (val < 0) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_butt = |=3D (1 << 5); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else if (val > 0) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_butt = |=3D (1 << 6); > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mevents ++; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > + > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (page) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case HUP_GENERIC_DESKTOP: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (usage) { > > Do you think it's a diff suitable to commit ? > > I'm so happy to make my horizontal buttons working :):) ah, i see you already figured it out :) i can commit something like this, i suppose. i would just move the statement into switch() below. i suppose we could just document that ac_pan is encoded as 8 and 9 button presses. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue May 3 19:36:53 2011 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03DFE1065675 for ; Tue, 3 May 2011 19:36:53 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7C3F88FC1B for ; Tue, 3 May 2011 19:36:52 +0000 (UTC) Received: by bwz12 with SMTP id 12so572776bwz.13 for ; Tue, 03 May 2011 12:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NWJuG8MgamqjKc1xvQQpByEqS440e+exWrB2n+xD2EU=; b=Rbwc0J+z4NC4Minsf3LoPQkmY/ETxVl60O+h8LVljxm82wtE2EIaUrts0XIZFQZThi csZIgIJVGVNQPMV4D0oZAEgpsiKXLy3mTAn6L36AUylF21Q5dJentLXS3X6BiRcLappz DZ1OXL6/T62KhVYsPV0gOKh/Vd/eUtTaRW9Z8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KVC5gGSzTmSMF9NBx1GDEW5nXLB4yn7YCK0oYgijrijINEw3yuWsvfCManTdKnn1xX 7yzp8X8nko9hb/B1k7C3utvSmt4vV5jeC6+TDv9ZE6yn2ghVWaEO5GTRHR8nBxc1Mzkg Kfa6BFXaLvkYiwvQQ7SFvCRBU4U7eFe7hBLmc= MIME-Version: 1.0 Received: by 10.204.16.72 with SMTP id n8mr234489bka.8.1304451411157; Tue, 03 May 2011 12:36:51 -0700 (PDT) Received: by 10.204.39.133 with HTTP; Tue, 3 May 2011 12:36:51 -0700 (PDT) In-Reply-To: <4DC0563D.7080005@gmail.com> References: <4D3889D2.80508@gmail.com> <201101202043.p0KKhDIB076736@lurza.secnetix.de> <4DBF0D26.8020703@gmail.com> <4DC0513A.5000805@gmail.com> <4DC0563D.7080005@gmail.com> Date: Tue, 3 May 2011 12:36:51 -0700 Message-ID: From: Maksim Yevmenkin To: David Demelier Content-Type: multipart/mixed; boundary=000325556f3afd23bd04a264423e Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth mouse does not connect after reboot X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:36:53 -0000 --000325556f3afd23bd04a264423e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, May 3, 2011 at 12:23 PM, David Demelier wrote: >>>>> I'm sorry to disturb you again.. I'm still guessin where to search ho= w >>>>> to >>>>> get these horizontal events with my bluetooth mouse. I thing the >>>>> mouse_info >>>>> structure does not need to be extended I have a USB mouse that has th= e >>>>> same >>>>> horizontal buttons and they just works ! >>>>> >>>>> They sends 7 and 8 events to X (checked with xev) >>>>> >>>>> What can I do to extend bthidd and this button support ? >>>> >>>> like i said before, you need to decode AC_Pan data from the report. i >>>> just took a quick look at ums(4) driver and, it appears, that AC_Pan >>>> events are translated into button events, i.e. values< =A0 =A00 is mas= k (1 >>>> << =A0 =A03) and values> =A0 =A00 is mask (1<< =A0 =A04) . you can add= identical >>>> translation to bthidd(8) to see if it works. you will need to modify >>>> hid_interrupt() function in hid.c >>> >>> Max, >>> >>> I successfully made the patch but it's not the same mask. This diff jus= t >>> works! >>> >>> --- hid.c.orig =A02011-05-02 22:09:48.000000000 +0200 >>> +++ hid.c =A0 =A0 =A0 2011-05-03 20:57:46.000000000 +0200 >>> @@ -168,6 +168,16 @@ >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage =3D HID_USAGE(h.usage); >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0val =3D hid_get_data(data,&h); >>> >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Horizontal buttons */ >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (page =3D=3D HUP_CONSUMER&& =A0usage = =3D=3D HUC_AC_PAN) { >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (val< =A00) >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_but= t |=3D (1<< =A05); >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else if (val> =A00) >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_but= t |=3D (1<< =A06); >>> + >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mevents ++; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >>> + >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (page) { >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case HUP_GENERIC_DESKTOP: >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (usage) { >>> >>> Do you think it's a diff suitable to commit ? >>> >>> I'm so happy to make my horizontal buttons working :):) >> >> ah, i see you already figured it out :) i can commit something like >> this, i suppose. i would just move the statement into switch() below. >> i suppose we could just document that ac_pan is encoded as 8 and 9 >> button presses. >> > > Yes but why is the mask different from the ums ones ? Also can you commit > this to -STABLE thus I'll be able to use it without patching it. i *think* its because usb mouse operates on level1 (see mouse(4) for details), and, status for "extended" mouse buttons reported separately, i.e. from mouse(4) man page: byte 8, bits 0-6 reflect the state of the buttons 4-10. i can not commit this directly to -stable. i need to commit this to -head first and then mfc it after a week or so. i'm attaching a slightly different patch (dont worry you still get all the credit). please try it and let me know if it works for you. thanks, max --000325556f3afd23bd04a264423e Content-Type: text/plain; charset=US-ASCII; name="bthidd.diff.txt" Content-Disposition: attachment; filename="bthidd.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gn98n4at0 SW5kZXg6IGhpZC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGhpZC5jCShyZXZpc2lvbiAyMjE0MDApCisrKyBo aWQuYwkod29ya2luZyBjb3B5KQpAQCAtMjI5LDYgKzIyOSwxNiBAQAogCQkJCWJyZWFrOwogCiAJ CQlzd2l0Y2ggKHVzYWdlKSB7CisJCQljYXNlIEhVQ19BQ19QQU46CisJCQkJLyogSG9yaXpvbnRh bCBzY3JvbGwgKi8KKwkJCQlpZiAodmFsIDwgMCkKKwkJCQkJbW91c2VfYnV0dCB8PSAoMSA8PCA1 KTsKKwkJCQllbHNlCisJCQkJCW1vdXNlX2J1dHQgfD0gKDEgPDwgNik7CisKKwkJCQltZXZlbnRz ICsrOworCQkJCWJyZWFrOworCiAJCQljYXNlIDB4YjU6IC8qIFNjYW4gTmV4dCBUcmFjayAqLwog CQkJCXZhbCA9IDB4MTk7CiAJCQkJYnJlYWs7Cg== --000325556f3afd23bd04a264423e-- From owner-freebsd-bluetooth@FreeBSD.ORG Tue May 3 20:01:46 2011 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAF001065670 for ; Tue, 3 May 2011 20:01:46 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 41B138FC17 for ; Tue, 3 May 2011 20:01:45 +0000 (UTC) Received: by bwz12 with SMTP id 12so598391bwz.13 for ; Tue, 03 May 2011 13:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=YbQBpv4whoNeicgiApWc9qUTbUxQZm0pHjjPOxHAX5c=; b=oOh+yTOw7UIDQwbQcrtzX1EAVJuZSjKG/hp2igJ3OmE88UC+BJ3hrTLDmOqr+1xlT5 LMjALAKp6ckJcdUuWd+xUGVfN00doZK0scFfPiqtBdwpPRGgBAtH2pY1D88XroDzpWSX JrhsI8gqp2sHr9U7+wawcieyjLOua8RISRcd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mjva3PyqMinFe6Iujf5Xmho5faY95SYWB5VYtNJJek4Pdc1+YWT1NLy50R2/xYdBGU wCNalvfXheEyRfy6rnXejHYvR3Vi1m8+KKVsmwozEpeS2MgUIRt7jCxhYllsiJjlCo1x a7VztzSV/VFmOLY49MMUuK0AliEj7aRDg0cyE= MIME-Version: 1.0 Received: by 10.204.74.21 with SMTP id s21mr254665bkj.62.1304452904976; Tue, 03 May 2011 13:01:44 -0700 (PDT) Received: by 10.204.39.133 with HTTP; Tue, 3 May 2011 13:01:44 -0700 (PDT) In-Reply-To: <4DC05D39.4020309@gmail.com> References: <4D3889D2.80508@gmail.com> <201101202043.p0KKhDIB076736@lurza.secnetix.de> <4DBF0D26.8020703@gmail.com> <4DC0513A.5000805@gmail.com> <4DC0563D.7080005@gmail.com> <4DC05D39.4020309@gmail.com> Date: Tue, 3 May 2011 13:01:44 -0700 Message-ID: From: Maksim Yevmenkin To: David Demelier Content-Type: multipart/mixed; boundary=0016e6d7e82607013c04a2649c0f Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth mouse does not connect after reboot X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 20:01:46 -0000 --0016e6d7e82607013c04a2649c0f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, May 3, 2011 at 12:53 PM, David Demelier wrote: > On 03/05/2011 21:36, Maksim Yevmenkin wrote: >> >> On Tue, May 3, 2011 at 12:23 PM, David Demelier >> =A0wrote: >>>>>>> >>>>>>> I'm sorry to disturb you again.. I'm still guessin where to search >>>>>>> how >>>>>>> to >>>>>>> get these horizontal events with my bluetooth mouse. I thing the >>>>>>> mouse_info >>>>>>> structure does not need to be extended I have a USB mouse that has >>>>>>> the >>>>>>> same >>>>>>> horizontal buttons and they just works ! >>>>>>> >>>>>>> They sends 7 and 8 events to X (checked with xev) >>>>>>> >>>>>>> What can I do to extend bthidd and this button support ? >>>>>> >>>>>> like i said before, you need to decode AC_Pan data from the report. = i >>>>>> just took a quick look at ums(4) driver and, it appears, that AC_Pan >>>>>> events are translated into button events, i.e. values< =A0 =A0 =A00 = is mask >>>>>> (1 >>>>>> << =A0 =A0 =A03) and values> =A0 =A0 =A00 is mask (1<< =A0 =A0 =A04)= . you can add >>>>>> identical >>>>>> translation to bthidd(8) to see if it works. you will need to modify >>>>>> hid_interrupt() function in hid.c >>>>> >>>>> Max, >>>>> >>>>> I successfully made the patch but it's not the same mask. This diff >>>>> just >>>>> works! >>>>> >>>>> --- hid.c.orig =A02011-05-02 22:09:48.000000000 +0200 >>>>> +++ hid.c =A0 =A0 =A0 2011-05-03 20:57:46.000000000 +0200 >>>>> @@ -168,6 +168,16 @@ >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0usage =3D HID_USAGE(h.usage); >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0val =3D hid_get_data(data,&h); >>>>> >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Horizontal buttons */ >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (page =3D=3D HUP_CONSUMER&& =A0 =A0u= sage =3D=3D HUC_AC_PAN) { >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (val< =A0 =A00) >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_b= utt |=3D (1<< =A0 =A05); >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else if (val> =A0 =A00) >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mouse_b= utt |=3D (1<< =A0 =A06); >>>>> + >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mevents ++; >>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } >>>>> + >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (page) { >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case HUP_GENERIC_DESKTOP: >>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (usage) { >>>>> >>>>> Do you think it's a diff suitable to commit ? >>>>> >>>>> I'm so happy to make my horizontal buttons working :):) >>>> >>>> ah, i see you already figured it out :) i can commit something like >>>> this, i suppose. i would just move the statement into switch() below. >>>> i suppose we could just document that ac_pan is encoded as 8 and 9 >>>> button presses. >>>> >>> >>> Yes but why is the mask different from the ums ones ? Also can you comm= it >>> this to -STABLE thus I'll be able to use it without patching it. >> >> i *think* its because usb mouse operates on level1 (see mouse(4) for >> details), and, status for "extended" mouse buttons reported >> separately, i.e. from mouse(4) man page: byte 8, bits 0-6 reflect the >> state of the buttons 4-10. >> >> i can not commit this directly to -stable. i need to commit this to >> -head first and then mfc it after a week or so. >> >> i'm attaching a slightly different patch (dont worry you still get all >> the credit). please try it and let me know if it works for you. >> > Yes, this is what I was trying to do before putting it outside the switch= () > statement because of these warning in /var/log/messages : > > May =A03 21:52:21 Melon bthidd[25785]: Keyboard events received from > non-keyboard device 00:1f:20:0f:62:31. Please report > > These messages appears after pressing these buttons. argh.... sorry... please try attached patch thanks max --0016e6d7e82607013c04a2649c0f Content-Type: text/plain; charset=US-ASCII; name="bthidd.diff.txt" Content-Disposition: attachment; filename="bthidd.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gn99kmk80 SW5kZXg6IGhpZC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGhpZC5jCShyZXZpc2lvbiAyMjE0MDApCisrKyBo aWQuYwkod29ya2luZyBjb3B5KQpAQCAtMjI5LDYgKzIyOSwxNyBAQAogCQkJCWJyZWFrOwogCiAJ CQlzd2l0Y2ggKHVzYWdlKSB7CisJCQljYXNlIEhVQ19BQ19QQU46CisJCQkJLyogSG9yaXpvbnRh bCBzY3JvbGwgKi8KKwkJCQlpZiAodmFsIDwgMCkKKwkJCQkJbW91c2VfYnV0dCB8PSAoMSA8PCA1 KTsKKwkJCQllbHNlCisJCQkJCW1vdXNlX2J1dHQgfD0gKDEgPDwgNik7CisKKwkJCQltZXZlbnRz ICsrOworCQkJCXZhbCA9IDA7CisJCQkJYnJlYWs7CisKIAkJCWNhc2UgMHhiNTogLyogU2NhbiBO ZXh0IFRyYWNrICovCiAJCQkJdmFsID0gMHgxOTsKIAkJCQlicmVhazsK --0016e6d7e82607013c04a2649c0f-- From owner-freebsd-bluetooth@FreeBSD.ORG Thu May 5 13:51:32 2011 Return-Path: Delivered-To: bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB4351065677 for ; Thu, 5 May 2011 13:51:32 +0000 (UTC) (envelope-from root@free.fr) Received: from smtpfb1-g21.free.fr (smtpfb1-g21.free.fr [212.27.42.9]) by mx1.freebsd.org (Postfix) with ESMTP id 26A608FC1C for ; Thu, 5 May 2011 13:51:30 +0000 (UTC) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5]) by smtpfb1-g21.free.fr (Postfix) with ESMTP id EE0A92D937 for ; Thu, 5 May 2011 15:33:44 +0200 (CEST) Received: from free.fr (unknown [82.235.65.2]) by smtp5-g21.free.fr (Postfix) with ESMTP id CEC4AD4834A for ; Thu, 5 May 2011 15:33:38 +0200 (CEST) From: Raoul To: bluetooth@freebsd.org Date: Thu, 05 May 2011 15:33:38 +0200 Sender: root@free.fr Message-Id: <20110505133338.CEC4AD4834A@smtp5-g21.free.fr> Cc: Subject: opcodes documentation X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 13:51:32 -0000 hi all, in the bluetooth man page i read: SYNOPSIS bt_devsend(int s, uint16_t opcode, void *param, size_t plen); ... DESCRIPTION The bt_devsend() function sends a Bluetooth HCI command with the given opcode to the provided socket s, previously obtained with bt_devopen(3). The opcode parameter is expected to be in the host byte order. The param and plen parameters specify command parameters. The bt_devsend() func- tion does not modify the HCI filter on the provided socket s. The func- tion returns 0 on success, or -1 if an error occurred. grep'ing in netgraph/... i don't find any opcode other than in bt_devsend... are they device specifics, or something like read/rwite and so on? Sorry for thje naive newbie question, but sure some slight additions to the man page would be appreciated on this topic. Thanks. Raoul rmgls@free.fr From owner-freebsd-bluetooth@FreeBSD.ORG Thu May 5 15:04:01 2011 Return-Path: Delivered-To: bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B9181065672 for ; Thu, 5 May 2011 15:04:01 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from mail.ukfsn.org (mail.ukfsn.org [77.75.108.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9188FC14 for ; Thu, 5 May 2011 15:04:00 +0000 (UTC) Received: from localhost (smtp-filter.ukfsn.org [192.168.54.205]) by mail.ukfsn.org (Postfix) with ESMTP id 474B9DEF31; Thu, 5 May 2011 15:35:51 +0100 (BST) Received: from mail.ukfsn.org ([192.168.54.25]) by localhost (smtp-filter.ukfsn.org [192.168.54.205]) (amavisd-new, port 10024) with ESMTP id 2oqs-j8002Qr; Thu, 5 May 2011 15:35:51 +0100 (BST) Received: from galant.ukfsn.org (unknown [89.195.132.179]) by mail.ukfsn.org (Postfix) with ESMTP id B5EC5DEF28; Thu, 5 May 2011 15:35:44 +0100 (BST) Received: by galant.ukfsn.org (Postfix, from userid 1000) id D51FB2600A4; Thu, 5 May 2011 15:36:01 +0100 (BST) Date: Thu, 5 May 2011 15:36:01 +0100 (BST) From: Iain Hibbert To: Raoul In-Reply-To: <20110505133338.CEC4AD4834A@smtp5-g21.free.fr> Message-ID: References: <20110505133338.CEC4AD4834A@smtp5-g21.free.fr> User-Agent: Alpine 2.00 (NEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1726812752-1304606161=:657" Cc: bluetooth@freebsd.org Subject: Re: opcodes documentation X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 15:04:01 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1726812752-1304606161=:657 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 5 May 2011, Raoul wrote: > are they device specifics, or something like read/rwite and so on? > > Sorry for thje naive newbie question, but sure some slight > additions to the man page would be appreciated on this topic. you would need to read the Bluetooth Core specification for details about this, see www.bluetooth.com which I guess the manpage should also reference. the 'opcode' that you need is constructed by the NG_HCI_OPCODE() macro, from the OGF & OCF values for each command which are all defined in ng_hci.h along with the packet structures.. in NetBSD I provided an HCI_CMD_xxx value that evaluates to the correct value for each command (since there is only a single command with each name, it doesn't really make sense to require the OGF/OCF in the API), and BlueZ also uses this method now I believe.. regards, iain --0-1726812752-1304606161=:657 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=commands Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: HCI commands Content-Disposition: attachment; filename=commands I2RlZmluZSBIQ0lfQ01EX0lOUVVJU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RV9QQUlSSU5HX0RFQlVHX01PREUJCTB4MTgw NA0K --0-1726812752-1304606161=:657-- From owner-freebsd-bluetooth@FreeBSD.ORG Thu May 5 16:58:37 2011 Return-Path: Delivered-To: bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE7E51065675 for ; Thu, 5 May 2011 16:58:37 +0000 (UTC) (envelope-from root@free.fr) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1298FC08 for ; Thu, 5 May 2011 16:58:35 +0000 (UTC) Received: from free.fr (unknown [82.235.65.2]) by smtp5-g21.free.fr (Postfix) with ESMTP id A3222D481C8 for ; Thu, 5 May 2011 18:58:31 +0200 (CEST) From: Raoul To: bluetooth@freebsd.org Date: Thu, 05 May 2011 18:53:54 +0200 Sender: root@free.fr Message-Id: <20110505165831.A3222D481C8@smtp5-g21.free.fr> Cc: Subject: Re: opcodes documentation X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 16:58:38 -0000 On Thu May 5 15:04:01 UTC 2011 Iain Hibbert plunky at rya-online.net wrote: > On Thu, 5 May 2011, Raoul wrote: >> are they device specifics, or something like read/rwite and so on? >> >> Sorry for thje naive newbie question, but sure some slight >> additions to the man page would be appreciated on this topic. > > you would need to read the Bluetooth Core specification for details about > this, see www.bluetooth.com which I guess the manpage should also > reference. > > the 'opcode' that you need is constructed by the NG_HCI_OPCODE() macro, > from the OGF & OCF values for each command which are all defined in > ng_hci.h along with the packet structures.. > > in NetBSD I provided an HCI_CMD_xxx value that evaluates to the correct > value for each command (since there is only a single command with each > name, it doesn't really make sense to require the OGF/OCF in the API), and > BlueZ also uses this method now I believe.. > > regards, > iain Hello Iain, Many thanks for your help, its clear. I am always glad, and have so much to learn. Raoul rmgls@free.fr