You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 45 Next »

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 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.

1. Bluetooth daemon (Bluez based) - Interacts with kernel layer bluetooth modules
2. Bt-Ifce (Abstracts Bluez versions and servers as a HAL for other Bluetooth stacks) - Interacts with Bluez over DBus
3. Bluetooth HAL (BTRCore) - Provide API to perform Bluetooth operations by abstracting and simplifying the complexities of Bt-Ifce (& BLuez)
4. BTRMgr -  Utilize API's exposed by BTRCore to perform high level Bluetooth ops like Scan, Pair, Connect and achieve usecases like AudioOut. 
                       Exposes interfaces for external entities to perform BTRMgr related operation using IARM
5. ServiceManager [BluetoothService] - Interacts with BTRMgr based on Application requirements using IARM. Guide applications are interact with Service Manager.

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


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.



BlueZ D-Bus Communication


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.

Provides methods and events to support the following features,

  • Device discovery
  • Pairing with the remote device
  • Connecting to the device after authentication.
  • Choose Audio stream to be streamed to other bluetooth device.
  • Provides method to select appropriate audio sink

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.

BTRMgr Provides an interface to port any Bluetooth stack on RDK Provides an interface to port any Bluetooth application on RDK

The bluetooth_mgr daemon manages Bluetooth services in RDK. It uses IARM Bus to facilitate communication between the application and Bluetooth driver through Bluetooth Manager component. 

Bluetooth HAL Interface:

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.

Some Bluetooth supported gstreamer plugins used by BlueZ 5:


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



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



--------------------------------------INTERNAL---------------------------------------------------------

Anchor testing : this should take us to the end of the page.

Below is the Tooltip sample

------------------------------------------

Below is the Expand macro sample

This is the expand macro text

---------------------------------------------

Below is the include page macro sample - <includes rdkbrowser page contents into this page>

RDK Browser

Summary

The RDK Browser is a fully functional web browser built into the RDK which allows RDK Set-top Boxes to browse and display 3rd party web pages/apps.  The currently deployed RDK Browser is a port of QTWebkit.  A future version based on WebkitForWayland is being developed, as QTWebkit is no longer supported.

Webkit and QtWebkit

Webkit is an open source Apple layout engine for rendering HTML and HTML5 in web browsers, based on KHTML and KJS by KDE.   It was originally written to work on the Qt cross-platform application framework, but was made toolkit independent by Apple when they took over the development, which they later open-sourced.  Primarily written in C++, but with some added Apple Objective-C message/calls, Webkit provides a set of classes to display web content in layout windows, and implements browser features such as hyperlinks, and the navigation of forward and backward within the history.    

QtWebkit is a port of Apple's Webkit which utilizes the functionality of the Qt cross-platform application framework, while including the improvements Apple made from the original KHTML and KDE.  The RDK platform uses Qt in other areas, such as the Receiver.  The version of Webkit used in the RDK version of the browser is 537.21 (as reported by Javascript).

Webkit is a well-known standard for browsers.  



Browser

Rendering Engine

ChromeWebkit 537.36
SafariWebKit 601.2.7
EdgeWebKit 537.36
Firefox

Gecko/20100101

