Hey Greg! Any new infos regarding the project. Always looking forward to help out.by rikmer - Hardware
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(&aby rikmer - Hardware
QuoteGregNice!!! 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 Droidby rikmer - Hardware
Consider this problem solved!!! After browsing the kernel source and writing an email to a guy at qualcomm who did a lot of the bluetooth programming ( I found his address directly in the .c files) a guy at xda-developers ( my personal hero now) named thalamus_ ( a lot of credits to him) compiled me a custom kernel with the appropriate changes to make this work. Here is the changelog https://gby rikmer - Hardware
Hey! I wonder if somebody has tried to test the app on a HTC Desire HD with CM7. If it won't work than we can be sure that it has something to do with some HTC customisation. Would be at least very interesting. I tested it on my HTC Desire with Oxygen 2.0.3 (custom Gingerbread ROM) and it didn't work. I also tried to install a RIL from the HTC Desire HD but it didn't change aby rikmer - Hardware
Hi Greg, good to hear that there is at least one device which throws no error. Could you please send me your test app and perhaps also your source code. I sent you a private message with my email address. so long ...by rikmer - Hardware
Hi Greg, I found a reference (http://code.google.com/p/android/issues/detail?id=719) to an app (http://d.hatena.ne.jp/esmasui/20100330/1269982062) which is supposed to apply a working workaround to bind L2CAP sockets. Also the whole sourcecode is provided. I am not that much into java programming that I understand it but perhaps you could have a look. Would be awesome if that would help our caby rikmer - Hardware
Hi Greg, have you tested the L2CAP socket bind on CM7 yet? I wonder if there are any differences. BRby rikmer - Hardware
Hi guys, I do have Android 2.3 "Gingerbread" on my HTC Desire now. So if there is some kind of test program available which tries to bind the L2CAP sockets I am ready to give it a try. I am very occupied at the moment, so I wont be able to participate as much as I like to, but I will try to find some time. Hopefully "Gingerbread" did the trick for us. BRby rikmer - Hardware
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.by rikmer - Hardware
One 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. Perhaps this helps => http://www.stealthcopter.com/blog/2010/01/android-requesting-root-access-in-your-app/ . Regarding possibilities to force allow bind to L2CAP I didnt find anything.by rikmer - Hardware
I will have a deeper look in configurability through config files and native commands. I will share my findings as soon as poossible. So far I found a statement in an issues tracker (http://code.google.com/p/android/issues/detail?id=719): L2CAP support is reachable on Android over the Java Native Interface without rooting your device. You can talk directly to bluez and create applications wby rikmer - Hardware
QuoteGregI 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 itby rikmer - Hardware
QuoteGreg How did you test it? Are you opening up an L2CAP server socket and waiting for an incoming connection? No I didnt open anything. Only modified the main.conf and added the service then switched the phone into detectable mode. My Laptop is connecting to it and accepts it as an input device. Is there a way to open L2CAP without coding it (if it is possible at all as you stated in the nby rikmer - Hardware
I have hacked a method from nachtschicht of xda developers to symlink main.conf to /data/data . You have to flash it through clockworkrecovery or something equal. I would advise backing up your system beforehand. Here is the link http://db.tt/p2VxwaK. I will try to connect to the wii this evening and will post my results. EDIT: Tested it with the modified main.conf and added WIIMOTE sdp serviby rikmer - Hardware
QuoteGregQuoterikmerAs 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...bby rikmer - 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 :) Secondby rikmer - Hardware
QuoteGreg I have changed my device name to Nintendo RVL-CNT-01. As far as the other values, I don't know how to set those on my device. I'm not even sure if they can be changed. I'm testing using a very simple experimental app on my rooted Moto Droid. The emulator won't work because it does not support Bluetooth. The app I wrote is not very polished and has zero errorby rikmer - Hardware
QuoteGregI 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 thiby rikmer - Hardware
One other question ... How do you test? Did you write an experimental app for android? Or do use an emulator? Or do you try to connect through linux, windows or mac? If you have some basic code I really like to look into it. Hopefully you or we will manage to connect to the WII. It would be awesome.by rikmer - Hardware
I 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 new evolves.by rikmer - Hardware
QuoteGreg 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 problem. So I guess that's what I need help with. :) Have you tried to use hcidump from thby rikmer - Hardware
QuoteGregI'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 tby rikmer - Hardware
Hi, I am relatively new to this but is there an existing library which allows connecting other Bluetooth devices to the WII? I am asking this because if there is a possibility to do that I probably will begin looking into using an android device for input to the WII. The only sensor on most android devices that is missing compared to a WII remote is the IR sensor. So in principal it would be pby rikmer - Hardware