Return-Path: MIME-Version: 1.0 In-Reply-To: References: <5050F5A9.5090401@butterbrot.org> Date: Thu, 13 Sep 2012 16:39:00 +0200 Message-ID: Subject: Re: Wii Balance Board vs. bluez From: David Herrmann To: Florian Echtler Cc: linux-bluetooth@vger.kernel.org Content-Type: multipart/mixed; boundary=20cf301fb653a25cee04c99644da Sender: linux-bluetooth-owner@vger.kernel.org List-ID: --20cf301fb653a25cee04c99644da Content-Type: text/plain; charset=ISO-8859-1 On Thu, Sep 13, 2012 at 4:38 PM, David Herrmann wrote: > Hi Florian > > On Thu, Sep 13, 2012 at 7:59 AM, Florian Echtler wrote: >> >> >> David Herrmann wrote: >>>However, if you are willing to test it, I will send some patches which >>>will implement it. >> Absolutely, I'd be happy to test. > > Please see the appended patch. You have to apply it to your kernel > tree and recompile the hid-wiimote driver. No other sources are > changed so you don't need to reboot or install the new kernel. Just > install the new hid-wiimote.ko module. > > One of the 5 input devices should then report the wiimote weight > sensor data. (the input device with name "Wii Remote Balance Board"). Forgot to attach the patch... Here it is. --20cf301fb653a25cee04c99644da Content-Type: application/octet-stream; name="wiimote_balance_board.patch" Content-Disposition: attachment; filename="wiimote_balance_board.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h71yu8e70 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvaGlkL2hpZC13aWltb3RlLWV4dC5jIGIvZHJpdmVycy9oaWQv aGlkLXdpaW1vdGUtZXh0LmMKaW5kZXggZDM3Y2QwOS4uYWU3YzFiNiAxMDA2NDQKLS0tIGEvZHJp dmVycy9oaWQvaGlkLXdpaW1vdGUtZXh0LmMKKysrIGIvZHJpdmVycy9oaWQvaGlkLXdpaW1vdGUt ZXh0LmMKQEAgLTM0LDYgKzM0LDcgQEAgZW51bSB3aWlleHRfdHlwZSB7CiAJV0lJRVhUX05PTkUs CQkvKiBwbGFjZWhvbGRlciAqLwogCVdJSUVYVF9DTEFTU0lDLAkJLyogTmludGVuZG8gY2xhc3Np YyBjb250cm9sbGVyICovC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