From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 18 18:21:01 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DE6816A59A for ; Mon, 18 Dec 2006 18:21:01 +0000 (UTC) (envelope-from maksim.yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0812D43CBD for ; Mon, 18 Dec 2006 18:20:56 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id E9CCF3BEC2; Mon, 18 Dec 2006 11:49:45 -0600 (CST) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24677-02-70; Mon, 18 Dec 2006 11:49:45 -0600 (CST) Received: from [10.12.163.251] (unknown [10.12.163.251]) by mailgate1b.savvis.net (Postfix) with ESMTP id 8AAB03BE55; Mon, 18 Dec 2006 11:49:45 -0600 (CST) Message-ID: <4586D4B8.6090505@savvis.net> Date: Mon, 18 Dec 2006 09:49:44 -0800 From: Maksim Yevmenkin User-Agent: Thunderbird 1.5.0.5 (X11/20060906) MIME-Version: 1.0 To: Takanori Watanabe References: <200612180634.kBI6YTLE045215@sana.init-main.com> In-Reply-To: <200612180634.kBI6YTLE045215@sana.init-main.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-bluetooth@freebsd.org Subject: Re: Wii Controler 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, 18 Dec 2006 18:21:01 -0000 Takanori-san, > Hi, I bought Wii controler and Nunchaku to break my display:-p, > though I don't have Wii itself yet. > > I try to connect to my internal bluetooth device. > > I found Wii controller is bluetooth HID device. > as seen in http://www.wiili.org/index.php/Wiimote. > Running bthidd and dumping hcidump -x shows the packet > to notify cursor or button status change. > > I have question. > > 1. How do we wake up Wii controller from FreeBSD host? > I could not connect Wii controller without issueing sync procedure. > Probably there are a way to wake up.And bthidd must forget Wii controler > address to make the host scan even when I issue sync procedure. it would be useful if you could post your bthidd(8) configuration entry for the wii controller. please take a look at the "reconnect_initiate" parameter in the wii controller configuration entry (in bthidd.conf). usually, bluetooth hid devices have this parameter set to "true", which means that hid device itself will initiate connect after it was disconnected. usually, one can press a button or move the device to wake it up and re-connect. bthidd(8) will only initiate connection to the "new" hid devices. "new" means that bthidd(8) had never established connection to this device before (in other words the device'd bd_addr is not listed in the "known hids" file). once device is "known" to bthidd(8), it will use the "reconnect_initiate" parameter to see if connection should be initiated to the device or if it should simply wait for the device to connect. > 2. How do we send HID request to Wii controller? > Some sensors, like accelaration sensor and nunchaku and player identifier > LED should be activated by request from host. since it is a hid device, all you need to do is to fill out and send hid report. hid descriptor will tell you which reports device can send and which reports it will accept. it will also tell you acceptable ranges for values etc. please use % bthidcontrol -a BD_ADDR_of_the_wii_remote dump you could also take a look at bthidd(8) code that sets keyboard leds in /usr/src/usr.sbin/bluetooth/bthidd/kbd.c please see kbd_status_changed() function. thanks, max