• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Trouble coneccting Pc with Android 2.1 mobile for the Bluetooth Chat example

lugopaco

Newbie
Mar 31, 2011
30
0
Mexico
Hi. I'm new on programming Android devices. I'm making an school proyect which envolves an Android (Mini-Xperia pro with Android 2.1) and bluetooth communication with a device. I'm trying to go step by step to undesrstand all of the programming stuff and to learn all I can.

I'm using a Bluetooth adapter for a pc which is really small, and I'm really confused cause many pages say that it only works with a bluetooth with serial communication which of course is a lot more expensive.

Anyway, I've got an Bluetooth adapter for the Pc, I'm working with windows XP so I only connect it and it's already installed.
Well, I'm working over the Bluetooth Chat sample that comes with the SDK and I've already changed the UUID to:
private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");
With my mobile I entered to settings and made my device paired to my Pc (it says paired but with out conection).
But I don't know what I'm doing wrong cause I open the Bluetooth chat application on my mobile, try to connect to my pc and it says "unable to conect device".
After a lot of tries, it connects to transmit from the pc to the phone:
A
AT
And the connection is lost (this takes less than 2 seconds!!)
Can anyone help me please telling me what am I doing wrong or what's the problem??
Thanks
 
00001101-0000-1000-8000-00805f9b34fb is the default SDP (Service discovery protocol) UUID

meaning it helps find your app/service (AFAIK). You generally dont want to use it to identify your app.

Do you know what UUID the PC app is using? You should use that instead.

There are also unfortunately some issue with the low level bluez.org BT stack (used by Android) vs the Windows implementation of BT. If that's what's causing you problems though I'm unsure where to even point you to work around it. :(
 
  • Like
Reactions: lugopaco
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones