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