Bluetooth SPP question

by Fred » Mon, 28 Dec 2009 16:16:50 GMT

Sponsored Links
 Hello All,
I have a simple device, not developed by me, that uses SPP to send out
a simple 55 byte data packet once every second.  The device accepts no
communication other than any needed for pairing/connection.  Once it
has been connected it is supposed to start sending the 1Hz packets

I can pair the device just fine, but have yet to be able to establish
a connection.  If I try setting up a BluetoothSocket using the connect
() method, it fails with an error related to services, i.e. no known
services are on the device.  I figure this isn't a big deal, as connect
() appears to be only for the outgoing data, but then I try to listen
using   BluetoothServerSocket::listenUsingRfcommWithServiceRecord()
but get nothing.  It seems that I should need to actively do something
to establish the connection, but don't see anything in the javadocs
that look liek what I think I need.  I just want to connect the device
and start catching the packets so I can move on to coding the real


Bluetooth SPP question

by moneytoo » Tue, 29 Dec 2009 21:16:38 GMT

 Are you advertising the correct SDP record using
listenUsingRfcommWithServiceRecord? UUID for BT SPP is
"00001101-0000-1000-8000-00805F9B34FB". Does the device act as server
or client?
You might try running "sdptool browse" on linux to find additional
information about your BT device.


Sponsored Links

Bluetooth SPP question

by Fred » Wed, 30 Dec 2009 03:51:58 GMT

 Very useful feedback, thank you.  I will give sdptool a try on my
linux laptop to see what the device capabilities are, and when I have
that I will also use the UUID you gave, again, thanks.


Bluetooth SPP question

by Fred » Wed, 30 Dec 2009 14:38:58 GMT

 Connected!!!! It was the UUID.  I have been hacking the bluetoothchat
example, and had left the UUID at the default.  Once I set it to the
SPP UUID it wakes up after the conect() call and starts sending the
packets like crazy.  Thanks for the pointer on the sdptool, too I was
able to get more information about the device I don't need now, but
may come in handy later.

Cheers, and thanks for the help moneytoo.


Bluetooth SPP question

by Arjan Verboord » Thu, 14 Jan 2010 00:55:28 GMT

 Fred can i have your source code of the hacked bluetoothchat??

My goal is to connect my htc hero with a bluetooth-rs232 adapter..
But .connect() keeps throwing out an error.

> Cheers, and thanks for the help moneytoo.

Bluetooth SPP question

by Lord Vandrac » Mon, 18 Jan 2010 04:25:33 GMT

 Hey Arjan, I have the bluetooth example code fully working in a
eclipse project. Tell me hoy can i give it to you. There is the google
page with the code but it's not like a eclipse project. 

Other Threads

1. Android 3.0 Kernel source code

Hi All

Can anyone help me to find out when the 3.0 framework kernel source
code will be ready? Now I am using 2.3, but looking forward to start
3.0. Thanks.



2. Object and Value Animator

Hello sir i am using object and value animator to rotate a picture
with the pivot point X an Y 0. it rotates but it leaves it pivot
position during rotation look like it flying not rotating that's why?

while in old method of translator etc using it rotate well and look
loike original rotation?


3. Felica compatible with Nexus S

4. OOT - Mohon perhatian mods !!! Fw: Menangkan 5 iPad dan 100 tas laptop

5. HTC inspire 4G

6. (WTA).Batere htc cepet habis

7. Problem with Layouts on Honeycomb