Android bluedroid (i): bluedroid overview

Source: Internet
Author: User

Key words: Bluedroid BlueZ
xubin341719 (Welcome reprint, please specify the author, please respect copyright, thank you!) )
Welcome to correct mistakes, common learning, common progress!!

First, the noun explanation: (the useful information increases in ...)

BTI F: Bluetooth Interface
BTU: Bluetooth Upper Layer
BTM: Bluetooth Manager
BTE: Bluetooth Embedded System
BTA: Blueetooth Application Layer
CO: call Out\ci:call in
HF: Handsfree profile
HH: HID Host Profile
HL: Health Device Profile
AV:audio\vidio
AG: Audio Gateway
ar: audio/video Registration
GATTC: GATT Client
BLE:

Second,         bluedroid  &&  bluez
Android 4.2, Google has been using the official Linux Bluetooth protocol stack BlueZ. BlueZ was actually an open source project, issued by Qualcomm in May 2001 under the GPL, as the official Bluetooth protocol stack for the Linux 2.4.6 kernel. With the popularity of Android devices, BlueZ has also been greatly improved and extended. For example, the version of BlueZ in Android 4.1 is upgraded to 4.93, it supports the Bluetooth core specification 4.0, and most of the profiles is implemented.
starting with Android 4.2, Google has launched its bluedroid with Broadcom to replace BlueZ in Android source. BlueZ's founder, Qualcomm will also be in the Android reference design based on its chip to remove BlueZ, support bluedroid.
the most commendable thing about Bluez,bluedroid is that its frame structure becomes more concise and clearer. This is also a good benefit for our engineers, a clear, concise architecture that makes us more clear in the debug process,
1, the framework diagram for bluedroid in Android 4.2: (Google is officially available).

(1), the application uses the API under the Android.bluetooth package to invoke the system's Bluetooth functionality.
(2), Application layer space adds a Bluetooth-named app. It exists as the system's Bluetooth core process. The Bluetooth HAL layer is invoked internally via JNI to complete a variety of Bluetooth requests. The
(3), Bluetooth Hal also belongs to the Android 4.2 new module, which consists of the Bluetooth core specification hardware abstraction layer and the Bluetooth Application Specification hardware abstraction layer. Due to the isolation of the HAL layer, the upper code can be easily ported to different chip platforms.
(4), as the core of the whole Bluetooth service, the Bluetooth stack module consists of the Bluetooth application Layer (abbreviated as BTA) and the Bluetooth Embedded System (abbreviated as BTE). BTA realizes the Bluetooth device management, state management and some application specifications. Bte, through HCI, interacts with the manufacturer's Bluetooth chip to realize the common function of the Bluetooth protocol stack and the related protocol. In addition, the BTE includes a unified kernel interface (GKI) that allows Bluetooth chip manufacturers to quickly and easily migrate Bluetooth protocol stacks to other operating systems or mobile platforms with Gki.
(vendor extentions (vendor extension) : Developers can add custom extensions to implement vendor-specific modules and components.
(6), bluedroid overall protocol stack schema:


The architecture of the whole system is very simple, because most of the things are done in the bluedroid layer, the upper level just go to call and callback is, this part of our analysis code behind the detailed analysis.
2. BlueZ Code Architecture
Similar to Bluedroid, BlueZ has been moving from application to standard, but the only difference between the two is the dbus of BlueZ. Bluedroid The Dbus is the code structure becomes clearer and looks smoother. such as the Bluetooth Code architecture (Google provides):


3, Bluedrod PK BlueZ
Although Bluedroid has a tendency to replace BlueZ, it is not yet well-established to support Bluetooth application specifications. For example, bluedroid only supports AVRCP 1.0, not the latest AVRCP 1.5. Therefore, some domestic chip or mobile phone manufacturers if the early completion of the BlueZ-related modules to bluedroid transplant work, I believe that can help them in the increasingly competitive day-to-day mobile world in the opportunity to pull. In addition, as a pioneer of mature and low-power wireless communication technology, Bluetooth will play an increasingly important role in the field of wearable devices.


Android bluedroid (i): bluedroid overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.