Skip to end of metadata
Go to start of metadata

.





 




RDK4

RDK4 is the latest version of the RDK-V software stack, designed to simplify app development and integration on any set-top device while allowing companies to maintain complete control of their apps, device data, and customer experience.

RDK4 is designed for use with Lightning™, a JavaScript-based app development language, but also supports HTML5 web apps and native streaming video apps integrated through Firebolt®.



RDK4 Includes



Introduction


Thunder is a Modular architecture with plug and play design where it has a flexibility to enable or disable any feature just as a plugin.

Key Components available in the THUNDER Framework -

  • WPE WebKit - powerful low-resource embedded WebKit engine with Wayland support
  • WPE Backend - Abstraction layer for WPE WebKit with support for MESA based gfx or Wayland/EGL gfx
  • Thunder - plugin based framework for embedding C/C++ components and bridging the "web" world.
  • RDK Services - RDK Services are set of services used to access device specific functionality.RDK Services are available for launching browser and native applications.It is built on WPE Framework (aka Thunder).

Thunder is a small framework built for embedded devices. It consists out of the following main components -

  • Framework Core
  • Framework Plugins
  • Framework UI


Thunder and RDK Services are key components for micro services to bring into any Box. Thunder offers an event driven interface framework for subsystem availability signaling to the plugins. This framework is utilized to realize concurrent startup scenario using a conditional evaluation only in case a condition changes. This allows for startup without requiring sleeps, or resource consuming polling mechanisms.

For each micro service, we need to implement one plugin as part of RDK Services, and Nano or microservices should configured as part of any of these subsystems.

Designed for Apps:

  • Pre-integrated premium apps
  • Pre-integrated app store
  • Voice enabled
  • Lightningtm App Dev Language


WPEFramework goal and Overview


Javascript enabler

Goal is to enable/bridge embedded low level C/C++ technology to the Javascript world and it is done by using Javascript enabler.

Architecture


High-level architecture :

Thunder Framework Overview

Application framework is built on Hardware abstraction Layer, on top of abstraction layer there is a WPE Framework. WPE framework itself dispatched internally that actually starts micro and nano services. Micro and Nano services are exposed to certain interfaces so at the end the system can locked down and executing.

From Apps, there are external input interface that can send in JSONRPC messages, JSONRPC messages through dispatcher will be routed to proper micro/nano services.

Modular architecture

  • The system is build up from several  layers. The functionality is contained in  modules.

Separation of concern

  • A nano/micro service has its own  dedicated task/function and fulfils this.  No managers!

Interface based

  • Interconnection between plugins is  based on interfaces.


Architectural Focus/Features


Architectural Focus

Agnostic to process boundaries (JSONRPC/COMRPC)

  • For security and stability functionality is realized in contained processes. To communicate to process boundaries we need JSONRPC/COMRPC.

Integral implementation of security features 

  • LXC containerization, including users and groups per processes.

Small footprint, low resource usage

  • Building it, only requires ZLIB.

Uniformity

  • All configuration is stored as JSON and read from 1 location, RESTFull API alignment  JSON field names always lowercase, path names Pascal case.

Features

WebControl

  • WPEFramework can be controlled from a webbrowser client on your PC.

Scoped Traceability (controlled from Web)

  • Fine granularity, trace what you need, Web Browser UI to control it all..

Execution architecture (resource constrained)

  • One thread to communicate all.Thread pools.

Ease of use when building a plugin

  • Object oriented approach for communication (JSON, HTTP, WebSocket, COM/JSON RPC).

No hard-linked dependencies

  • There is NO dependency between the plugins. Use subsystems !!!!

RPC Mechanisms Deployed


 Most important part of framework is to make sure we can run processes & separate process, we can run nano/micro services out of process. So, we need to communicate to nano/micro services throughout API's.

