Bluetooth

An Introduction to Bluetooth Programming, TCP/IP vs. Bluetooth

11 Internet of Things (IoT) Protocols You Need to Know About

  • HCI = Host Controller Interface (Host [uC] <==> Controller [BT])
  • VHCI = Virtual HCI
  • H4 = UART protocol support
  • BTE = Bluetooth Embedded System
  • BTA = Bluetooth Application Layer
  • Single Mode / Dual Mode: BR/EDR vs. LE
  • Basic Rate (BR)
  • Low Energy (LE)
  • Enhanced Data Rate (EDR)
  • Media Access Control (MAC)
  • Physical (PHY)
  • Alternate MAC/PHY (AMP)
  • PAL (Protocol Adaptation Layer)
  • link manager protocol (LMP)
  • link layer protocol (LL)
  • LE asynchronous connection logical transport (LE ACL)
  • Protocol Adaptation Layer (PAL)
  • Security Manager (SM)
  • Attribute Protocol (ATT)
  • Generic Attribute Profile (GATT)
  • Generic Access Profile (GAP)
  • basic acknowledgement/repeat request (ARQ)
  • Security Manager Protocol (SMP)
  • Asynchronous Connection-Oriented (ACL)
  • Synchronous Connection-Oriented (SCO)
  • Extended SCO (eSCO)
  • Active Slave Broadcast (ASB)
  • LE Advertising Broadcast (ADVB)
  • a

Layer Protocol Architecture

  • Generic Access Profile (GAP)
  • Service Discovery Protocol (SDP)
  • RFCOMM / SMP / ATT
  • L2CAP
  • Link Manager / Link Layer
  • Baseband / Link Controller / PHY

Profile:

  • Personal Area Networking (PAN)
  • LAN Access Point (LAP)
  • Dial-Up Networking (DUN)
  • Serial Port Profile (SPP)

Wikipedia

Bluetooth (de)
Bluetooth (en)
Bluetooth-Profile (de)
List of Bluetooth profiles (en)
Bluetooth stack (en)
Bluetooth Low Energy, BLE, LE (de)
Bluetooth Low Energy, BLE, LE (en)
mbed: Bluetooth Low Energy
android: Bluetooth Low Energy
Near Field Communication (NFC) (de)

Stacks:

  • BlueZ (Linux)
  • BlueDroid (Android)
  • lwBT

Adafruit

Adafruit BLE / Bluetooth Smart

bluetooth.com

Develop with Bluetooth – Developer Tools & Resources
Develop with Bluetooth – Blog
Develop with Bluetooth – Training Videos
Bluetooth Core Specification

Nordic

Tutorials
Bluetooth low energy Advertising, a beginner’s tutorial
Bluetooth low energy Services, a beginner’s tutorial
Bluetooth low energy Characteristics, a beginner’s tutoria

How to distinguish between random and public GAP addresses?

GATT

GATT Specifications (Profi​le ​​Specification​)
GATT Services

ESP32

Bluetooth LE APIs
BLUFI API (2.0)
BLUFI API (latest)
Example routing UART to VHCI directly
Implement Bluetooth BLE — RFC on API

BTstack

BTstack Manual v1.0
BTstack Source
BTstack Port for the Espressif ESP32 Platform

Android

Android Bluetooth Stack
Bluedroid stack in android
Android-Adding Bluetooth Profile (old!!)

Linux

Direct Control of HCI Device (Bypass Bluetooth Drivers) on Linux
node-bluetooth-hci-socket, Bluetooth HCI socket binding for Node.js
Bluetooth: Using USB bluetooth adapters

Wireshark

Structural unknown HCI Command in Bluetooth LE logs

$ hcitool scan
$ sdptool search OPUSH 00:25:48:FC:98:6D
$ obexftp --nopath --noconn --uuid none --bluetooth 00:25:48:FC:98:6D --channel 6 -p tuxcase.jpg 
[   20.560100] Bluetooth: Core ver 2.21
[   20.560118] Bluetooth: HCI device and connection manager initialized
[   20.560121] Bluetooth: HCI socket layer initialized
[   20.560124] Bluetooth: L2CAP socket layer initialized
[   20.560132] Bluetooth: SCO socket layer initialized
[   20.579146] Bluetooth: HCI UART driver ver 2.3
[   20.579148] Bluetooth: HCI UART protocol H4 registered
[   20.579149] Bluetooth: HCI UART protocol BCSP registered
[   20.579150] Bluetooth: HCI UART protocol LL registered
[   20.579151] Bluetooth: HCI UART protocol ATH3K registered
[   20.579151] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   20.579183] Bluetooth: HCI UART protocol Intel registered
[   20.579200] Bluetooth: HCI UART protocol BCM registered
[   20.579201] Bluetooth: HCI UART protocol QCA registered
[   20.579202] Bluetooth: HCI UART protocol AG6XX registered
[   20.601412] Bluetooth: hci0: Firmware revision 0.1 build 103 week 50 2016
[   21.097388] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   21.097390] Bluetooth: BNEP filters: protocol multicast
[   21.097393] Bluetooth: BNEP socket layer initialized
[   36.597632] Bluetooth: RFCOMM TTY layer initialized
[   36.597638] Bluetooth: RFCOMM socket layer initialized
[   36.597643] Bluetooth: RFCOMM ver 1.11
[ 8399.532221] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015
[ 8399.539943] Bluetooth: hci0: Device revision is 16
[ 8399.539945] Bluetooth: hci0: Secure boot is enabled
[ 8399.539945] Bluetooth: hci0: OTP lock is enabled
[ 8399.539946] Bluetooth: hci0: API lock is enabled
[ 8399.539946] Bluetooth: hci0: Debug lock is disabled
[ 8399.539947] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[ 8399.542654] Bluetooth: hci0: Found device firmware: intel/ibt-12-16.sfi
[ 8400.960872] Bluetooth: hci0: Waiting for firmware download to complete
[ 8400.961274] Bluetooth: hci0: Firmware loaded in 1398407 usecs
[ 8400.961342] Bluetooth: hci0: Waiting for device to boot
[ 8400.977322] Bluetooth: hci0: Device booted in 15614 usecs
[ 8400.977601] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-12-16.ddc
[ 8400.979328] Bluetooth: hci0: Applying Intel DDC parameters completed

Leave a Reply

Your email address will not be published. Required fields are marked *