RDK-V Emulator Users Guide


Copyright 2023 RDK Management, LLC. All rights reserved.

The contents of this document are RDK Management, LLC Proprietary and Confidential and may not be distributed or otherwise disclosed without prior written permission of RDK Management, LLC.

Document Status 



Document Control Number

D10-20141105

Document Title

RDK Emulator Users Guide

Version

D05

Date

2022/12/10

Status

Issued (I)

Distribution

RDK licensees & ASP Members

Document Status Codes



Work in Progress (WIP)

An incomplete document designed to guide discussion and generate feedback that may include several alternative requirements for consideration.

Draft (D)

A document in specification format considered largely complete, but lacking review. Drafts are susceptible to substantial change during the review process.

Pre-Issued (Pre I)

A revision of a document circulated for review or approval prior to release, but not approved for distribution

Issued (I)

A stable document, which has undergone rigorous review and is suitable for product design and development 
It will serve as a basis for testing requirements.

Legal Notices


This document is provided under the terms and conditions of the RDK License Agreement, License Agreement for Software Integration Kit, License Agreement for Set-top Box Software Integration Kit.

RDK Management LLC is not responsible for any liability of any nature whatsoever resulting from or arising out of any use or reliance upon this specification. This document is furnished on an "AS IS" basis, and RDK Management, LLC does not provide any representation or warranty, express or implied, regarding its accuracy, completeness, or fitness for a particular purpose."

Table of Contents


Introduction


RDK (Reference Design Kit) is an integrated set of software components, tools and documentation that help in the development of the software stack for set-top box based on the standard Linux operating system which is designed to meet the requirements of the latest generation media servers and clients.

The RDK emulator is an x86 based implementation of the RDK software stack. It is primarily targeted towards the RDK development community (integrators, component developers and application developers) that attempts to simplify the process of working with the RDK software stack without the need for a reference hardware platform.  As RDK emulator runs on desktop computers, applications can be tested and debugged before trying to deploy them to real devices.

Purpose of this Document


The purpose of this document is to enable RDK users and developers to be able to bring up the RDK stack and emulator on the PC platform. The document also includes step-by-step procedures to setup & build RDK Emulator

Audience


The intended audience includes the MSO teams, developers and external vendors responsible for the development of firmware and applications for RDK-based Set Top Boxes 

Scope


Scope of this document includes understanding RDK Emulator and  functionalities, supported build types and to run and test in Virtual Box environment.

Limitations


RDK Emulator does not support all components of RDK 4.0 stack. Currently there is no startup UI, system boots up in console mode.

Known Issues


  • High bitrate streams played using aamp-cli utility freezes during playback.
  • Screen goes blank after sometime 

Abbreviations and Acronyms


The following table describes the acronyms and abbreviations used in this document

Abbreviation/Acronym

Description

RDK

Reference Development Kit

VM

Virtual Machine

VBox

Virtual Box

STB

Set Top Box

XRE

Cross-Platform Runtime Environment

SPTS

Single Program Transport Stream

UPNP

Universal Plug and Play

Overview of RDK Emulator


  • Executes on x86-based platforms including virtualization environments such as Virtual Box and QEMU.
  • Multiple build types - media client
  • Up to date with the RDK generic trunk and any x86-specific platform code.
  • Built using Yocto and RDK build frameworks

Key Features


  • ResidentApp startup UI
  • Video/Audio playback using westerossink gstreamer element.
  • IP video streaming playback using aamp-cli utility

Supported Build Types



Build Types

RDK Components Involved

Features/Applications Supported

Final Image Name

Startup Application

 RDKV Mediaclient

  1. wpeframework
  2. webkitbrowser
  3. westeros
  4. gstreamer
  1. ResidentApp

rdk-generic-mediaclient-image-qemux86.vmdk

ResidentApp

Build Setup Instructions


Setting up the Host Environment


How to Build#SettinguptheHostEnvironment

Downloading Source Code & Building


RDK-V Emulator Build Guide

Bringing up the Emulator on Virtual Box


Host Requirements

RequirementRemarks
Linux                           64 bit Ubuntu 18.04 operating system
Free HDD SpaceMinimum 100GB Free Memory
Oracle Virtual Box6.1 or higher

Install Virtual Box and follow the following steps to bring up RDK Emulator on Virtual Box:

