RDK Resources

[*ASP Wiki*]

Code Management Facility

Code Releases

RDK Forums

[RDK Conferences]

RDK Support

Archives

Papers & Presentations Archive

In the News!

Skip to end of metadata
Go to start of metadata

Introduction

RDK-4.0 Beta Introduction

This page is dedicated for the beta version release of RDK-4.0. Main focus of this RDK-4.0 would be comprising of "Systemd" init systems and "Thunder Framework" app framework. Systemd would be predominantly used for triggering the RDK services and basic root file system services. Thunder Framework will be launching the applications of RDK through thunder plugins.

Below are few of the highlights on the beta RDK 4.0 Beta Release : 

  • All RDKV Components and all the features of RDKV supported by default
  • Lightning apps can be developed and validated through RDK-4.0 Beta Thunder image
  • All New RDK specific Thunder plugins can be integrated easily as already all RDK components are available in the image
  • With RDK-4.0-Beta image, Spark Plugin is integrated and can load simple spark applications from controller UI

ThunderFramework

Thunder is a Modular architecture with plug and play design where we can enable or disable any feature just as a plugin

Key Components available in the THUNDERFramework

  • 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.
  • ThunderNanoServices - Various plugins from a DHCP Server, Wi-Fi Control, Bluetooth, Compositor to premium app based plugins (NF, Amazon, etc)

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 ThunderNanoservices 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 need to implement one plugin as part of ThunderNanoservices and Nano or microservices should configured as part of any of these subsystems.

enum subsystem {


PLATFORM = 0,

// platform is available.


NETWORK,

// Network connectivity has been established.


IDENTIFIER,

// System identification has been accomplished.


GRAPHICS,

// Graphics screen EGL is available.


INTERNET,

// Network connectivity to the outside world has been established.


LOCATION,

// Location of the device has been set.


TIME,

// Time has been synchronized.


PROVISIONING,

// Provisioning information is available.


DECRYPTION,

// Decryption functionality is available.


WEBSOURCE,

// Content exposed via a local web server is available.


}

Yocto Build Procedure

Build Steps:

Systemd + thunder image

$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkv-asp-nosrc.xml -b thunder

$ repo sync -j4 --no-clone-bundle

$ source meta-cmf-raspberrypi/setup-environment

select meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-hybrid-thunder.conf

$ bitbake rdk-generic-hybrid-thunder-image

Boot-up Splash Screen

 After boot-up, you will get RDK Splash Screen with IP Address in right corner

Thunder Controller UI

 Type IP Address in any browser of the host PC to get Controller UI for Thunder

UI will get into Apps screen after few seconds.

Spark Apps

Enable Spark Plugin to launch spark apps as shown below

Streamer Plugin Nano service

Through Streamer Nano service we can able to request Thunder nano service called streamer to play HLS video content through aamp player 

  1. curl --data-binary '{"jsonrpc": "2.0", "id": 1234567890, "method": "Streamer.1.create", "params": {"type": "ip"} }' -H 'content-type:text/plain;' http://$IP/jsonrpc
  2. curl --data-binary '{"jsonrpc": "2.0", "id": 1234567890, "method": "Streamer.1.load", "params": {"index": 0, "location" : "http://rdmedia.bbc.co.uk/dash/ondemand/bbb/2/client_manifest-common_init.mpd"} }' -H 'content-type:text/plain;' http://$IP/jsonrpc
  3. curl --data-binary '{"jsonrpc": "2.0", "id": 1234567890, "method": "Streamer.1.attach", "params": 0}' -H 'content-type:text/plain;' http://$IP/jsonrpc
  4. curl --data-binary '{"jsonrpc": "2.0", "id": 1234567890, "method": "Streamer.1.speed@0", "params": 100}' -H 'content-type:text/plain;' http://$IP/jsonrpc

Note : $IP ipaddress of box

More More details Refer https://github.com/WebPlatformForEmbedded/ThunderNanoServices/blob/master/Streamer/StreamerPlugin.md

Launching Thunder in Host PC

Download below project in local PC

This Project is A flexible and extensible JS library to interact with Thunder from local webbrowser

$ git clone https://github.com/WebPlatformForEmbedded/ThunderJS

$ npm install

Run

$ npm run example:browser 

Debugging Lightening Apps

For Debugging Lightening apps, in WebBrowser provide the <STB-ipaddress:9998> as shown below

Thunder Logs

To get Thunder logs ssh to the box

$ systemctl status wpeframework

$ journalctl -x -u wpeframework

Log level can be increased through Tracing Plugin in Controller UI

Useful Links

Example Lightening demo App: https://github.com/WebPlatformForEmbedded/Lightning-Demo-App

More details about plugins : https://github.com/WebPlatformForEmbedded/ThunderNanoServices


  • No labels

5 Comments

  1. Could you please include this too ?

    In Yocto Build Steps;
    It would be better if you include the 'source setup env' section.

    Thanks in advance.

  2. Hi Arun P Madhavan,

    Thanks for pointing out and it got addressed now.


  3. Hi!

    Running command curl --data-binary '{"jsonrpc": "2.0", "id": 1234567890, "method": "Streamer.1.create", "params": {"type": "ip"} }' -H 'content-type:text/plain;'http://$IP/jsonrpc 

    results in error curl: (7) Failed to connect to 10.10.10.134 port 80: Connection refused. How can we run http server or jsonrpc module in RDK framework on RPI?


    Thanks

    Ankit


    1. Check in controller UI "Stremer plugin" is enabled and its running

  4. Getting below error while syncing the repo

    fatal: remote error: access not permitted
    error: Cannot fetch components/asp/rdk-oe/meta-rdk-asp from https://code.rdkcentral.com/r/components/asp/rdk-oe/meta-rdk-asp

    Fetching project components/generic/rdk-oe/meta-rdk-ext
    fatal: remote error: access not permitted