From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 18 06:52:31 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 992E516A403 for ; Mon, 18 Dec 2006 06:52:31 +0000 (UTC) (envelope-from takawata@init-main.com) Received: from sana.init-main.com (104.194.138.210.bn.2iij.net [210.138.194.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2FFD43CA0 for ; Mon, 18 Dec 2006 06:52:30 +0000 (GMT) (envelope-from takawata@init-main.com) Received: from init-main.com (localhost [127.0.0.1]) by sana.init-main.com (8.13.8/8.13.3) with ESMTP id kBI6YTLE045215 for ; Mon, 18 Dec 2006 15:34:29 +0900 (JST) (envelope-from takawata@init-main.com) Message-Id: <200612180634.kBI6YTLE045215@sana.init-main.com> To: freebsd-bluetooth@freebsd.org Date: Mon, 18 Dec 2006 15:34:28 +0900 From: Takanori Watanabe Subject: 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 06:52:31 -0000 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. 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. Thanks in advance. PS. There are considerable people emmitting bluetooth signal in Shinkansen :-) 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 From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 18 18:55:39 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 4AE3216A412 for ; Mon, 18 Dec 2006 18:55:39 +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 57BE543C9F for ; Mon, 18 Dec 2006 18:55:35 +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 CEE8A3C04C; Mon, 18 Dec 2006 11:57:28 -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 00380-01-38; Mon, 18 Dec 2006 11:57:28 -0600 (CST) Received: from [10.12.163.251] (unknown [10.12.163.251]) by mailgate1b.savvis.net (Postfix) with ESMTP id 796593BE55; Mon, 18 Dec 2006 11:57:28 -0600 (CST) Message-ID: <4586D687.80009@savvis.net> Date: Mon, 18 Dec 2006 09:57:27 -0800 From: Maksim Yevmenkin User-Agent: Thunderbird 1.5.0.5 (X11/20060906) MIME-Version: 1.0 To: Volodymyr Kostyrko References: <45829312.1050507@synergetica.dn.ua> In-Reply-To: <45829312.1050507@synergetica.dn.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-bluetooth@freebsd.org Subject: Re: USB ISSCBTA dongle 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:55:39 -0000 Volodymyr, > Dec 15 13:47:41 blade kernel: ubt0: vendor 0x1131 ISSCBTA, rev > 1.10/3.73, addr 2 > Dec 15 13:47:41 blade kernel: ubt0: vendor 0x1131 ISSCBTA, rev > 1.10/3.73, addr 2 > Dec 15 13:47:41 blade kernel: ubt0: Interface 0 endpoints: > interrupt=0x81, bulk-in=0x82, bulk-out=0x2 > Dec 15 13:47:41 blade kernel: ubt0: Interface 1 (alt.config 5) > endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, > buffer size=294 > Dec 15 13:47:47 blade kernel: ng_hci_process_command_timeout: ubt0hci - > unable to complete HCI command OGF=0x3, OCF=0x3. Timeout > Dec 15 13:47:48 blade root: /etc/rc.d/bluetooth: ERROR: Unable to setup > Bluetooth stack for device ubt0 hmm... strange... it should work. the very first device initialization command (reset) is failing (timeout). you could try to comment ${hccontrol} -n ${dev}hci reset \ > /dev/null 2>&1 || return 1 in the /etc/rc.d/bluetooth and see if this helps (btw, you need to unplug and re-plug the device after that). if this does not help, then i would suspect some sort of usb problem. [...] > I would like to help debugging this problem if someone is up to that. > Anyone? :) > > PS: Maybe there's a better code for that at 7-CURRENT? no, the code is pretty much the same. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Mon Dec 18 21:11:39 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 C7D0516A412 for ; Mon, 18 Dec 2006 21:11:39 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smtp-out3.tiscali.nl (smtp-out3.tiscali.nl [195.241.79.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id E046B43CA4 for ; Mon, 18 Dec 2006 21:10:39 +0000 (GMT) (envelope-from ronald-freebsd8@klop.yi.org) Received: from [82.171.39.195] (helo=guido.klop.ws) by smtp-out3.tiscali.nl with smtp (Tiscali http://www.tiscali.nl) id 1GwNrA-0003TG-VB for ; Mon, 18 Dec 2006 20:09:00 +0100 Received: (qmail 1721 invoked from network); 18 Dec 2006 19:09:00 -0000 Received: from localhost.thuis.klop.ws (HELO guido.klop.ws) (127.0.0.1) by localhost.thuis.klop.ws with SMTP; 18 Dec 2006 19:09:00 -0000 Date: Mon, 18 Dec 2006 20:08:59 +0100 To: freebsd-bluetooth@freebsd.org From: "Ronald Klop" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.02 (FreeBSD) Subject: load_kld in bthidd missing in 6-STABLE 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 21:11:39 -0000 Hello, On FreeBSD 6-STABLE (30 nov 2006) /etc/rc.d/bthidd calls the function load_kld. This function does not exist. If I do load the modules manually it does work. Ronald. -- Ronald Klop Amsterdam, The Netherlands From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 19 03:09:33 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 0DF4016A40F for ; Tue, 19 Dec 2006 03:09:33 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7876D43CA0 for ; Tue, 19 Dec 2006 03:09:32 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1GwQhh-00041W-FR; Mon, 18 Dec 2006 22:11:29 +0000 Received: (nullmailer pid 815 invoked by uid 1000); Mon, 18 Dec 2006 22:07:57 -0000 Date: Mon, 18 Dec 2006 22:07:57 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <4586D687.80009@savvis.net> References: <45829312.1050507@synergetica.dn.ua> <4586D687.80009@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1166479677.854098.1591.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org, Volodymyr Kostyrko Subject: Re: USB ISSCBTA dongle 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, 19 Dec 2006 03:09:33 -0000 On Mon, 18 Dec 2006, Maksim Yevmenkin wrote: > hmm... strange... it should work. the very first device initialization command > (reset) is failing (timeout). > > you could try to comment > > ${hccontrol} -n ${dev}hci reset \ > > /dev/null 2>&1 || return 1 > > in the /etc/rc.d/bluetooth and see if this helps (btw, you need to unplug and > re-plug the device after that). if this does not help, then i would suspect > some sort of usb problem. By the way there was a very similar problem in NetBSD with Bluetooth USB (builtin) and EHCI controllers, something to do with the data toggle getting out of sync for short transfers I think - a fix was applied by Matthias Drochner to ehci.c recently for that. iain From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 19 17:28:42 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 F069D16A40F for ; Tue, 19 Dec 2006 17:28:42 +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 8252743CA2 for ; Tue, 19 Dec 2006 17:28:42 +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 B18C53BE5E; Tue, 19 Dec 2006 11:28:41 -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 31499-01-72; Tue, 19 Dec 2006 11:28:41 -0600 (CST) Received: from [10.12.163.251] (unknown [10.12.163.251]) by mailgate1b.savvis.net (Postfix) with ESMTP id 4C7103BE24; Tue, 19 Dec 2006 11:28:41 -0600 (CST) Message-ID: <45882148.6060803@savvis.net> Date: Tue, 19 Dec 2006 09:28:40 -0800 From: Maksim Yevmenkin User-Agent: Thunderbird 1.5.0.5 (X11/20060906) MIME-Version: 1.0 To: yar@freebsd.org References: In-Reply-To: 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, Ronald Klop Subject: Re: load_kld in bthidd missing in 6-STABLE 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, 19 Dec 2006 17:28:43 -0000 Yar, Ronald Klop wrote: > Hello, > > On FreeBSD 6-STABLE (30 nov 2006) /etc/rc.d/bthidd calls the function > load_kld. This function does not exist. > If I do load the modules manually it does work. would it be possible to mfc == Revision 1.59 / (download) - annotate - [select for diffs], Wed Jun 21 09:42:55 2006 UTC (5 months, 4 weeks ago) by yar Branch: MAIN Changes since 1.58: +39 -0 lines Diff to previous 1.58 (colored) Quite a number of rc.d scripts try to load kernel modules. Many of them do that conditionally depending on kldstat. The code is duplicated all over, but bugs can be uniqie. To make the things more consistent, introduce a new rc.subr function, load_kld, which takes care of loading a kernel module conditionally. (Found this lying for a while in my p4 branch for various hacks.) == into releng_6? or should i just fix bthidd(8) rc script? thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Dec 20 17:20:44 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 CA91016A417 for ; Wed, 20 Dec 2006 17:20:44 +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 764C443CBB for ; Wed, 20 Dec 2006 17:20:31 +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 780C53BE88; Wed, 20 Dec 2006 11:20:30 -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 26109-02-48; Wed, 20 Dec 2006 11:20:30 -0600 (CST) Received: from [10.12.163.251] (unknown [10.12.163.251]) by mailgate1b.savvis.net (Postfix) with ESMTP id 1E96C3BE25; Wed, 20 Dec 2006 11:20:29 -0600 (CST) Message-ID: <458970DD.1060306@savvis.net> Date: Wed, 20 Dec 2006 09:20:29 -0800 From: Maksim Yevmenkin User-Agent: Thunderbird 1.5.0.5 (X11/20060906) MIME-Version: 1.0 To: Ronald Klop References: In-Reply-To: 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: load_kld in bthidd missing in 6-STABLE 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: Wed, 20 Dec 2006 17:20:44 -0000 Ronald Klop wrote: > Hello, > > On FreeBSD 6-STABLE (30 nov 2006) /etc/rc.d/bthidd calls the function > load_kld. This function does not exist. > If I do load the modules manually it does work. yar@ has mfc'ed load_kld() into releng_6. thanks for the report. max From owner-freebsd-bluetooth@FreeBSD.ORG Sat Dec 23 18:57:52 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 444A216A407 for ; Sat, 23 Dec 2006 18:57:52 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smtp-out1.tiscali.nl (smtp-out1.tiscali.nl [195.241.79.176]) by mx1.freebsd.org (Postfix) with ESMTP id 10D2313C457 for ; Sat, 23 Dec 2006 18:57:51 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from [82.171.39.195] (helo=guido.klop.ws) by smtp-out1.tiscali.nl with smtp (Tiscali http://www.tiscali.nl) id 1GyAWN-00070V-G5 for ; Sat, 23 Dec 2006 18:18:55 +0100 Received: (qmail 1059 invoked from network); 23 Dec 2006 17:18:53 -0000 Received: from localhost.thuis.klop.ws (HELO guido.klop.ws) (127.0.0.1) by localhost.thuis.klop.ws with SMTP; 23 Dec 2006 17:18:53 -0000 To: "Maksim Yevmenkin" From: "Ronald Klop" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 References: <458970DD.1060306@savvis.net> Content-Transfer-Encoding: 7bit Date: Sat, 23 Dec 2006 18:18:52 +0100 Message-ID: In-Reply-To: <458970DD.1060306@savvis.net> User-Agent: Opera Mail/9.02 (FreeBSD) Cc: freebsd-bluetooth@freebsd.org Subject: Re: load_kld in bthidd missing in 6-STABLE 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: Sat, 23 Dec 2006 18:57:52 -0000 On Wed, 20 Dec 2006 18:20:29 +0100, Maksim Yevmenkin wrote: > Ronald Klop wrote: >> Hello, >> On FreeBSD 6-STABLE (30 nov 2006) /etc/rc.d/bthidd calls the function >> load_kld. This function does not exist. >> If I do load the modules manually it does work. > > yar@ has mfc'ed load_kld() into releng_6. > > thanks for the report. > > max Thanks for fixing this so quickly. -- Ronald Klop Amsterdam, The Netherlands