Posts

Showing posts with the label bluetooth

Bluedroid stack in android

Image
Bluedroid stack in android Table of Contents Bluetooth stack in android Bluedroid .VS. Bluez Porting guide of Bluedroid stack 1 Bluetooth stack in android From Android 4.2, google use Bluedroid stack as its default Bluetooth host stack, before android 4.2, its default Bluetooth host stack was Bluez, which is also the Linux distribution's default stack. So why google changed its Bluetooth stack? The reason is maybe that Bluez stack was designed for the desktop environment, so in order to port Bluez into android, android must solve some dependency issues, like porting Dbus, Linux desktop's default IPC, into android. So there are at least five processes to power Bluetooth before android 4.2, they are systems, Bluetooth APP, Bluez, hciattach, and Dbus. The damn thing is that there are bugs between them, so Bluetooth stack is the weakest part in the android system before android 4.2, yeah, it is the usual reason that android system corrupted. So, what's t...

How Bluetooth LE works? -- Host stack

Image
How Bluetooth LE works? – Host stack Table of Contents 1 Bluetooth LE hosts stack architecture 2 L2CAP 3 Attribute 4 The Attribute Protocol and The Generic Attribute Profile 1 Bluetooth LE hosts stack architecture +----------------------------------+ | | | Generic Attribute Profile | +----------------------------------+ | | | Attribute Protocol | +----------------------------------+ | | | L2CAP | +----------------------------------+ Bluetooth LE's host stack is built under the Host Control interface, which is used to connect with controller part. As showing in the above figures, there are at least three layers which need to introduce in...

How Bluetooth LE works? -- Link Layer

Image
How Bluetooth LE works? - Link layer Table of Contents 1 Bluetooth LE system architecture 2 Bluetooth LE Physical layer 3 Bluetooth LE Link Layer states 4 Bluetooth LE Link Layer packets 1 Bluetooth LE system architecture This is the first post and hopefully a series of upcoming postings about Bluetooth Low Energy. Above figure is the protocol stack of a whole Bluetooth LE system. The Bluetooth LE is one part of Bluetooth v4.0 specification, it was designed not to pursue high transmission speed but for lower energy consumption. So the Bluetooth LE products can be powered by a button-cell battery for years. How did it do that? This article is a review of Robin Heydon's excellent book – Bluetooth Low Energy, the developer's handbook. Bluetooth LE is completely redesigned of classic Bluetooth protocol, It seems that both the Bluetooth LE and classic Bluetooth has the same architecture from above figure, but actually they are so different inside, an...

Install Bluez host stack from source code for linux

Image
Install Bluez host stack from source code for Linux Table of Contents 1 Why install Bluez5.8+? 2 Install Bluez5.8 into Linux distribution 3 How to start the newest Bluez stack daemon? 1 Why install Bluez5.8+? Bluez is the host part stack running in Linux. Install the Bluetooth LE feature supported Bluez was really important during develop the Bluetooth le apps, it can run your test case on your Linux PC at least. But Why Bluez 5.8 and later version? The Bluez stack was developed so quickly during the past one years from 4.100 to 5.9, its source code's quality was really promoted a lot after those frequent releases. What's more, Bluetooth LE was officially supported after Bluez 5.0 release not just experimental features in the older version.  The mainly Linux distribution's Bluez version, like Ubuntu13.2 or Fedora 19, still remained in 4.101, which means Bluetooth LE still in the experimental stage at the latest Linux distribution system . 2 Inst...

Bluetooth Introduction

Image
Bluetooth Introduction Table of Contents 1 What's Bluetooth? 2 Bluetooth stacks 3 Bluetooth profiles 1 What's Bluetooth? Bluetooth is a wireless communication technology. Its name comes from an ancient Denmark king, Harald Blatand, in the tenth century, who united the dissonant Danish tribes into a single kingdom. Because he likes to eat blueberry, his tooth was always colored to blue, people gave him a nickname Harald Bluetooth instead. And also, the Bluetooth's logo comes from this king's first two names and the band of the ancient North Europe characters.  How many parts did a Bluetooth system consisted of? The following figures illustrate the basic parts of a Bluetooth system. +----------+ +----------+ | | | Host | | host | | | +----+-----+ +----+-----+ +----+-----+ +----+-----+ | LE | | BR/EDR | |Controller| |Controller| +----------+ +----------+ ...