2009年2月22日 星期日

藍牙簡介

如前文所述,bluetooth 己成為 mobile computing 的 de facto 外接的標準。本文主要討論 bluetooth 的規格及應用。

Bluetooth 有內定的 profile 決定有關的應用,可參考 wiki。以下舉出手機中常見的 profile:

  • Hands Free and Headset profile: HFP / HSP
  • Advanced Audio Distribution (Stereo) profile: A2DP
  • Audio/Video Remote control profile: AVRCP

不同的 profile 並不完全是獨立的,常常是互相關連,如下圖所示。GAP 是最基本的 profile;GAVDP 是架構在GAP之上; A2DP 又是架構在 GAVDP之上。

image

以下說明各種 os/device 對 profile 的支援程度。以 embedded OS 而言,symbian 目前有最完整的 bluetooth profile 支援。

 

General OS

Windows XP SP2/Vista/7

The Microsoft Windows Bluetooth stack only supports external or integrated Bluetooth dongles attached through USB. It does not support Bluetooth radio connections over PCI, I²C, serial, PC Card or other interfaces.

Windows XP includes a built-in Bluetooth stack starting with the Service Pack 2 update, released on 2004-08-06.

The Windows XP and Windows Vista Bluetooth stack supports the following Bluetooth profiles natively: SPP, DUN, HID, HCRP.  Windows 7 also supports audio related profiles-HFP, HSP, A2DP and AVRCP natively.

 

Linux

The Linux operating system currently has two widespread Bluetooth stack implementations:

BlueZ is the official Bluetooth stack for Linux and is used in Google's Android OS. Its goal is to make an implementation of the Bluetooth wireless standards specifications for Linux. As of 2006, the BlueZ stack supports all core Bluetooth protocols and layers.  It was initially developed by Qualcomm, and is available for Linux kernel versions 2.4.6 and up.

 

MAC OS

Mac OS X: As of version 10.5, Mac OS X includes native support for A2DP on Bluetooth equipped Macs.  Version 10.4 does not support A2DP, but can be hacked to enable limited functionality.  Softick Audio Gateway for Mac OS X also supports A2DP. Despite being capable of A2DP, the iPhone variant of OS X provides no A2DP support as of October 2008. (But will be supported in future versions of the iPhone OS.)

 

Embedded OS

BlueMagic

BlueMagic 3.0 is Open Interface's (now Qualcomm) highly portable embedded Bluetooth protocol stack which power's Apple's iPhone and Qualcomm-powered devices such as the Motorola RAZR. BlueMagic also ships in products by Logitech, Samsung, LG, Sharp, Sagem, and more. BlueMagic 3.0 was the first fully certified (all protocols and profiles) Bluetooth protocol stack at the 1.1 level.

 

BlueCore Host Software (BCHS)

CSR's BCHS or BlueCore™ Host Software provides the upper layers of the Bluetooth® protocol stack (above HCI, or optionally RFCOMM) - plus a large library of Profiles - providing a complete system software solution for embedded BlueCore applications. BCHS supports 1.2, 2.0+EDR and 2.1+EDR. Current qualified Profiles available with BCHS: A2DP,AVRCP,PBAP,BIP,BPP,CTP,DUN,FAX,FM API,FTP GAP,GAVDP,GOEP,HCRP,Headset,HF1.5,HID,ICP,JSR82,LAP Message Access Profile,OPP,PAN,SAP,SDAP,SPP,SYNC,SYNC ML.

 

Windows CE/Mobile

Windows CE is Microsoft's embedded operating system, which also supports Bluetooth. However, different stacks can be installed on windows CE devices, including Microsoft, Widcomm, and Toshiba, depending on the embedded device on which the OS is installed.

Windows Mobile (previously Pocket PC, PPC): Version 5.0 and newer (with AKU 2.0), thus far based on the Windows CE 5.0 kernel, fully support A2DP if an appropriate device is present.

There is a huge amount of debate on the forums as to what Bluetooth profiles Windows Mobile devices support.  Below is the list that we support natively in the Microsoft Stack in AKU 2.0 of Windows Mobile 5.0 and beyond:

Generic Access Profile (GAP)
Generic Object Exchange Profile (GEOP)
Serial Port Profile (SPP)
Dial-up Networking (DUN) Profile
Hands-Free Profile (HFP)
Headset Profile (HSP)
Human Interface Device (HID) Profile
Object Push Profile (OPP)
ActiveSync-Over-Bluetooth
Advanced Audio Distribution Profile (A2DP)
Audio/Video Remote Control Profile (AVRCP)

The confusion typically starts because it is up to to the OEM to choose which ones they implement or to add additional support for other profiles.

 

Symbian OS bluetooth profile (v9.2)

Symbian OS is an operating system for mobile phones, which includes a bluetooth stack. All phones based on Nokia's S60 platform and Sony Ericsson/Motorola's UIQ platform use this stack. The Symbian bluetooth stack runs in user mode rather than kernel mode, and has public APIs for L2CAP, RFCOMM, SDP, AVRCP, etc. Profiles supported in the OS include GAP, OBEX, SPP, AVRCP, GAVDP, PAN, PBAP.  Additional profiles supported in the OS + S60 platform combination include A2DP, HSP, HFP1.5, FTP, OPP, BIP, DUN, SIM access, device ID.

There are two kinds of profiles provided for by Symbian OS: implemented and supported. Implemented profiles can be used directly from the existing components. When a profile is supported the licensee will need to provide its own APIs to make the functionality of that profile available to application developers.

image

The above figure shows the dependencies of profiles. The shaded profiles are implemented by the Symbian OS Bluetooth subsystem.

Implemented Bluetooth profiles

The following profiles are implemented by Symbian OS Bluetooth:

  • Generic Access Profile (GAP)

  • Serial Port Profile (SPP)

  • Generic Object Exchange Profile (GOEP)

  • Personal Area Networking (PAN) Profile

  • Audio Video Remote Control Profile (AVRCP)

  • Generic Audio Video Distribution Profile (GAVDP)

 

Android (Cupcake)

Android bluetooth is based on BlueZ on Linux.  New kernel based on Linux 2.6.27.  However, the bluetooth API is not supported till v1.0 release.  Google promised it will support A2DP profile.  The tentative release cupcake supports A2DP and AVRCP profiles.

iphone OS

iphone OS is based on MAC OS X.  The only bluetooth device opens now is the bluetooth headset.  It is annoying!

沒有留言:

張貼留言

追蹤者