bluetooth and bluez

Upload: hemant-singh-chauhan

Post on 07-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 Bluetooth and BlueZ

    1/26

    BLUETOOTH

    Hemant Singh Chauhan

  • 8/4/2019 Bluetooth and BlueZ

    2/26

    About Bluetooth

    Open wireless Technology

    Uses Short Wavelength Radio Technology (SWRT)

    Create PANs

    Managed by BSIG

    Uses ISM band at 2.4 GHz

  • 8/4/2019 Bluetooth and BlueZ

    3/26

    How It Works

    Uses Radio Technology FHSS

    FHSS chops data and transmit it :

    Up to 79 channels

    1600 hops per sec

    Data and Voice Transmission :

    ACL Data Connection

    SCO Voice Channels

    Piconet and Scatternet Topology

    Packet Based protocol and Master-Slave Structure

  • 8/4/2019 Bluetooth and BlueZ

    4/26

    Piconet

    active slave

    master parked slave

    standby

    Star Topology

    Master:

    determines hopping

    scheme and timing

    Administers piconet

    (polling)

    Logical Channels

    Asynchronous, packetoriented

    Synchronous Connection-

    Oriented

  • 8/4/2019 Bluetooth and BlueZ

    5/26

    Operational States

    Master

    P

    SB

    SB

    SB

    Operational States

    Slave

    Parked*

    Standby*

    * Low power states

    A piconet

    M

    S

    S

    S

    S

  • 8/4/2019 Bluetooth and BlueZ

    6/26

    Forming a Piconet - I

    Initially, devices know only about themselves

    No synchronization

    Everyone monitors in standby mode

    All devices have the capability of serving as master or

    slave

    D AE

    B

    CF

    KJ

    H

    G

    I

    M

    NL

    P

    O

    Q

  • 8/4/2019 Bluetooth and BlueZ

    7/26

    Forming a Piconet - II

    Unit establishing the piconet automatically becomes themaster

    It sends an inquiry to discover what other devices are out

    there

    Addressing

    Active devices are assigned a 3-bit active member address(AMA)

    Parked devices are assigned an 8-bit parked member address(PMA)

    Standby devices do not need an address

  • 8/4/2019 Bluetooth and BlueZ

    8/26

    Connection Establishment

    INQUIRY PAGE CONNECTION

  • 8/4/2019 Bluetooth and BlueZ

    9/26

    States

    disconnected

    connecting

    active

    detach

    standby

    inquiry page

    TransmitAMA

    ConnectedAMA

    ParkPMA

    HoldAMA

    SniffAMA

    low power

    Typical = 2s

    Typical = 0.6s

    AMA = Active Member Address

    PMA = Parked Member Address

    Typical = 2ms

  • 8/4/2019 Bluetooth and BlueZ

    10/26

    Connecting to a Piconet

    Device in standby listensperiodically

    If a device wants to establish apiconet, it sends an inquiry,

    broadcast over all wake-up carriers It will become the master of

    the piconet

    If inquiry was successful, device

    enters page mode Devices in standby may respond to

    the inquiry with its device address

    It will become a slave to thatmaster

    standby

    inquiry page

    TransmitAMA

    ConnectedAMA

    ParkPMA

    HoldAMA

    SniffAMA

  • 8/4/2019 Bluetooth and BlueZ

    11/26

    Page and Connect States

    After receiving a response from

    devices, the master can connect to

    each device individually

    An AMA is assigned Slaves synchronize to the

    hopping sequence established

    by the master

    In active state, master and slaveslisten, transmit and receive

    A disconnect procedure allows

    devices to return to standby

    mode

    standby

    inquiry page

    TransmitAMA

    ConnectedAMA

    ParkPMA

    HoldAMA

    SniffAMA

  • 8/4/2019 Bluetooth and BlueZ

    12/26

    Low Power States

    Sniff state Slaves listen to the piconet at a

    reduced rate

    Master designates certain slotsto transmit to slaves in sniff state

    Hold state

    Slave stops ACL transmission, butcan exchange SCO packets

    Park state

    Slave releases its AMA

    Still FH synchronized and wakesup periodically to listen tobeacon

    standby

    inquiry page

    TransmitAMA

    ConnectedAMA

    ParkPMA

    HoldAMA

    SniffAMA

  • 8/4/2019 Bluetooth and BlueZ

    13/26

    Scatternet

  • 8/4/2019 Bluetooth and BlueZ

    14/26

    Features

    Piconets with overlapping coverage use differenthopping sequences

    Collisions may occur when multiple piconets use the same

    carrier frequency at the same time Devices can participate in multiple piconets

    simultaneously, creating a scatternet

    A device can only be the master of one piconet at a time

    A device may serve as master in one piconet and slave inanother

    A device may serve as slave in multiple piconets

  • 8/4/2019 Bluetooth and BlueZ

    15/26

    Bluetooth Architecture

    Hardware layer

    Radio, Baseband and Link Manager

    Access through the Host Controller Interface

    Standards for USB and UART

    Host protocols

    L2CAP, RFCOMM, BNEP, AVDTP etc.

    Application profiles

    Serial Port Profile, Dialup, PAN, A2DP, HID etc.

  • 8/4/2019 Bluetooth and BlueZ

    16/26

    Bluetooth Stack

  • 8/4/2019 Bluetooth and BlueZ

    17/26

    Complex View

  • 8/4/2019 Bluetooth and BlueZ

    18/26

    Baseband

    Responsible for channel coding/decoding, timing

    and managing a Bluetooth link.

    Master/slave

    Devices in a connection are either master or slave.

    Communication is only possible between a master

    and its slaves. A master and the slaves are named piconets.

    Scatternet; multiple piconets connected together.

  • 8/4/2019 Bluetooth and BlueZ

    19/26

    The Link Manager

    Responsible for establishing, supervising and tear down

    connections and logical links.

    Link controller states introduced to carry out thesetasks.

    States:

    Standby

    Inquiry / Inquiry Scan

    Page / Page Scan

    Connection

  • 8/4/2019 Bluetooth and BlueZ

    20/26

    The Link Manager (cont.)

    Inquiry

    Used to detect all devcies in an unknown environment.

    Page / Page Scan Describes how connection is established.

    Have to know the address of the other devices. Is usually

    achieved through inquiry.

    Connection Master and slaves are synchronized.

    Connection is established.

  • 8/4/2019 Bluetooth and BlueZ

    21/26

    Bluetooth and linux

    Many Implementations

    Embedded and non-free Protocol Stack

    Four major known Bluetooth Stacks : OpenBT, BlueDrekar, BlueZ and Affix

    Official Protocol stack is BlueZ

    Released May, 3rd 2001 Integrated to Linux kernel 2.4.6

  • 8/4/2019 Bluetooth and BlueZ

    22/26

    BlueZ

    Core Layers Real hardware abstraction over HCI

    Generic interface for drivers

    Support of multiple devices

  • 8/4/2019 Bluetooth and BlueZ

    23/26

    BlueZ Protocols

    Kernel modules for core protocols

    Use of the BSD socket interface

    Management sockets

    Stream or sequential packet sockets

  • 8/4/2019 Bluetooth and BlueZ

    24/26

    Bluetooth Network

    Dialup and LAN access

    RFCOMM terminal emulation

    Using of PPP and AT commands

    LAN access using PPP

    Personal Area Networks (PAN)

    Linux TCP/IP with BNEP

    Use bridging, netfilter, NAT etc.

    Access to ISDN

    CAPI integration with CMTP

  • 8/4/2019 Bluetooth and BlueZ

    25/26

    Summary Of BlueZ

    BlueZ is qualified by the Bluetooth SIG

    Full access to all Bluetooth host layers

    Native integration into many projects

    Active development

  • 8/4/2019 Bluetooth and BlueZ

    26/26

    THANK YOU