views:

40

answers:

1

Hi,

I am trying to use Bluetooth SPP to communicate over it. In some Android phones, SPP profile is not activated. I faced the problem in the application that SPP was not activated and so the connection could not be established over bluetooth and when I started another app that is 3g hotspot which I think activates SPP and I was able to connect over bluetooth in my app.

So, how can we actually activate SPP profile of bluetooth in Android devices? And does all the android devices has SPP profile?

A: 

This might answer your question .. http://source.android.com/porting/bluetooth.html#androidBluetoothFeatures

SPP (or ability to use Java API's to establish RFCOMM channels) is available from Android (2.0/2.1) release (Eclair) onwards

On the Android phone you will probably need to run an application that initiates the service over SPP. **

public BluetoothServerSocket listenUsingRfcommWithServiceRecord (String name, UUID uuid)

** API can be used to create a service with specified UUID to listen, Doing this should make this service visible to other devices which can then connect to it.

Dennis Mathews
Thanks for pointing me to that, but what I actually want is that SPP profile should be activated. Right now, if I connect my android device to my PC and look into Bluetooth settings in my PC it shows Headset profile as activated and SPP profile as deactivated. Is there any way I can activate the SPP profile programmatically?
sunil
You will probably need some applcation using the SPP service on the phone so that it is visible to connecting devices.
Dennis Mathews
You can use the public BluetoothServerSocket listenUsingRfcommWithServiceRecord (String name, UUID uuid) API to register a service, then from the PC you should see this under SPP profile.
Dennis Mathews