These API's are actually incremented in 2 ways.

  1. JSONRPC : Mainly targeted towards Javascript. Javascript talks to JSONRPC , Communication Layer goes into framework then it transit to C and C++ world, then from C and C++ world we can far communicate back to Javascript using JSONRPC .
  2. COMRPC : Internally when we want to communicate with different nano/micro services running in different process we can use COMRPC Process.

COMRPC

COMRPC is a binary RPC migration

  • Marshalling code,Proxy/Stubs are generated from the C header file!!

Interfaces

C header files with a struct definition and pure abstract methods

  • It is based on interfaces and its regular struct in header file that is to contract to actually closed down between two plugins or two instances of C&C++.
  • This struct and interface is to find how we communicate with other plugin or other nano/micro services.
  • If we define structs there is an application that actually creates marshalling code.

COMRPC

QueryInterface/AddRef/Release

  • Under struct, there is a layer coming from WPEframework that is called "COMRPC"
  • COMRPC will make sure Pluming URT isn't there so the queryInterface/AddRef/Release will make sure we can do navigation over the interfaces that  our lifetime on the interfaces.

Communication Layers

  • Domain Sockets
  • TCP Socket

COMRPC migration is part of WPEFramework. If we have COMRPC 'C' migration, the communication layer below are main sockets for TCP Server. It means we could communicate with any interface to other host.

JSONRPC

JSONRPC is to communicate JSON object  messages.

 JSON data objects, boiler plated handlers and documentation are generated from a JSON specification file!!

JSON

Actual exchange data in JSON format : RFC4627

  • RFC4627,this is the data message and contract between to separate nano/micro services.
  • This is typically used from web world(from spark or from webkit itself).
  • The relying of the message and pluming is done using JSONRPC.

JSONRPC

For deeper and detailed information of JSONRPC ,Please refer https://www.jsonrpc.org/specification 

Communication Layers

  • RESTFUL (Web World)
  • WebSocket (Web World)

Execution Architecture



  • If a command comes in on settop box ,it will actually be turn into message for eg in above figure ,the Webkit browser will send this message through pipeline to framework. Three pipelines coming out of the settop box, different pipelines for different kind of messages.
  • Received message will be deserialized that is getting back to original message and do get cpu usage. After which, we will look at the message where it has to sent to, that message will be packed with where it will send to and it is forward on to threadpool.
  • The threadpool are actually multiple threads maintained by multiple persons. Person pickups the job and secure it ,As in diagram the person is evaluating CPU Usage using machine, CPU Usage value is noted down on the message(eg: CPU usage is 50% in above figure) and send back to from where we initially got the message.
  • Here messages are handled by thread switch. One is communication thread and the other is thread that handled our request. This way the amount of threads used in the system will not increase when multiple connections are created, the more connections you create it will not lead to multiple threadings .

Resources opened up through JSONRPC



This gives us information regarding once system is ready ,what kind of micro/nano services are all available.
Difference between micro and nano is that micro service actually requires graphics -graphical resources or player resources.


Referrences



Webinar : RDK 4.0 Native App



RDK is a community-based project that allows developers, vendors and cable operators to use a defined stack of software on one layer in order to provision set-top boxes and gateways. Unique features of RDK such as commitment to open source, speed and flexibility of RDK-based devices makes it stand out from the conventional settop software stacks.

The RDK‐V standardized stack provides a common method to manage complex video and management functions such as rendering, content, content security, device management, networking, & peripherals. 

The RDK‐V Feature List is categorized by the below functions, Enhancements and new features are developed and contributed asynchronously by members of the RDK Community.

Category

Feature

Description

Dependency (If any)

Conditional Access










Conditional Access

CommScope CableCard Decrypt, PPV ReadyDevice Dependency
Technicolor CableCard Decrypt, PPV ReadyDevice Dependency
Containerization of key processes in support of European CA requirements (D-BUS, RMF, container for remaining processes)
DRMPlayReady 2.5 with RDK Security API integration
CDMi with PlayReady 2.5 integration EME v1
CDMi with Widevine v14 integration CDMi with Widevine v14 integration 
DTCPDTCP integration
Secure ConnectionsRemove all lower TLS fallbacks for connections to Xconf/DCM
Security Vulnerabilities


