URL:
Http://sites.google.com/a/android.com/opensource/projects/bluetooth-faq
This FAQ refers to the android open source codebase, and is written
ForPlatform developers
With root access on devices such as
Androd developer phone.
Q. How do I compile android with Bluetooth support enabled?
A. add this to your boardconfig. mk:
Board_have_bluetooth: = true
Q. Does the emulator support Bluetooth?
A. Sorry, not at this time. This wocould make a nice project if someone
Wants to take this on.
Q. Bluetooth doesn' t work on my device.How shoshould I debug
Bluetooth
?
A. First step-Read the logs
(ADB logcat )! In particle look
For error or warning level messages regarding Bluetooth.
Andoird uses bluez, which comes with some very useful debugging tools.
Here are some examples, in the rough order I use to debug BT.
Hciconfig-
# Print BT chipset address and features.
Useful to check if you can communicate with your bt chipset.
Hcidump-xvt
# Print live hci uart traffic.
Hcitool Scan
# Scan for local devices. Useful to check
If Rx/TX works.
L2ping address
# Ping another BT device. Useful
Check if Rx/TX works.
Sdptool records address
# Request the SDP records
Another BT device.
Q.Where are the logs
For the Bluetooth deamons hcid and hciattach?
A. Like all Android system daemons, The stdout and stderr are sent
/Dev/null by default. If you want to view these logs you can run
Daemons under logwrapper which redirects there output to logcat. Edit
Init. RC and init. Platform. RC to run these daemons under logwrapper.
Q. I compiled my own system. IMG for the android developer phone, and
Hciconfig-A works, but hcitool scan does not. Whats going on?
A. You probably need to install the firmware for the Bluetooth chipset.
Unfortunately this firmware is not yet in the Open Source codebase.
However you can ADB pull and then ADB push it from a stock T-Mobile G1.
The location is.
/Etc/firmware/brf6300.bin
Q. What Bluetooth core version does Android support?
A.Bluetooth 2.0 + EDR.
Q. What is the architecture of Bluetooth in Android?
A. We are based onBluez
Version 3.36:
. The dimo-below shows our 1.0 layout:
Q. When will Java Bluetooth API's be released in an SDK?
A. We are not ready to announce a release target for Bluetooth API's. We
Do understand there is demand for a Bluetooth API, and it is a top
Priority for the android Bluetooth team.
Q.What is needed for Bluetooth 2.1 and Simple Pairing
Support?
A. We need to move to a bluez 4.x version.
Profile Support
Q. What is the status of headset and handsfree?
A. Android 1.0 is qualified for both HFP and MK (in the Ag role)
Profiles. We are gladly taking bug fixes on any remaining issues.
One significant feature we lack is ESCO support.
Q. What is the status of a2dp and avrcp?
A. a2dp and avrcp work is ongoing for the 'cupcak' release. We are
Using the bluez audio plugin and bluez SBC codec, with a custom audio
Path designed for the android audio sub-system. qualificiation is not
Yet complete.
Q. What is the status of hid?
A. Some very early work is in cupcake-bluez has an HID plugin which we
Compile:
External/bluez/utils/input/Android. mk
You can interact directly with this plugin using between-send and
Using-monitor. With a little study of the bluez hid plugin API and some
Luck and you shoshould be able to connect and use a hid keyboard or mouse.
Lot of work remains to be done before we cocould officially claim hid is
Supported by the platform. For example we need to plumb the plugin API
Up in the android Java framework. And the android framework needs better
Support for HID input methods-New keymaps and mouse support. We do
Not yet have a release targetted for official hid support.
Q. What is the status for tethering-Dun and pan.
A. Similar to hid, some very early work is in cupcake. bluez has Dun and
Pan daemons which we compile.
External/bluez/utils/Dun/Android. mk
External/bluez/utils/PAN/Android. mk
Bnep support is compiled into the kernel with Cupcake. With a little
Experimentation running these daemons (Dund or pand) and using pppd or
Iptables you can test tethering support. A lot of integration work
Remains before we cocould officially claim that Dun or pan is supported
The platform. Like hid, We wowould need to plumb the following API's to these
Daemons up into the android Java framework, and add code to setup
Network Paths via pppd and/or iptables. We do not yet have a release
Targetted for official Dun or pan support.