Home | History | Annotate | Download | only in devices

Lines Matching full:bluetooth

1 page.title=Bluetooth
27 <img style="float: right; margin: 0px 15px 15px 15px;" src="images/ape_fwk_hal_bluetooth.png" alt="Android Bluetooth HAL icon"/>
29 <p>Android provides a default Bluetooth stack that is divided into two layers: The Bluetooth Embedded System (BTE),
30 which implements the core Bluetooth functionality, and the Bluetooth Application Layer (BTA), which
33 <p>To fully leverage the <a href="http://developer.android.com/about/versions/android-5.0.html#BluetoothBroadcasting">Bluetooth Low Energy APIs</a>
34 added in Android 5.0, you should implement the <a href="Android-6.0-Bluetooth-HCI-Reqs.pdf">Android 6.0 Bluetooth HCI Requirements</a>.
35 That document initially was provided as the <a href="Android-5.0-Bluetooth-HCI-Reqs.pdf">Android 5.0 Bluetooth HCI Requirements</a>.</p>
38 <p>A Bluetooth system service communicates with the Bluetooth stack through JNI and with applications through Binder IPC. The system service provides developers with access to various Bluetooth profiles. The following diagram shows the general structure of the Bluetooth stack:
41 <img src="images/ape_fwk_bluetooth.png" alt="Android Bluetooth architecture" id="figure1" />
43 <strong>Figure 1.</strong> Bluetooth architecture
49 href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a>
50 APIs to interact with the Bluetooth hardware. Internally, this code calls the Bluetooth process through
53 <dt>Bluetooth system service</dt>
54 <dd>The Bluetooth system service, located in <code>packages/apps/Bluetooth</code>, is packaged as an Android
55 app and implements the Bluetooth service and profiles at the Android framework layer. This app
60 href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a> is located in
61 <code>packages/apps/Bluetooth/jni</code>. The JNI code calls into the HAL layer and receives
62 callbacks from the HAL when certain Bluetooth operations occur, such as when devices are
67 href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a> APIs
68 and Bluetooth process call into and that you must implement to have your Bluetooth hardware
69 function correctly. The header file for the Bluetooth HAL
70 is <code>hardware/libhardware/include/hardware/bluetooth.h</code>. Additionally, please review all of the
74 <dt>Bluetooth stack</dt>
75 <dd>The default Bluetooth stack is provided for you and is located in
76 <code>system/bt</code>. The stack implements the generic Bluetooth HAL and
88 <p>The Bluetooth HAL is located in <code>/hardware/libhardware/include/hardware/bluetooth.h</code>.
89 Thus, the <code>bluetooth.h</code> file contains the basic interface for the Bluetooth stack, and you must implement its functions.</p>
109 <p>Keep in mind that your Bluetooth implementation is not constrained to the features
111 in the Bluetooth stack in the <code>system/bt</code> directory,
115 <h2 id="customizing">Customizing the Native Bluetooth Stack</h2>
116 <p>If you are using the default Bluetooth stack, but want to make a few customizations, you can
119 <li>Custom Bluetooth profiles - If you want to add Bluetooth profiles that do not have
120 HAL interfaces provided by Android, you must supply an SDK add-on download to make the profile available to app developers, make the APIs available in the Bluetooth system process app (<code>packages/apps/Bluetooth</code>), and add them to the default stack (<code>system/bt</code>).</li>
125 is mainly used for debug tracing. See the <code>external/bluetooth/hci</code> directory for an example.</li>