Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 2006 09:49:44 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Takanori Watanabe <takawata@init-main.com>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Wii Controler
Message-ID:  <4586D4B8.6090505@savvis.net>
In-Reply-To: <200612180634.kBI6YTLE045215@sana.init-main.com>
References:  <200612180634.kBI6YTLE045215@sana.init-main.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4586D4B8.6090505>