3.07.2008

bluetooth- protocol stack and service

翻譯這一篇 (http://developer.apple.com/documentation/DeviceDrivers/Conceptual/
Bluetooth/BT_Bluetooth_Basics/chapter_2_section_4.html
)
Bluetooth 的protocol stack:
  ---------------------------------
| Applications and Profile |
| ------------------
| | OBEX | A |
------- -------------- U |
| SDP | | RFCOMM | D |
--------------------------- I |
| L2CAP | O |
--------------------------- |
| HCI | |
--------------------------- |
| Link Manager | |
---------------------------------
| BaseBand/LinkControl |
---------------------------------
| RADIO |
---------------------------------
HCI 是 Host Controller Interface。

HCI 可以說是bluetooth 裝置與主機間的分界,bluetooth規範了詳細的HCI 介面,讓二間有一個統一的介面
也就是說,作bluetooth dongle的,只要做到HCI就可以了。
而寫 pc driver的,從HCI開始寫就可以。
HCI的下一層是 Link Manager

Link Manger 管理 Bluetooth 的底層,實際上只提供兩傳輸方式:
  • SCO : Synchronous, Connection Oriented : 給像voice 這種有即時性需求stream type 的資料用的,在RF中會reserve一定的頻寬給這一類通訊channel使用。
  • ACL : Asynchronous, Connectionless :給非即時性的資料傳輸用,像file, image, command 的傳送。
HCI的上一層是 L2CAP (Logical Link Control and Adaptation Protocol)

L2CAP 是上層通訊的管理者,負責將各種資料適當的以SCO,ACL方式經由HCI向Link Manager溝通,並且將收到的資料重新分給上層的共種ap和profile。
L2CAP利用"channel"的觀念,將一個連線區分成多個"channel",讓每個application使用一個(或多個) channel傳遞資料。

L2CAP之上的stack layer就沒有那麼清楚的階層區分了。就是所有profile。

Device/Host依照需要implement profile,但是有一個profile是每一個device/host都要做的:SDP
(Service Disconvering Protocol).

SDP 定義兩種角色:Service, Client。
  • 提供功能的叫Service
  • 要求使用的裝置叫Client。
Bluetooth可以同時是Service和Client。

(下表參考 Bluetooth - Application Developer's Guide - David Kammer)
..

根據 勇者昇 的說明,ftp 跟phonebook 實際上就用到 Object Push 這個service而已,
實際上,勇者昇 說,他當初是直接用OBEX溝通的,沒有什麼Object Push,,,因為MS就只有提供到OBEX而已。

沒有留言: