Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old April 13th, 2011, 05:17 PM   #1 (permalink)
Junior Member
 
Join Date: Mar 2011
Location: Mexico
Posts: 30
 
Device(s): Samsung Galaxy 5 (GT-I5500L), Samsung Galaxy Ace
Thanks: 11
Thanked 2 Times in 2 Posts
Cry Trouble coneccting Pc with Android 2.1 mobile for the Bluetooth Chat example

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

lugopaco is offline  
Reply With Quote
Sponsors
Old April 17th, 2011, 03:23 PM   #2 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,090
 
Device(s): GalaxyNexus(LTE), NexusOne, OG Droid, GalaxyTab 10.1(LTE), Eris, Logitech Revue (fishtank)
Thanks: 4,164
Thanked 3,126 Times in 1,292 Posts
Default

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.
alostpacket is offline  
Reply With Quote
The Following User Says Thank You to alostpacket For This Useful Post:
lugopaco (September 5th, 2011)
Old September 5th, 2011, 08:00 PM   #3 (permalink)
Junior Member
 
Join Date: Mar 2011
Location: Mexico
Posts: 30
 
Device(s): Samsung Galaxy 5 (GT-I5500L), Samsung Galaxy Ace
Thanks: 11
Thanked 2 Times in 2 Posts
Default

I solve it. I used the default SDP. To connect to a pc it's necessary to create a btsocket and that was my mistake. Thanks.
lugopaco is offline  
Reply With Quote
Reply

Bookmarks

Tags
android, bluetooth


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 11:40 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo