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.by Greg - Hardware
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!by Greg - Hardware
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().by Greg - Hardware
Not much new on this end. I tried the test app on my Xoom, didn't work there either. Not a surprise.by Greg - Hardware
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?by Greg - Hardware
The Nexus One not working is not surprising. That is a Google Experience device and HTC probably did not do anything custom. Interesting pattern has emerged though, HTC's customizations seem to make a difference. I have access to a Droid Eris, I'm going to try the test app on that device and see what happens. Thanks for the update Felix!by Greg - Hardware
Sorry guys, I just realized all the private messages you've been sending me have been sitting in my wiibrew inbox. I guess there is no email notification, or the emails are getting swallowed. Anyways, I'll send out that test app later today! -Gregby Greg - Hardware
I have tried a variety of ROMs, including a nightly build of CM7. The only device that did not throw an exception on binding the server socket was a stock Evo 4G. Surprising considering that HTC devices are supposed to have crappy bluetooth support. Of course all my test all does is open and bind the socket. I have yet to make a connection to the Wii. And since the Evo was not mine, I canby Greg - Hardware
I created a simple test app that should determine whether a device can at least open up an L2CAP server socket. It is currently failing for me. But I don't have Gingerbread on my Droid yet. Just waiting for CM7 to be stable. But I do know someone who has it installed so I can send the app to them and see what happens. If anyone else wants a copy of the test app, send me a private messby Greg - Hardware
QuoteFelixLIsn't this what we need? Not specifically, but any change to the bluetooth stack can only help.by Greg - Hardware
I've only tested with a rooted Droid. Radu Motisan was helping me out over on and was testing with a G1. I don't recall which device rikmer was using. I've heard that HTC devices have poor bluetooth implementations, that's too bad. Maybe 2.3 will fix them as well.by Greg - Hardware
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 asby Greg - Hardware
Android 2.3 may be just what we have been waiting for. According to , Gingerbread has a new BlueZ stack. Unfortunately bluetooth is not supported on the emulator, but I'll be trying this as soon as I can get my hands on a 2.3 device!by Greg - Hardware
You just don't give up do you? :) I've been over on this forum, , trying to get some answers. But it seems that L2CAP server sockets stopped working around Android 1.5. Still waiting for more info...by Greg - Hardware
QuoterikmerOne question. When you tried to bind the L2CAP socket did you do it as root? As far as I understand you didnt ... or am I wrong. I think it is possible to grant the function which binds the socket su rights. No, I was not root when calling the bindListenNative() function. The problem is, you request root by executing "su" as an external process. But you only have root access withiby Greg - Hardware
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 toby Greg - Hardware
QuoterikmerManaged to change device class by using "hciconfig hci0 class 0x002504". A good thing is that this is reverted if you reboot the phone. That's cool. Wonder if you can change VID and PID that way too? Are you sure you had to reboot? Can you just power down bluetooth and power it back up? That seemed to do the trick to revert the SD database. QuoterikmerIs there a way to opby Greg - Hardware
I had another setback last night. I was looking through the Android source code again to make sure I wasn't missing something and I found something pretty significant. Let me explain by backing up a bit. The public Android API currently does not support L2CAP sockets, which is what is going to be required to pull this whole thing off. There is currently an open issue, , but it is not sby Greg - Hardware
QuoterikmerTested it with the modified main.conf and added WIIMOTE sdp service but regretfully again no connection. Damn. How did you test it? Are you opening up an L2CAP server socket and waiting for an incoming connection?by Greg - Hardware
QuoteAxelMaybe it is time to move this thread to a more appropriate forum such as Coding. This definitely does not belong to Getting Started anymore :) Ha! Agreed. :)by Greg - Hardware
QuoterikmerAs far as I know you can change the DeviceID which consists of the VID and PID in the main.conf of the bluetooth settings under /system/etc/bluetooth . Oh man, that would be horrible if you had to do that to make it work. It would kill any chances of your app being successful in the Android Market. Who would want to do that to their phone? Requiring root is bad enough...but needinby Greg - Hardware
This is so funny. When executing the sdptool command in a terminal emulator, the help page says you can add a WIIMOTE service to the database. So I tried this command: sdptool add WIIMOTE And it registered my phone as a Nintendo RVL-CNT-01 with all the attributes that a real remote advertises! However, the Wii still will not connect! :( So frustrating!by Greg - Hardware
Hmm, didn't notice these other posts until just now... QuoterikmerI found something on http://wiki.wiimoteproject.com. I dont know if this will help but ... Name Nintendo RVL-CNT-01 Vendor ID 0x057e Product ID 0x0306 this is what the wiimote is sending. Also this http://wiki.wiimoteproject.com/Bluetooth_Specs could be helpful. I will try some things and report if anything nby Greg - Hardware
QuoterikmerPerhaps I am completely wrong but wouldnt it be possible to add services manually with sdptools when rooted. That is certainly an option. I was hoping to a find a back door that did not require being rooted. But I'm out of ideas. I've run a couple tests and I am able to execute sdptool as root. Now to figure out just the right commands to add a record with all the attriby Greg - Hardware
I think I know what's wrong. Before the Wii connects to the remote, it uses SDP to determine the services provided by the device. So, even though I've opened up both L2CAP sockets to listen for connections, I am not updating my phone's SD database with the appropriate info. The Android API (even the private API) does not support adding L2CAP entries to SD. I'm thinking theby Greg - Hardware
QuoterikmerHave you tried to use hcidump from the bluez project. I found a reference to that in the homebrew wiki ( http://wiibrew.org/wiki/Wiimote/Library ) under requests. But as it is still a request, perhaps it is not that easy to do so. I also will try to analyse the data which the wiimote is sending while connecting. I will tell you my results if I get some interesting information. No, Iby Greg - Hardware
QuoterikmerVery interesting. Is there any way I could help you? Please let me know every news you got. Without knowing what the Wii is looking for when discovering devices, its going to be tough to simulate a remote. For all I know the Wii will only connect to devices with a very specific bluetooth chip. If I could only get the Wii to initiate the connection, then I think it would be no problby Greg - Hardware
I've been researching this topic for about a month now. The biggest hurdle I'm currently trying to overcome is the fact that I can not trick the Wii into connecting to my Android phone. I changed my bluetooth device name to "Nintendo RVL-CNT-01" and opened what I think are the correct sockets that listen for incoming connections. I then make my phone discoverable and press the sync bby Greg - Hardware