5,814,863 Members 48,818 Now Online
XDA Developers Android and Mobile Development Forum

Wiimote on Android 4.2

Tip us?
 
vowywowy
Old
#1  
vowywowy's Avatar
Member - OP
Thanks Meter 11
Posts: 90
Join Date: Apr 2011
Location: Oshawa
Default Wiimote on Android 4.2

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!
 
ansysic
Old
(Last edited by ansysic; 18th December 2012 at 02:59 AM.)
#2  
ansysic's Avatar
Member
Thanks Meter 53
Posts: 97
Join Date: Nov 2009
Location: Germany
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
iPhone 3GS
Galaxy S1
Galaxy S2
Galaxy Gio
Galaxy Nexus
Nexus 4
Galaxy S4
 
ansysic
Old
#3  
ansysic's Avatar
Member
Thanks Meter 53
Posts: 97
Join Date: Nov 2009
Location: Germany
So, afaik now you don't need any pairing code, on windows 8 you leave it blank and it works.
iPhone 3GS
Galaxy S1
Galaxy S2
Galaxy Gio
Galaxy Nexus
Nexus 4
Galaxy S4
 
NuclearFej
Old
#4  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: 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
 
ItsMeMasih
Old
#5  
Senior Member
Thanks Meter 7
Posts: 144
Join Date: Jan 2011
Location: Orange County
Quote:
Originally Posted by NuclearFej View Post
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?
 
b0dge
Old
(Last edited by b0dge; 6th January 2013 at 11:13 PM.)
#6  
Senior Member
Thanks Meter 5
Posts: 177
Join Date: Oct 2009
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...
 
dnabiker
Old
#7  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: 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.
 
erikieperikie
Old
#8  
erikieperikie's Avatar
Senior Member
Thanks Meter 33
Posts: 120
Join Date: Dec 2011
Location: Enschede

 
DONATE TO ME
I hope a solution is found. Pairing a Wiimote would open up the way to some really cool applications.
 
Phone History



Phone
OnePlus One
Code:
PRODUCT_NAME       {bacon}
VARIANT            {64GB Sandstone}
LOCK STATE         {unlocked}
RECOVERY           {TWRP 2.8.0.1}
ROM                {CM11S}
ROOT STATUS        {YES}
Other
Asus Nexus 7˛°ął 32GB
 
bigbop
Old
(Last edited by bigbop; 27th January 2013 at 03:10 AM.)
#9  
Senior Member
Thanks Meter 71
Posts: 152
Join Date: Nov 2005
Location: Toronto
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
 
jpde
Old
#10  
Senior Member
Thanks Meter 22
Posts: 138
Join Date: Mar 2010
So, I assume that there still is no solution for this? :/

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes