views:

129

answers:

2

Hello,

I thought it would be quite easy to develop a bluetooth application on Android, but it looks like the support is very bad.

While pairing works, my Nexus One with Android 2.1 can't connect to the PC. It's the same in Windows and Ubuntu. I used on my Desktop computer, in Windows, Hyperterminal and waited on an incoming bluetooth com-port.

Does anybody know a solution for this? I searched already a bit... Maybe this http://code.google.com/p/backport-android-bluetooth/ or this library http://code.google.com/p/bluecove/

...could be a solution, but I don't know it yet. Maybe someone else has it running on Android 2.1 already?

Thanks for some hints :)

+1  A: 

Yes Bluetooth can be quite a challenge at times, but it is quite rewarding once you get the hang of it.

If I may summarize, I think the issues you describe come down to one problem: You must have created an RFCOMM server socket on your PC, before you can connect to your PC from the phone.

Not being a Windows user, this may be a long-shot, but it looks like there are some instructions on creating a server side socket here: http://msdn.microsoft.com/en-us/library/ms881004.aspx

And I would also check out http://www.bluesoleil.com/products/Default.aspx?TID=10

Connecting to a PC can be more difficult than say, connecting to another phone. Hopefully I've at least pointed you in the right direction :)

Brad Hein
A: 

Well, the answer is quite unspectacular - an error in the blueooth example of Android. Probably intended to chat with another Android device only it's not possible to talk to Hyperterminal.

Just changing the UUID solves the problem ... naming it UUID in this case, is wrong in my opinion - it should be named GroupID or whatever as it specifies here the type of service/protocol (RFCOMM).

private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");

Nils