In the following steps, it is recommended to review the description and screenshot completely before proceeding with steps.

STEP 1: Create your new VM Instance:

  • Open Virtualbox

  • Select New [A popup will come up]

  • Select Type as ‘Linux’

  • Select Version as ‘Other Linux (32 Bit)’

  • Click on “Next”

  • Choose a Memory Size of at least 4GB


  • Use an existing virtual hard drive file which would be your newly built image in *.vmdk format and create your VM:

STEP 2: Configure your new VM Instance:

  • Click on “Settings” tab to configure your new VM instance

  • Set video memory to at least 64 MB in Display tab, and select the 3D acceleration option
  • Configure your VM's network settings
  • Choose “Bridged Adapter” mode as shown in the screenshot below


STEP 3 : Copy a video file to your file system to be used for emulator video playback.
  • Copy your video file from your host machine to any folder folder on the emulator VM 
  • Note: The following command is performed from your Host Machine
$ scp <file_name> root@<your_emulator_vm_ip>:/<path>

Usage Instructions


Logging into your VM


As described in the previous section, you can log in to your emulator VM from your Host Machine using the ssh command.

$ ssh root@x.x.x.x

Testing animation using westeros compositor test application

RDK emulator supports westeros compositor and renderer module as westeros-renderer-gl. Do the following to check westeros animation using westeros_test command line utility.

  • After logging in to the Emulator via ssh, kill the already running compositor application via below command and comment the last line in westeros-init.sh so that compositor is not started automatically on bootup
$ killall westeros

Comment the last line in /usr/bin/westeros-init.sh so that compositor is not started automatically on bootup
#westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display WPE
  • Restart the Emulator VM
  • Run following commands in terminal for manual starting the westeros compositor application
$ mkdir -p /run/user/0
$ export XDG_RUNTIME_DIR=/run/user/0/
$ export LD_PRELOAD=/usr/lib/libwesteros_gl.so.0.0.0
$ westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display WPE
  • Run westeros_test application in another window as given below
$ westeros_test


Testing video playback using Gstreamer command line utility

  • Start the westeros compositor application as mentioned before if its not already running.
  • Copy video files to the VM 
  • Execute below command(s) to play video
$ gst-launch-1.0 playbin uri=file:///<video file name with full path>

Testing video streaming using aamp-cli utility

  • Start the westeros compositor application as mentioned before if its not already running.
  • Execute the below command to play clear-stream videos
$ aamp-cli <url>
e.g.
$ aamp-cli http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
  • No labels

7 Comments

  1. Unknown User (darhaywa)

    The link to RDK-V Releases just takes you to the top of the page.

    I think this is a more useful link RDK-V Releases

  2. Unknown User (rahul.kumar1)

    I was Facing one issue regarding Virtual Box  on Windows 

    My VB version was  4.2.16. I was not able to do network configuration for Bridged Mode

    Possible Solution : I updated VB to latest version  6.1 

    Now i able to do ssh from terminal to my image 

  3. Unknown User (kencc_yang)

    For emulator, is there any official release RDK-V vmdk for test and study?
    I can find the sdimg for raspberrypi from rdkcentral.com, but no vmdk for emulator.

    Thanks,
    Ken

  4. Hi Ken Yang,

    We don't release emulator images (vmdk), you can build the image following the build instructions.

    Regards,

    Swati.

  5. Unknown User (girish_tc)

    how to test lightningJs App (Set-top-box App) on the emulator

    1. Unknown User (mohammad.naseem)

      You can use oracle vm box for emulator setup, please refer above given steps.

      you need to execute below commands from terminal:
      $ export XDG_RUNTIME_DIR=/run/user/0/
      $ export WAYLAND_DISPLAY=WPE
       
      then use rdkbrowser2 to launch your lightning app, make sure you have hosted your app on server.
       
      execute below command from terminal:
      $ ./rdkbrowser2 --url http://<lightningappurl>

  6. Unknown User (json.chou)

    Hi Shekh and Swati

       Looks the rdkbrowser2 and WPELauncher are both just to be used for testing webkit browser, are they expected to be used in the final MP products and must be build into final MP products? If there is no need to use it for testing, does it mean it does not need to be built into final MP products? Does the tdk test suit need to test it or any other TDK test suit depend on it?

    Thanks.