Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Wiimote on Android 4.2

OP vowywowy

4th December 2012, 11:54 PM   |  #1  
vowywowy's Avatar
OP Member
Flag Oshawa
Thanks Meter: 11
 
90 posts
Join Date:Joined: Apr 2011
More
I think I have found a way to connect a wiimote to 4.2 devices like the Nexus 10, but I need some help. In the Bluetooth menu off 4.2 you are able to find the wiimote and then it asks you for the PIN. Now here lies the problem: What is the PIN for the wiimote? Well I know a way to solve the PIN but I am not skilled enough to actually solve it. Allow me to elaborate below

1. Download the App: https://play.google.com/store/apps/d...toothmacfinder it will allow to find the wiimotes MAC address. Mine is: 00:19:1D:C2:25:CF yours will be different.

THIS IS WHERE I NEED HELP! I HAVE NO IDEA HOW TO ACTUALLY CALCULATE THE PIN! I AM NOT KNOWLEDGEABLE IN C AND HAVE NO CLUE WHAT THE OUTPUT OF THE CODE WILL BE!
2. Use this method to calculate the PIN of your Wiimote:
Lets assume my Wiimote is being used and has the bluetooth address "00:19:1D:C2:25:CF". If you want the PIN for bluetooth pairing in a simple string, do the following(This is 'C' code):

char pin[6];
pin[0] = 0x00;
pin[1] = 0x19;
pin[2] = 0x1D;
pin[3] = 0xC2;
pin[4] = 0x25;
pin[5] = 0xCF;

Now "pin" contains your bluetooth pin that should be used for pairing your devices.

I HAVE NOT MADE IT TO THIS STAGE YET AND WOULD LIKE TO TEST IT!
3. Press the the red 'sync' button on the back of the Wiimote and then search for devices on your android device. When the Wiimote shows up, tap on it and enter the PIN you received from the 'C' code earlier.
I only assume that this would connect the Wiimote as an ambient bluetooth device.

4. Now install Wiimote Controller App (THIS IS JUST FOR THE WIIMOTE IME SO THAT THE INPUTS ARE RECOGNIZED BY EMULATORS AND OTHER APPS): https://play.google.com/store/apps/d...2VBbmRyb2lkIl0

5. Now you can use the Wiimote as you did before on your pre-4.2 devices

***NOTE: THIS IS NOT GUARANTEED TO WORK! AS STATED EARLIER I NEED HELP DECIPHERING THE WIIMOTE'S PIN!
18th December 2012, 03:21 AM   |  #2  
ansysic's Avatar
Member
Flag Germany
Thanks Meter: 54
 
99 posts
Join Date:Joined: Nov 2009
More
Are you sure, that this function creates the PIN for the Wiimote? Haven't found a source for this, but would be interested just 4 fun.

Edit: found something but doesn't work for me: http://forum.wiibrew.org/read.php?11,6850

Quote:

--Found out wiimote mac address from "wiipair" (GUI version...this quoted the wiimote MAC as 23:53:81:81:02:05, whereas windows thinks its 05:02:81:81:53:23)
--Typed out "23 53 81 81 02 05" in notepad (maybe try reversing this depending on how you found out the wiimote MAC)
--Select all, copy, paste from notepad into hex editor ("HxD")
--Saved file from hex editor
--renamed hex editor file to have .txt extension
--opened this file in notepad
--select all, copy
--go to add bluetooth device
--hold 1+2 on the remote
--paste in pass code
--win

Additional info: http://wiibrew.org/wiki/Wiimote#Bluetooth_Pairing
Last edited by ansysic; 18th December 2012 at 03:59 AM.
19th December 2012, 12:25 AM   |  #3  
ansysic's Avatar
Member
Flag Germany
Thanks Meter: 54
 
99 posts
Join Date:Joined: Nov 2009
More
So, afaik now you don't need any pairing code, on windows 8 you leave it blank and it works.
27th December 2012, 08:35 PM   |  #4  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Dec 2012
Tried this (just converted straight from hex to ASCII values). Didn't work.
No passcode, 0000, & 1234 did not work either.