Input sanitization of htmldiag cgi-bin scripts
Upgrade to OpenSSL1.0.2o (Yocto Platforms)
Upgrade to NTP 4.2.8.p11Device Dependency
Disable USB Input HID DeviceDevice Dependency
Content Related



























Adaptive Bit Rate


HLS (HLS v3 and HLS v4)
MPEG-DASH (gstreamer plug-in)
HTLM-5 Video (MSE/ESE)
MPEG-DASH (Native)
Audio Input FormatsMPEG, MP3, AAC, LPCM, AC3
Audio Output FormatsStereo
Dolby Digital
Dolby ATMOS
Dolby Digital Plus (7.1 Channels)
Split HDMI and SPDIF audio outputs
Bit stream Pass-through
Dolby MS12Device Dependency
Audio TracksSAP, DVS
CodecsMPEG2, H.264, VP8
High Efficiency Video Coding (HEVC) (H.265/MPEG-H Part 10)
HDR 10 Bit (HEVC HLS) for IP settopDevice Dependency
HDR 10 4K IP VODDevice Dependency
DeliveryBroadcast, Video on Demand
Switched Digital Video
Video over Wi-Fi (XG->Xi, XG->XB/XW->Xi, XB->IP) ReadyDevice Dependency
IP Multiroom Music Playback (STB to Speakers)
DVBBroadcast DVB-C support
Teletext, Subtitles
In-Band System Information
EASQAM EAS, IP EAS
Song IdentificationCreate Audio Tracks for song recognition services
UHD/4KService Manager APIs for 4K and HDR capability information across devicesDevice Dependency
Content Delivery




Video Input FormatsMPEG2, H.264, VP8
Video Output Resolutions480i, 480p, 720p, 1080i, 1080p
Ultra HD/4K, Advanced High Dynamic Range (HDR)Device Dependency
Dolby Vision Advanced HDR for VODDevice Dependency
Video Over WiFiRefactor UPnP on Xi to be compatible with XB
VODQAM VOD, IP VOD
Ad Insertion





Ad InsertionClient Side Ad Insertion (Linear Segmented Advertisement)
RFC Control of LSA – “Programmer Enablement”Cloud Dependency
Reassemble segmented SCTE-35 splice information
Ad Insertion – Linear Segmented AdvertisingLSA support for back-to-back adsCloud Dependency
LSA support for back-to-back ads
IP DAIHandle DASH IP VOD Dynamic Ad Insertion (DAI) TransitionsCloud Dependency
Handle DASH IP VOD Dynamic Ad Insertion (DAI) Hangnail FragmentsCloud Dependency
Rendering
















Advertising Impressions/ Ad WatermarkingMonitor primary tuner for ETV Ad Data, report upstreamCloud Dependency
APIsService Manager
App FrameworkAAMP / RDK MediaPlayer integration on Raspberry Pi
AAMP Buffer health monitoring
Sound Playback for Spark + Native Apps
Firebolt ® SDK download from USB
Optimus Prime application manager
Firebolt ® on Raspberry Pi
Browser EngineQT WebKit 5.1.1
WebKit Pure Embedded integration
Connection SecuritySSL/TLS
GraphicsDirectFB, OpenGL ES
PluginsWebRTC
Rendering

QT 5.1.1
Westeros Wayland Based Compositor
WPE WebKitWPE on Raspberry Pi
Device Management













































