Welcome! Log In Create A New Profile Wiibrew Wiki HackMii Blog

Advanced

Use android device as remote for the WII

Posted by rikmer 
Re: Use android device as remote for the WII
April 16, 2011 09:02PM
Nice!!! That is some awesome detective work rikmer! But these kernels are device specific correct? When you say "mainline kernel", do you mean for the Desire? Or for stock Android? I'm not very familiar with all this really low level OS stuff. I guess I'm just trying to figure out what to do with this new info. Do I need to find someone who can compile me a custom Droid kernel?
Re: Use android device as remote for the WII
April 16, 2011 09:08PM
Great news :-)
I'm reinstalling Ubuntu at the moment to get it work on the Blade.

Edit: Greg, you need either someone who can do this for you or a Linux distribution, some time to download the kernel source and little skills in using a command line.



Edited 1 time(s). Last edit at 04/16/2011 09:11PM by FelixL.
Re: Use android device as remote for the WII
April 16, 2011 09:15PM
Re: Use android device as remote for the WII
April 18, 2011 12:27PM
Just for the info: Test App also works on HTC Desire with Android 2.2 Stock Sense.

Also found something in the bluez stack which could be the problem. It is in btio.c in function l2cap_bind(). In Android stock bluez implementaion it reads:

static int l2cap_bind(int sock, const bdaddr_t *src, uint16_t psm, GError **err)
255 {
256 struct sockaddr_l2 addr;
257
258 memset(&addr, 0, sizeof(addr));
259 addr.l2_family = AF_BLUETOOTH;
260 bacpy(&addr.l2_bdaddr, src);
261 addr.l2_psm = htobs(psm);
262
263 if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
264 ERROR_FAILED(err, "l2cap_bind", errno);
265 return -1;
266 }
267
268 return 0;
269 }

and in HTC Desire bluez:

static int l2cap_bind(int sock, const bdaddr_t *src, uint16_t psm)
{
struct sockaddr_l2 addr;

memset(&addr, 0, sizeof(addr));
addr.l2_family = AF_BLUETOOTH;
bacpy(&addr.l2_bdaddr, src);
addr.l2_psm = htobs(psm);

return bind(sock, (struct sockaddr *) &addr, sizeof(addr));
}

I have communicated my findings to thalamus_ and am waiting for his opinion.

The thing is that even if this is the problem that it will depend on the mobile producer if it is implemented. So the easier way will always be through the kernel because this part is much more comfortable to exchange, if the mobile is rooted.

The chance that Google will change this part is, I suppose, rather small. But I could be wrong. At least we should try to contact them an tell them about.

Before anything we have to wait if the this change will produce the wanted behavior.



Edited 1 time(s). Last edit at 04/18/2011 01:21PM by rikmer.
Re: Use android device as remote for the WII
May 13, 2011 08:35PM
Anything new?
I have tried to compile the kernel for the Blade, but didn't work, CM7 was no problem to compile, but has a prebuilt kernel. I will ask some guy from the UK for help this weekend.
Re: Use android device as remote for the WII
May 13, 2011 11:40PM
Not much new on this end. I tried the test app on my Xoom, didn't work there either. Not a surprise.
Re: Use android device as remote for the WII
May 14, 2011 11:56AM
Did you update your Xoom to 3.1 yet? And did you read my email concerning the source-code off the test app?
Thanks!
Re: Use android device as remote for the WII
May 25, 2011 06:36PM
Hi,

I tried to open the L2CAP Server Socket with Reflections. (I have HTC Desire) :

Class ss_class = Class.forName("android.bluetooth.BluetoothServerSocket");

Constructor ss_constructor = ss_class.getDeclaredConstructor(int.class, boolean.class, boolean.class, int.class);

ss_constructor.setAccessible(true);

BluetoothServerSocket serverSocket = (BluetoothServerSocket) ss_constructor.newInstance(3, false, false, 12);

Log.v(TAG, "ServerSocket is null: " + (serverSocket != null));

while(running){

BluetoothSocket socket = serverSocket.accept();
}

...

Howerver, bindListen doesn't throw the acception, but serverSocket.accept() does....

Somehting more, as I was browsing the bluez code I saw this thing:

if (type == BT_IO_L2RAW) {
g_set_error(err, BT_IO_ERROR, BT_IO_ERROR_INVALID_ARGS,
"Server L2CAP RAW sockets not supported");
return NULL;
}

in ../external/bluetooth/bluez/src/btio.c : Line 1264

So, Greg, are you sure you opened the L2Cap ServerSocket !?!!?
Re: Use android device as remote for the WII
May 31, 2011 06:33PM
Well, I created the socket and attempted to call bindListen(), that's as far as I ever get before an exception gets thrown. That brings up an interesting point though...if we do get bindListen() to work without throwing an error, the next problem we may encounter is calling accept().
Re: Use android device as remote for the WII
June 15, 2011 10:24PM
Hey Greg! Any new infos regarding the project. Always looking forward to help out.
Re: Use android device as remote for the WII
September 01, 2011 01:10AM
nope, nothing new. :) I was thinking about installing Linux and compiling me a custom Cyanogenmod kernel. no time right now, maybe when it gets colder. can't wait to pick things up again. don't worry rikmer, I know where to find you!
Re: Use android device as remote for the WII
September 01, 2011 05:56AM
I hope that IceCreamSandwich makes things easier :/

But great to hear that you guys are not going to give up!
Re: Use android device as remote for the WII
November 13, 2011 05:33AM
Is there an .apk that I can work with?
Re: Use android device as remote for the WII
February 20, 2012 04:25AM
For those keeping score, IceCreamSandwich did not improve the Bluetooth API. I've also tried the Bluetooth reflection hack on both my Xoom (4.0.3) and Galaxy Nexus (4.0.4). No luck. Here's looking forward to JellyBean! Or CM9 perhaps?

technologiclee - I did create an .apk, but it only tests a device to see if the Bluetooth reflection hack works on it.
Re: Use android device as remote for the WII
May 03, 2012 02:32AM
The real question is, why would you want to? Unless your plan is to use it like a faux Wii U, I don't see any point to it.
Re: Use android device as remote for the WII
May 03, 2012 03:37PM
Re: Use android device as remote for the WII
July 28, 2012 04:14AM
Re: Use android device as remote for the WII
July 28, 2012 11:41AM
Re: Use android device as remote for the WII
December 29, 2012 05:34AM
Re: Use android device as remote for the WII
February 05, 2013 12:39PM
hey u guys if u use an alcatlel v455 it will work and maybe some other phones and the wii remote sends info to the wii and the wii sends info to the wii remote so you can use a phone but not an android



Edited 1 time(s). Last edit at 02/05/2013 12:40PM by zakmiah984.
Sorry, only registered users may post in this forum.

Click here to login