Understanding Bluetooth Basics – Pairing and Handshaking process

What is Bluetooth?

Bluetooth is a standardized protocol for sending and receiving data via a 2.4GHz wireless link. It’s a secure protocol, and it’s perfect for short-range, low-power, low-cost, wireless transmissions between electronic devices.

How Bluetooth Works ?

The Bluetooth protocol operates at 2.4GHz in the same unlicensed ISM frequency band where RF protocols like ZigBee and WiFi also exist. There is a standardized set of rules and specifications that differentiates it from other protocols.

Where is Bluetooth Specification available ?

Download from https://www.bluetooth.org/en-us/specification/adopted-specifications

How Bluetooth devices communicates  ?

Bluetooth networks (commonly referred to as piconets) use a master/slave model to control when and where devices can send data. In this model, a single master device can be connected to up to seven different slave devices. Any slave device in the piconet can only be connected to a single master.

Bluetooth Addresses and Names

Every single Bluetooth device has a unique 48-bit address, commonly abbreviated BD_ADDR. This will usually be presented in the form of a 12-digit hexadecimal value. The most-significant half (24 bits) of the address is an organization unique identifier (OUI), which identifies the manufacturer. The lower 24-bits are the more unique part of the address. This address should be visible on most Bluetooth devices.

Connection Process

Creating a Bluetooth connection between two devices is a multi-step process involving three progressive states:

  1. Inquiry – If two Bluetooth devices know absolutely nothing about each other, one must run an inquiry to try todiscover the other. One device sends out the inquiry request, and any device listening for such a request will respond with its address, and possibly its name and other information.
  2. Paging (Connecting) – Paging is the process of forming a connection between two Bluetooth devices. Before this connection can be initiated, each device needs to know the address of the other (found in the inquiry process).
  3. Connection – After a device has completed the paging process, it enters the connection state. While connected, a device can either be actively participating or it can be put into a low power sleep mode.
    • Active Mode – This is the regular connected mode, where the device is actively transmitting or receiving data.
    • Sniff Mode – This is a power-saving mode, where the device is less active. It’ll sleep and only listen for transmissions at a set interval (e.g. every 100ms).
    • Hold Mode – Hold mode is a temporary, power-saving mode where a device sleeps for a defined period and then returns back to active mode when that interval has passed. The master can command a slave device to hold.
    • Park Mode – Park is the deepest of sleep modes. A master can command a slave to “park”, and that slave will become inactive until the master tells it to wake back up.
SHUFFLED :   Facebook Tricks

Bluetooth ProtocolSequence

 

Reference : https://learn.sparkfun.com/tutorials/bluetooth-basics

Reference : http://www.sharetechnote.com/html/Bluetooth_Protocol.html

https://people.csail.mit.edu/albert/bluez-intro/

 

Android Android Commands Android Java Applications Application Libraries Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home JAVA Programs Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags:

Leave a Reply