Hello Android-developers,

I am quite new to Android development but have several questions about
the bluetooth-implementation in Android.

Goal: I would like to use an Android-equipped mobile phone as a
Handsfree for another mobile phone using the Bluetooth HFP.

I was able to use my laptop running Ubuntu 10.04 as a Handsfree for
several of my mobile phone (Nokia with Symbian and Samsung Galaxy S
with Android 2.1) using the "nohands"-project (http://
nohands.sourceforge.net/). Using the bluez sdptool I was also able to
verify the different bluetooth services offered by each mobile phone
(Headset Audio Gateway, Handsfree Audio Gateway, SPP, Phonebook Access
PSE, A2DP and so on).

Now I took the Android SDK and started with the "BluetoothChat"
example. By uploading it through the USB Debugging mode to my Galaxy S
running Android 2.1 everything works as expected. Nevertheless, I can
not test the chat functionality as I don't have another Android-phone.
>From the source I understand that instead of directly using the
bluetooth-channels I indirectly have to look up the channel for a
given service by using "createRfcommSocketToServiceRecord". The
correct UUID for a given profile can be found at
http://www.bluetooth.com/Specification%20Documents/AssignedNumbersServiceDiscovery.pdf.
The correct UUID for connecting to a Handsfree Audio Gateway should be
0000111f-0000-1000-8000-00805F9B34FB. Unfortunately, this does not
work. On the log I can see several "E/BluetoothService.cpp( 2244):
stopDiscoveryNative: D-Bus error in StopDiscovery:
org.bluez.Error.Failed (Invalid discovery session)". Replacing the
UUID with the one for the SPP (00001101-0000-1000-8000-00805F9B34FB)
everything works - the Galaxy bonds to a Nokia and the connection is
established.

By reading the internet I discovered that only the SPP is supported by
Android right now!? This fact surprises me as my Galaxy also offers a
lot more services as stated earlier. Are all these propriertary
enhancements by Samsung? By browsing through the Android code I was
not able to find the "BluetoothService.cpp" from the error log but a
"BluetoothService.java". Unfortunately, there is no point where it
says "only take the SPP UUID and throw an error for all others".
Furthermore, considering the BluetoothChat example it looks like it is
possible to make up own UUIDs which are then in fact accepted!?

I am "a little" lost at this stage! Can somebody tell me if there is
some way to extend the bluetooth-stack of my Samsung-specific Android?
Can I replace the bluez-Stack or one of its components or so with a
version I can improve from the vanilla Android?

Thank you very much!

Best regards,
Robert

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to