App Launch OptimizationMigrate from system-journald to syslog-ng for improved performance (~10% reduction in CPU load)
Bluetooth AudioOptimize Bluetooth Discovery & Pairing
BuildYocto 2.2 Morty on Raspberry Pi Reference Platform
DownloadTFTP (CDL), HTTP
Download Enhancements (% download, Log timestamps)
Feature ControlSecuring RFC parameters via encryption
Firmware Download EnhancementsOmit IP Address From Xconf Firmware Download Request
Image CompressionBrotli Firmware Image Compression
ImplementationConverge RDK Video and RDK Broadband Messaging Bus
Initialization & ResetsRemote Reboot, Warehouse Reset, Factory ResetCloud Dependency
Detect & log absence of RF signal within 30s of boot (Thermo)
Boot Time Optimization (Phase 1) –Approx 5% reduction in Boot Time
Boot Time Optimization (Phase 2) – 20% reduction in Boot Time
KernelLinux 4.14 on Raspberry Pi Reference Platform
Local DiagnosticsHTML Diagnostics
Tuner Reservation Diagnostics
Front Panel LED
LoggingTFTP Log Upload, HTTP Log UploadCloud Dependency
Distribute (smear) logging uploads (dependent on XCONF Server)Cloud Dependency
Memory OptimizationUse Flash/SD Card for Firmware Download Temporary Storage (CDL scratchpad)Device Dependency
MoCa 2.0Supports MoCa 2.0 diagnosticsDevice Dependency
Platform EnhancementsCommon WiFi HAL for RDK VideoDevice Dependency
Converge to GCC V6.4 for all Yocto versionsDevice Dependency
Uniform flash mounting services for Video devices
PowerStandby, Light Sleep
Deep Sleep on IP ClientsDevice Dependency
Power SaveSupports ability to enable HDMI port while in standby mode
Remote ManagementSNMP, TR-069, TR-135Cloud Dependency
SNMP v3
SNMP Security Hardening
WebPA (IP Clients)
WebPA (QAM Clients)
ssh (secure shell into the device)/ reverse ssh (send trigger to have device initiate ssh)
Feature Control (Remotely enable/ disable individual features on devices without new code deployment)Cloud Dependency
Resource OptimizationImproved handling of app termination/suspension conditions (based on available memory rather than concurrency)
RevenantPersistent WiFi Enable/Disable
SecurityIntrusion Detection
Self HealingSupports hardware self testDevice Dependency
Thermal Monitoring and Shutdown
Self TestSelf Test AppDevice Dependency
Hardware Self Test via WebPADevice Dependency
TelemetryTR-181 Object TelemetryCloud Dependency

IP Video Telemetry
ToolsDOCSIS Spectrum Analyzer
WiFi Band & AP SteeringConfigurable WiFi Roaming Settings
Dual Band WiFi
Networking







DLNAVidiPath (DNLA CVP-2)
DSGDOCSIS ready
IP DirectIP Direct support on DOCSIS devices
LAN IPAuto IP, DHCP, Dual Virtual
MOCAMOCA 2.0 support on the home networkDevice Dependency
WAN IPeCM IPv4/IPv6, eSTB IPv4
IPv6 for IP clients
Wi-FiOnboard/Recovery SSID (Lost+Found) ReadyDevice Dependency
WPA Enterprise (IP settop to use Wi-Fi 802.1x authentication) ReadyDevice Dependency
Ports/Peripherals











Audio Output PortsHDMI, SPDIF, Composite ReadyDevice Dependency
Bluetooth Audio Output ReadyDevice Dependency
HDMIHDMI Out, HDCP Enforcement, HDMI In
HDMI Consumer Electronics Control (HDMI-CEC) Power Sync
HDMI Switching (Combine CEC and HDMI Input features to enable advanced switching)
USBWebRTC Camera ReadyDevice Dependency
USB Port Detection and Control ReadyDevice Dependency
USB Camera Support ReadyDevice Dependency
WebRTC HW acceleration for encode/decode to enhance performance
User Input

IR Remote
RF Remote with Automatic Pairing to Settop ReadyDevice Dependency
Voice Remote (RF4CE based) ReadyDevice and Cloud Dependency
Video Output PortsHDMI, Component, Composite



  • No labels