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
September 20, 2010 02:29PM
Re: Use android device as remote for the WII
September 20, 2010 02:31PM
Re: Use android device as remote for the WII
September 20, 2010 02:36PM
Re: Use android device as remote for the WII
September 20, 2010 02:38PM
Re: Use android device as remote for the WII
September 21, 2010 02:40PM
Re: Use android device as remote for the WII
September 21, 2010 05:24PM
Re: Use android device as remote for the WII
September 21, 2010 05:48PM
Re: Use android device as remote for the WII
September 21, 2010 06:05PM
Re: Use android device as remote for the WII
September 21, 2010 06:09PM
Re: Use android device as remote for the WII
September 21, 2010 06:57PM
Re: Use android device as remote for the WII
September 21, 2010 09:41PM
Re: Use android device as remote for the WII
September 22, 2010 03:56PM
Really looking forward to what you find.

The Android API (the private stuff) is already using JNI to talk to bluez and hits the permission denied error. I'm going to assume their native code is correct (I couldn't do any better!). Afterall, it works for RFCOMM. And if there was a problem with their code, you would think it would throw a different error. Permission denied seems to me like the syntax was correct, but something in bluez just didn't allow it.

I found another guy who wrote an article on Android and JNI and he also talks about L2CAP. I posted a comment to see if he has any ideas.
Re: Use android device as remote for the WII
September 23, 2010 01:24PM
Re: Use android device as remote for the WII
September 23, 2010 03:57PM
Re: Use android device as remote for the WII
October 09, 2010 10:31AM
Was really occupied the last weeks.
I am looking into patching the kernel to get l2cap socket bind ability now. Will tell my results as soon I have some new information.
Re: Use android device as remote for the WII
October 11, 2010 01:46PM
Re: Use android device as remote for the WII
December 06, 2010 07:36PM
Re: Use android device as remote for the WII
December 07, 2010 03:42PM
Re: Use android device as remote for the WII
December 07, 2010 04:55PM
Hey Felix, unfortunately right now we're stuck until we get better low level support for L2CAP, which will hopfeully come with 2.3. I was able to duplicate (rather crudely) the functionality of Ryan's app. So I am able to connect to a Wiimote from an Android phone and I can track buttons states, manipulate the lights, make it rumble, etc. I was hoping that using an Android device as a Wiimote would be as simple as reversing the process. But it's not, due to the fact that I can not open up L2CAP server sockets without getting permission denied errors coming from low level JNI, even on a rooted phone and even after making some modifications to various system files. But even if we successfully got the sockets open and listening, there is still the issue of VID and PID. rikmer has a potential fix for this earlier in this thread. Then we have to duplicate the SDP record(s) for a Wiimote. I think I found a way to do this, also documented earlier in this thread. But all of these fixes are probably going to require a rooted device and this is all dependent on 2.3 actually having what we need. We have a long way to go! :)

I have an idea of what to do once the connection is established. WiiBrew has great documentation on the Wiimote bluetooth spec. My goal was to start out getting just the D-pad and standard buttons working. Then work on the accelerometer. The IR camera was the last thing on my list, but I have verified that my device's camera can see the IR lights in the sensor bar. Although I think using the backside of a phone to point at the sensor bar is just going to be really awkward. Of course I don't know how practical this whole idea even is to begin with! :) I don't see an Android device being a very good substitute for a Wiimote when precise button presses are critical in a game. This was more just a fun project to gain experience with Android development. But who knows.....it might work really well...

Just keep following this topic and as soon as a custom 2.3 ROM comes out for my Droid, I'm going to dust this whole project off and try again. Not getting my hopes up though...
Re: Use android device as remote for the WII
December 07, 2010 07:35PM
Sorry, only registered users may post in this forum.

Click here to login