Anyone figured out a way to get Wiimotes working on 4.2.1?

Sent from my Nexus 10 using xda app-developers app
27th December 2012, 11:57 PM   |  #5  
Senior Member
Flag Orange County
Thanks Meter: 9
 
157 posts
Join Date:Joined: Jan 2011
More
Quote:
Originally Posted by NuclearFej

Tried this (just converted straight from hex to ASCII values). Didn't work.
No passcode, 0000, & 1234 did not work either.

Anyone figured out a way to get Wiimotes working on 4.2.1?

Sent from my Nexus 10 using xda app-developers app

I'm in the same boat. I've trid 0000 and 1234 but I don't think either one of these will work. From what I understand, each Wiimote's pin is unique and tied to the BT MAC address, hence the decode methods discussed.

I assume the OP was suggesting a method to decode the Wiimote pin using the BT MAC address to pair using the standard BT recovery method in Android's "Settings" menu. Similar to how you would pair a BT keyboard or a BT headset. Can the OP or anyone confirm if any of the methods used in this thread work with JB 4.2.1?
7th January 2013, 12:08 AM   |  #6  
Senior Member
Thanks Meter: 5
 
177 posts
Join Date:Joined: Oct 2009
More
Translating the MAC addresses to ASCII won't work for me, because all four of my wiimotes' MACs begin (or end!) with null.. (and so does the OP's, I just noticed). There's no ASCII character for the hex value 00...

More info: http://www.wiimoteproject.com/blueto...-wiimote-sync/

Why must Google mess with things? Oh yeah, because we keep demanding new stuff...
Last edited by b0dge; 7th January 2013 at 12:13 AM.
10th January 2013, 06:38 PM   |  #7  
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Jan 2013
I'm next to useless in C programming but I believe a more complete version of that sample would be
Code:
#include <stdio.h>

int main(int argc, const char * argv[])
{

    // insert code here...
    char pin[6];
    pin[0] = 0x3A;
    pin[1] = 0xA1;
    pin[2] = 0x6F;
    pin[3] = 0x69;
    pin[4] = 0xA7;
    pin[5] = 0x64;
    printf(pin);
    return 0;
}
The main addition being printf which will print the contents of "pin". You can see the output if you compile and run it such as I've done at codepad.org/o1lpe4Kb

The problem of some values not converting properly remains unfortunately. The output should be 6 characters but a1 and a7 give funny output. a1 converts to i easily enough in most calculators but a7 is which I could see causing problems. The fact remains that some bytes in most bluetooth MACs cant be properly translated. At first, spoofing the device MAC seams like an easy fix and it may be on some devices however my rom doesn't seem to have any simple options to accomplish this. I have read some success stories based around entering the MAC hex values in a hex editor and then saving as a text; anyone who has had success with this method, please post your results so we might see exactly what the wiimote is looking for. If i continue researching this tomorrow, I'll be looking at /data/misc/bluedroid/btconfig.xml. This is the only file i could find which references my MAC address and it appears as though it includes device pairing info, my hope is that info can be manipulated to bypass the pairing helper.
18th January 2013, 01:21 PM   |  #8  
erikieperikie's Avatar
Senior Member
Flag Enschede
Thanks Meter: 33
 
124 posts
Join Date:Joined: Dec 2011
Donate to Me
More
I hope a solution is found. Pairing a Wiimote would open up the way to some really cool applications.
27th January 2013, 03:49 AM   |  #9  
Senior Member
Flag Toronto
Thanks Meter: 72
 
152 posts
Join Date:Joined: Nov 2005
Google supposedly changed something in the way that bluetooth functions as of 4.2.1 and this is causing your problem of the wiimote not connecting.

See here: http://forum.xda-developers.com/show...07&postcount=1
Last edited by bigbop; 27th January 2013 at 04:10 AM.
13th February 2013, 01:07 AM   |  #10  
Senior Member
Thanks Meter: 23
 
141 posts
Join Date:Joined: Mar 2010
So, I assume that there still is no solution for this? :/

Post Reply Subscribe to Thread
Previous Thread Next Thread