Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 44

Table of Contents

Introduction

Bluetooth in RDK, provides short range wireless connectivity between RDK devices and consumer electronics devices. RDK Bluetooth architecture is designed to support any Bluetooth stack.
The Bluetooth stack currently supports common Bluetooth profile such as A2DP, AVRCP, and can be extended to various profiles such as HID, PAN, etc.. Bluetooth may be enabled directly on capable RDK boxes or indirectly via USB-to-Bluetooth adaptor.

Features supported in RDK

Bluetooth feature in RDKFeature Descriptions
Audio Output SourcesBluetooth audio may be different than HDMI audio (e.g. secondary audio program, application sourced audio such as Pandora, voice navigation audio, etc).
Audio Output RoutingDetail PCM audio routing to Bluetooth A2DP SRC, It uses H/W accelerations, S/W processing, RMF involvement on streaming audio/video contents.
Audio EncodingDetail SBC (sub-band coding) and aptX encoding (Bluetooth chip, in software, or in SoC hardware).
Audio Output MutingThe Bluetooth audio output may be muted independently of other audio outputs (e.g. HDMI)
Audio Input (Settop as AD2P SNK)Using RDK device speakers over bluetooth i.e transmitting audio input back to a speaker connected with RDK device.
Audio Output RoutingDetail PCM audio routing to Bluetooth A2DP SRC, It uses H/W accelerations, S/W processing, RMF involvement on streaming audio/video contents.
Audio Output SourcesBluetooth audio may be different than HDMI audio (e.g. secondary audio program, application sourced audio such as Pandora, voice navigation audio, etc).
Dual DecodeSupports ability to simultaneously output one audio stream to HDMI and a different audio stream to Bluetooth
Power ControlIn future, the power state of each Bluetooth connected device and the Bluetooth subsystem can be controlled
Audio/Video Remote Control Profile (AVRCP)Controller (Remote Control) sends mute and volume commands to target. AV/C commands are defined by the 1394 trade association

Bluetooth in RDK - Block Diagram

Bluetooth in RDK provides Interface API and implementation to abstract Bluetooth stack and it provides 5 layers in the BTR (Bluetooth-RDK) stack.

...

6. RDK Apps/Diagnostics - HTML-5 based UI applications to make use of Bluetooth service using Service Manager APIs.


draw.io Diagram
diagramNamebluetooth1.drawio
revision1
Image Removed

Bluetooth Architecture

Bluetooth Manager and Bluetooth HAL [BTRCore] is that Bluetooth Manager implements the BT HAL [BTRCore] API.  Then BT HAL [BTRCore] integrates and manages the BlueZ stack though the D-BUS interface.


draw.io Diagram
diagramNameBluetooth2.drawio
revision1
Image Removed


BlueZ D-Bus Communication

...


draw.io Diagram
diagramNamebluetooth4.drawio
revision1
Image Removed

Bluetooth - Service Manager

Bluetooth Service Manager component in RDK exposes Java scripts APIs against each of the Core Bluetooth features supported in the current implementation Javascript API's have been exposed to invoke IARM communication in the context of a browser which have a Javascript engine when we have HTML/HTML5/Browser based applications. Applications which don't have a Java-script engine should also be able to invoke Service manager methods/IARM methods to communicate with BTRMgr.

...

Contains Methods and Events to communicate with the Bluetooth manager
Service Manager will send event in case external Bluetooth adapter is inserted or removed, or it is requested for pairing.

List of API & Events

Refer to Bluetooth APIs for a complete list of Bluetooth APIs and events exposed by service manager.

Bluetooth Manager (BTRMgr)

Bluetooth Manager (An RDK component) interfaces with BlueZ through the D-Bus API, so there is no direct linking of the BlueZ library with Bluetooth Manager. BTRCore uses Bt-Ifce (which serves as Bluetooth HAL) interfaces with BlueZ.

...

Bluetooth HAL interface Provides an software abstraction layer that interfaces with the actual Bluetooth implementation and/or drivers. RDK Bluetooth HAL layer enables projects to pick whatever Bluetooth profiles as per their requirements. Bluetooth HAL uses BlueZ5.42 stack which is a quite popular Linux Bluetooth library.

BlueZ In RDK

  • BlueZ is a well known Open Source project used to support core Bluetooth layers and protocols on Linux systems.
  • BlueZ is multi processing safe, supports multiple Bluetooth devices, and provides device and service level security.
  • Supported Profiles: A2DP 1.3, AVRCP 1.5, DI 1.3, HDP 1.0, HID 1.0, PAN 1.0, SPP 1.1
  • The interface layer is based off of DBUS, so there is no direct linking with the BlueZ daemon.
  • Currently BlueZ5.42 stack is integrated with RDK & it is managed by Bluetooth HAL component.

...

Gstreamer Elements

Descriptions

sbcenc

Bluetooth SBC (sub-band coding) encoder

sbcdec

Bluetooth SBC (sub-band coding) decoder

sbcparse

The sbcparse element will parse a Bluetooth SBC audio stream into frames and timestamp them properly

avdtpsink

Bluetooth AVDTP sink

a2dpsink

Bluetooth A2DP sink for streaming audio

rtpsbcpay

RTP packet payload maker

Use Case : Bluetooth Device Discovery


draw.io Diagram
diagramNameBluetooth5.drawio
revision1
Image Removed


RDK Bluetooth A2DP Use Case - Audio Streaming

  • Set-top enables Bluetooth audio output (A2DP SRC).
  • Set-top uses Bluetooth periodic Inquiry procedure to discover A2DP SNK.
  • If user enables Bluetooth audio output, set-top discovers A2DP SNK but set-top and application has not registered to take control of Bluetooth pairing then:
  • set-top prompts user to select A2DP SNK device to pair and pairs upon user selection.
  • Set-top encodes audio output to A2DP SNK according to A2DP SNK's capabilities.
  • Set-top streams primary audio to A2DP SNK.
  • Set-top provides application layer control over Bluetooth enable/disable state.
  • Set-top notifies application via Bluetooth Service API when Bluetooth device is discovered.
  • Set-top logs connect/disconnect to/from Bluetooth device (A2DP SNK)

API Documentation

 To know more about SoC/Application level APIs details use in RDK, refer the link  BLUETOOTH API Documentation