2014年6月22日 星期日

[Bluetooth] Bluetooth Link Layer

  1. Link Layer 像是網路七層裡的Data Link層,主要是負責接收Phyiscal Layer送上來了封包進行分析處理,在一需求回應至上層(如圖一)。
  2. 圖一: Bluetooth System Architecture
  3. Link Layer 的運作可以被表示成一個狀態機,並且在任何時間下,只允許運作於某一狀態。狀態共分成五種 (如圖二):
  4. 圖二 : State Diagram of the Link layer state machine
    圖片來源 : Bluetooth 4.0 Spec

    • Standby State
      • does not transmit or receive any packets
      • The Standby State can be entered from any other state.
    • Advertising State
      • the state will be transmitting advertising channel packets
      • possibly listening to and responding to responses triggered by these advertising channel packets.
      • the Advertising State can be entered from the Standby State
    • Scanning State
      • will be listening for advertising channel packets from devices that are advertising
      • The Scanning State can be entered from the Standby State.
    • Initiating State
      •  will be listening for advertising channel packets from a specific device(s) and responding to these packets to initiate a connection with another device.
      •  The Initiating State can be entered from the Standby State.
    • Connection State
      • can be entered either from the Initiating State or the Advertising State.
      • two roles are defined
        • Master Role
        • Slave Role
      • When entered from the Initiating State, the Connection State shall be in the
        Master Role. 
      • When entered from the Advertising State, the Connection State
        shall be in the Slave Role.
     
  5.  在Link layer只有兩種Packets
    • Advertising Packet
      • 共三組Advertising Channel(圖三)
    • Data Packet 
      • 共三十七組Data Channel(圖三)

    圖三 : Channel Index
    圖片來源 : Bluetooth 4.0 Spec
Reference:
[1]  Core Version 4.0 - Bluetooth
[2] How Bluetooth LE works? - Link layer

沒有留言:

張貼留言