(iOS version uses Webkit 602.1.50

RDK

QTWebkit

Browser

Webkit 537.21

Mobile Browser

Rendering Engine

Chrome (Android)Webkit 537.36
Chrome (iOS)Webkit 602.1.50
Firefox (Android)Gecko/20100101
Firefox (iOS)Webkit 602.1.50


References

Wikipedia: WebKit

QT Webkit

HTML Support

Supported Features

  • HTTPS
  • Redirects
  • HTTP Cookies (limited support, in-memory only)
  • Javascript
  • Clipboard (copy-paste)
  • Webgl (experimental)
  • HTML5 Canvas 
  • CSS3 (http://css3test.com/ 48% score)
  • CSS3 downloadable fonts
  • Websockets
  • audio tag (aac, mp3)
  • video tag (h.264)
  • Flash Player 11.1

Unsupported HTML Features

  • uploading files:  type=file of input tag
  • downloading files
  • popup windows

Limitations

There are no software codecs. Hardware support is limited in a number of processing units, which is one processing unit per a video stream and one processing unit per an audio stream. 

Flash Plugin Support

Supported Features

  • Flash Plugin 11.1
  • SWF (Flash 11.1)
  • Video should be limited to H.264 due to presence of hardware decode and rendering support
    • HW decoded video is displayed in a hardware video plane behind the Flash content. Flash content can composite on top of the video. But flash content cannot be composited below video. There is no support for transparency within the video stream.
    • Other Flash video formats are supported but may not perform adequately due to lack of hardware support.
  • Image file formats are Progressive JPEG, and PNG
  • Supported audio codecs are MP3, ADPCM, Nellymoser, Speex and AAC.

Limitations

There are no software codecs. Hardware support is limited in a number of processing units, which is one processing unit per a video stream and one processing unit per an audio stream. 

Comparison of QTWebkit CSS Features to other browsers


The following is a comparison of the CSS features offered by some of the standard browsers, and the RDK QtWebkit.  With the exception of Firefox and IE, the rest of the browsers are all based off of Webkit. A breakdown of the actual features missing can be found in the appendices.  These tests are based on the site:  http://css3test.com/


Comparison of RDK QTWebkit HTML5 features to other browsers

The following is a comparison of the HTML features offered by some of the standard browsers, and the RDK QtWebkit.  With the exception of Firefox and IE, the rest of the browsers are all based off of Webkit. A breakdown of the actual features missing can be found in the appendices.  These tests are based on the site:  https://html5test.com/



Video playback, MSE and EME

RDK QTWebkit supports Media Source Extensions (MSE) and Encrypted Media Extensions (EME).  


The version of MSE supported is: MSE Spec Version: 10 December 2013  (conformance results here)



Google MSE conformance test used:

http://yt-dash-mse-test.commondatastorage.googleapis.com/unit-tests/2016.html?enablewebm=off&timestamp=1480519673236


Currently only EME version 0.1b is supported.   Playready is currently the only DRM supported.


DRMs supported by RDK QtWebkit EME

DRM

SUPPORTED

PlayreadyYES

Widevine

NO
ClearKeyNO
AxinomNO
AES-128Not natively, may be supported by a specific player


Codecs supported by RDK QTWebkit

Mime Type / Codec

Description

video/mp4;codecs="avc1.42E01E, mp4a.40.2"H.264 Simple baseline profile video (main and extended video compatible) level 3 and Low-Complexity AAC audio in MP4 container
video/mp4;codecs="avc1.58A01E, mp4a.40.2"H.264 Extended profile video (baseline-compatible) level 3 and Low-Complexity AAC audio in MP4 container
video/mp4;codecs="avc1.4D401E, mp4a.40.2"H.264 Main profile video level 3 and Low-Complexity AAC audio in MP4 container
video/mp4;codecs="avc1.64001E, mp4a.40.2"H.264 'High' profile video (incompatible with main, baseline, or extended profiles) level 3 and Low-Complexity AAC audio in MP4 container
video/ogg;codecs="theora, vorbis"Theora video and Vorbis audio in Ogg container 
audio/ogg;codecs=vorbisVorbis audio alone in Ogg container 
video/mp4; codecs="avc1.42E01E"H.264 baseline in MPEG-4 container
audio/mp4; codecs="mp4a.40.2"AAC low-complexity in MPEG-4 container 
audio/mpeg;codecs="mp3"Audio mp3
video/webm; codecs="vorbis,vp8"WebM with VP8 video and Vorbis

Codecs NOT supported by RDK QTWebkit

Mime Type / Codec

Description

application/x-mpegurlHLS x-mpegurl
application/vnd.apple.mpegurlHLS vnd.apple.mpegurl
video/mp4;codecs="mp4v.20.8, mp4a.40.2"MPEG-4 Visual Simple Profile Level 0 video and Low-Complexity AAC audio in MP4 container
video/mp4;codecs="mp4v.20.240, mp4a.40.2"MPEG-4 Advanced Simple Profile Level 0 video and Low-Complexity AAC audio in MP4 container 
video/3gpp;codecs="mp4v.20.8, samr"MPEG-4 Visual Simple Profile Level 0 video and AMR audio in 3GPP container
video/ogg;codecs="theora, speex"Theora video and Speex audio in Ogg container
audio/ogg;codecs=speexSpeex audio alone in Ogg container
audio/ogg;codecs=flacFLAC audio alone in Ogg container 
video/ogg;codecs="dirac, vorbis"Dirac video and Vorbis audio in Ogg container
video/x-matroska;codecs="theora, vorbis"Theora video and Vorbis audio in Matroska container 



Remote Web Inspector

The RDK browser has a hidden feature called "Remote Web Inspector."  This features sends information to a remote browser for debugging purposes. 

Setting up the STB to use RWI

The STB and Computer/Laptop/Terminal which is displaying the information must be on the same network for Remote Web Inspector to work.  There are several ways to accomplish this:

   1) Use a Moca to Ethernet bridge.  This is the easiest solution.  The bridge provides an IP address with which to connect to the STB using it's Moca IP address, without requiring it to obtain a local one.

   2)  If the STB is a dev box, it is sometimes possible to connect both Computer and STB to a hub, and connect through the local network.  DHCP must be enabled on the STB so it may obtain it's own IP           address, if this is the case.  

   3)  If you have access to the STB with root access, you can connect it to a that is also connected to a PC, and then use the "ifconfig eth0 x.x.x.x" command to give the STB an IP address that is on the same   network as the PC

If you can ping the PC from the STB, you have a good connection (make sure your PC doesn't ignore pings, of course).

Connecting to Remote Web Inspector

Now that everything else is set up, you can connect to the RWI.  Open up either Safari or Chrome > v 5.5 and browse to the following address:  http://<ESTB_IP_ADDR>:9222

    If 9222 doesn't work, try port 9223

A link may be presented, if so, click on it, and you're in!










---------------------------------------------

This is the text to test Anchor functionality


  • No labels