there are other posts about the Wiimote pairing, but none of the answers helped me, most of them are form ubuntu 12.10 and ubuntu 10.04 soe they are pretty old. the question is that Wiimote should be paired without any code, but the option to pair without entering a code is there any-more. is there a way to manually pair the wiimote without any GUI? maybe via config file or something like that?
3 Answers
Using the standard Ubuntu bluetooth GUI, the solution is not to use the 1+2 button method, but to use the sync button behind the wiimote, you can setup the wiimote without pairing, the wiimote will remain recognized but apparently unpaired (no lights in the wiimote), and then you can "activate" the wiimote from the GUI and press again the "sync" button, now it will remain paired (without inputting a pair-code) one of the single LEDs will remain on (it will not rumble though)
then with the "+" "-" buttons you can control the volume of Ubuntu, and with the dpad you can move the focus on whatever is selected according to the direction you press amongst other things, so the wiimote is active and working, now you're set! :)
- 21
- 1
- 1
- 4
You asked for a no GUI way
Install Xwiimote
sudo apt-get install xwiimote
Basic set up from the official documentation
Connecting Wii Remotes
To connect a Wii Remote to your host be sure that the official linux Bluetooth stack (BlueZ) is installed on your system and your kernel has the hid-wiimote kernel plugin loaded. Then connect your Wii Remote like any other Bluetooth device. The system log (dmesg) should print some messages about the new connected device. The Wii Remote can be put into discoverable mode by pressing the red sync-button behind the battery cover on the back. The Wii Remote will stay in discoverable mode for 20s. You can also hold the 1+2 buttons to put the Wii Remote into discoverable state. However, the first method works more reliably! If you are asked for PIN input while bonding the devices, then your BlueZ bluetoothd daemon does not include the wiimote plugin. See Bugs below for more information. If this does not help, you can still connect to your Wii Remote without pairing/bonding (i.e. not using authentication with a PIN). This should work with any BlueZ version.
If you would like to try a GUI, try cwiid
This is the basic set up from the official documentation, you can go there for more detail, last edited 2015-09-02
First install cwiid and dependencies
sudo apt-get install libcwiid1 lswm wmgui wminput
Run the GUI
wmgui
Select "connect" from the file menu, press 1+2 when prompted then OK. Lights and rumble can be turned on and off from the controls menu, and which inputs are displayed from the settings menu. Using this, you can test the IR camera, the accelerometers and check the inputs from the Nunchuck or Classic Controller.
Next up is the mouse "emulator" which allows you to control the mouse with the Wiimote. At this point, it can be run with default settings (tilting the Wiimote moves the pointer, A and B work as left and right click).
The uinput module needs to be loaded into the kernal first. This can either be done manually after every reboot:
sudo modprobe uinputor uinput can be put into /etc/modules:
gksudo gedit /etc/modulesMine looks like this:
# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. lp uinput
- 18,289
- 19
- 78
- 113
-
could it be that the Bluez in the Kernel image from Ubuntu 15:10 still doesn't include the plug-in for the wiimote? – user1782407 Dec 04 '15 at 16:15
-
There github page says it is included in kernel 3.1+ and bluez 4.101+, 15.10 ships with kernel 4.2 which includes the hid-wiimote driver, but you may need to activate it with ` modprobe hid-wiimote`, so guess one ships with the kernel but is not active. https://dvdhrm.github.io/xwiimote/ – Mark Kirby Dec 04 '15 at 16:28
-
even with `$ modprobe hid-wiimote`the bluetooth manager GUI still asks me for a pair code, is there a way to force bluez pairing a device via terminal? – user1782407 Dec 05 '15 at 09:28
-
The docs say it is a bug in the detection and you must manually set no pin. Click the Bluetooth icon in the menu bar and select Set Up New Device. Make the wiimote discoverable and press continue, now you should see your deceive and be able to choose `pin options`, set none here and then continue. I don't have a bluetooth here to test, so its a bit vague, sorry, but this setting is taken from this guide step 4 https://help.ubuntu.com/stable/ubuntu-help/bluetooth-connect-device.html – Mark Kirby Dec 05 '15 at 09:50
-
yes, the wiimote connects but doesn't pair and that is because the GUI always asks for a pair code, without the pairing the wiimote disconnects after seconds. One can see it in the `$ dmesg` where the wiimote autoromeves itself – user1782407 Dec 05 '15 at 10:17
-
Good find, it says `If connecting by holding down the 1+2 buttons, the PIN is the bluetooth address of the wiimote backwards, if connecting by pressing the "sync" button on the back of the wiimote, then the PIN is the bluetooth address of the host backwards` That should get you going again ? – Mark Kirby Dec 05 '15 at 10:32
-
yes, but it says the following: `The PIN-Code is the binary bluetooth address of the wiimote backwards.` and it supplies a c code for finding out this binary code: do you know how to print that code to a readable form? – user1782407 Dec 05 '15 at 13:24
-
I've done the following: `#include
int main(void) { char pin[6]; pin[0] = 0x41; pin[1] = 0x7D; pin[2] = 0x5D; pin[3] = 0x8A; pin[4] = 0xD2; pin[5] = 0x40; printf("the password is:\n"); printf("%s \n", pin ); }` but all I get are strange characters as an answer (obviously I don't know how to print the "pin" char correctly) – user1782407 Dec 05 '15 at 14:15 -
Sorry for late reply, had to go to work. If I run this code in terminal I get same as you (don't run C in terminal, compile it) but when I compile the code as an executable and run it, I get A}]��@ as the result, was expecting numbers but this is 6 char long string, I don't know how you would enter the � symbol, can you copy paste it ? If not try to replace it with a ?. – Mark Kirby Dec 07 '15 at 09:46
-
no, I do compile that code, only that it seems that printing the char that way isn't the correct way to print it. – user1782407 Dec 08 '15 at 08:39
-
also, I tried to convert those hex numbers to digits via some web-based conversion methods and some of them seeem to be greater than 9 (therefore not elegible as pair code (that should be only a six number code) I get the same strange characters as you do: "A}]��@" – user1782407 Dec 08 '15 at 08:49
-
I asked about this on stack overflow, they say the output is correct but 0x8A and 0xD2 are not valid ASCII characters, so output �, take a look http://stackoverflow.com/questions/34160235/c-code-to-extract-pairing-code-from-wiimote-strange-result How did you get that blue tooth address ? Seems it is not valid. – Mark Kirby Dec 09 '15 at 11:07
-
the MAC adress is valid, acording to extended ASCII 8D is a "?" and D2 is a "O" (it seems like a capital letter O reserved for a foreign language other than English) https://upload.wikimedia.org/wikipedia/commons/8/81/Table_ascii_extended.png I'll try to input the code according to all that info (even if it's not numbers) – user1782407 Dec 09 '15 at 14:32
-
this is the ANSI extended ASCII (for windows) in which D2 is a "Ò" but i can't find what 8D is (in all the tables with those codes i find the position of 8D missing any character (like they miss the drawing of the character) http://www.cplusplus.com/doc/ascii/ – user1782407 Dec 09 '15 at 14:46
-
this is the ANSI extended ASCII (for windows) in which D2 is a "Ò" but 8D is missing any character, in fact this version of "ansi extended ascii for winbdows" is called "ISO-latin1" now, acording to http://ascii-code.com/ 8C (the character before) is: "Œ" which is the logo in capitals of the now defunct "Communauté Européenne" so it might inform that the ASCII code is that old, so I'm beggining to think that 8D was a unregistered character (that's the reason of the "�" in that spot) – user1782407 Dec 09 '15 at 14:57
-
I mixed up it's not 8D but 8A and 8A = Š so it would be something like: "A}]ŠÒ@" but if I input this in the bluetooth GUI in order to pair the Wiimote it still doesn't work – user1782407 Dec 09 '15 at 15:01
-
Posted about the automàtic pairing issue in the github of the blueman people: https://github.com/blueman-project/blueman/issues/405 – user1782407 Dec 09 '15 at 15:31
-
now i got a successful connection! :) with the sync button, no pairing needed, at least it works, now ontro controlling the wiimote :) the solution just press the sync button behind the wiimote, forget about "setting the wiimote visible with 1+2" it doesn't work that way. – user1782407 Dec 09 '15 at 21:02
apparently there is a secundary way of doing it:
http://wiibrew.org/wiki/Wiimote#Bluetooth_Pairing
I haven't testested it yet
- 21
- 1
- 1
- 4