Introduction

RDK-V IP Client is a IP based Client Set-Top-Box (STB) with RDK 4.0 features which connects directly with Network Gateways. Targets on Accelerator platforms and utilizes only open-sourced RDK components.

Unused components from MediaClient :

IP STB build is based from medicalient image with out the licensed components and other components which are not required for IP streaming. Some of the components which are removed as of now are,

Host Setup

Refer to the below link for Host Machine Setup

How to Build#SettinguptheHostEnvironment

Yocto Build Setup

All RPi based RDK images with the latest features are from the rdk-next branch

Initializing the Build Environment

To build RDK images from ipstb_bringup branch, follow the below build procedure

Generic build
mkdir workspace
cd workspace

# initialize the manifest with repo tool # initialize the manifest with repo tool
repo init -u https://code.rdkcentral.com/r/rdkcmf/manifests -b rdk-next -m rdkv-extsrc.xml
repo sync  -j `nproc` --no-clone-bundle --no-tags

Image build

generic image
MACHINE=raspberrypi-rdk-ipmc source meta-cmf-raspberrypi/setup-environment

bitbake rdk-generic-ipclient-image

Flashing Procedure

The image file will be generated under build-<MACHINE>/tmp/deploy/images/<MACHINE> directory.

eg: $ pwd

build-raspberrypi-rdk-ipmc/tmp/deploy/images/raspberrypi-rdk-ipmc

$ ls -lrt rdk-generic-ip-stb-client_rdk-next_20210914060227.rootfs.rpi-sdimg

-rw-r--r-- 2 dsrava434 dsrava434 478150656 Sep 13 12:33 rdk-generic-ip-stb-client_rdk-next_20210914060227.rootfs.rpi-sdimg

build-raspberrypi-rdk-ipmc/tmp/deploy/images/raspberrypi-rdk-ipmc$ 

For flashing the image use dd command.

eg:   sudo dd if=rdk-generic-ip-stb-client_rdk-next_20210914060227.rootfs.rpi-sdimg of=/dev/sdb bs=4M

[sudo] password for bcpuser149: 

114+0 records in

114+0 records out

478150656 bytes (478 MB, 456 MiB) copied, 7.01847 s, 68.1 MB/s


# Insert the micro SD card to the host system and mention the card's device file name
# input file (if) is the image file to flash and the output file (of) is the card's device file name
sudo dd if=<imagename> of=/dev/<sd file> bs=4M 

System View

Testing Procedure

  •  Controller UI : For connecting Controller UI, use URL: http://<machineip>:9998

 

  • Enabling / Disabling the Plugins from controller UI. 

     

  • Wi-Fi Services: Wifi related services can be triggered from Wi-Fi tab in controller UI. We can scan and select from available networks.

  • R-Pi Board Console Access : Execute ssh root@machineip from your host PC
  • Image Details Verification: For verifying the image details, we can use cat /version.txt command.     

root@raspberrypi-rdk-ipmc:~# cat /version.txt 

imagename:rdk-generic-ip-stb-client_rdk-next_20210913065804

BRANCH=rdk-next

YOCTO_VERSION=morty

VERSION=4.09.13.21

SPIN=0

BUILD_TIME="2021-09-13 06:58:04"

Generated on Mon Sep 13  06:58:04 UTC 2021

root@raspberrypi-rdk-ipmc:~# 

  •  Playing a video using gstreamer, with aamp as gstreamer plugin element by using aamp:// in the uri:

  eg :- gst-launch-1.0 playbin uri=aamp://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8 video-sink=westerossink

  • Playback through Youtube Application : For launching youtube from controller UI, enable cobalt plugin, youtube page will be loaded in TV UI.

   

  • Youtube Launched Output in the TV:


  • Youtube Launching Via Resident App: To load Youtube from Resident app UI, select Premium content 1 and press enter

  • Once entered the premium content1, Youtube page will be loaded.

  • Select and press enter to begin the playback.

  • To return to main menu, press cntl+m or home button.
  • CNN Launching via Resident App UI: Select CNN and press Enter key to launch CNN.

           

           

         select video and press Enter key to start playback

         

Launching Vimeo using Resident APP : Select vimeo from resident app UI and press Enter to launch app.

         

      Select and press Enter to start playback.

         


           

To return to main menu from any of the app window use "Home" button in keyboard.

For further details on UI page, visit RDK Accelerator Home UI - Version 2.0#ControllerUI

Cobalt lifecycle using terminal:

Launching cobalt using RDK Shell : execute below command from ssh terminal

   curl --data-binary '{"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.launch", "params":{"callsign": "Cobalt", "type":"", "uri":""}}' -H 'content-type:text/plain;' http://127.0.0.1:9998/jsonrpc

 Setting a video URL using deeplink method.

    curl --data-binary '{"jsonrpc":"2.0", "id":3, "method":"Cobalt.1.deeplink","params": "<videoURL>"}' -H 'content-type:text/plain;' http://127.0.0.1:9998/jsonrpc

Sending enter key to proceed video playback

    curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.generateKey", "params":{"keys":[ {"keyCode": 13,"modifiers": [],"delay":1.0}]}}' http://127.0.0.1:9998/jsonrpc

Suspending the plugin using RDKShell

   curl --data-binary '{"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.suspend", "params":{"callsign": "Cobalt"}}' -H 'content-type:text/plain;' http://127.0.0.1:9998/jsonrpc

Resuming the plugin

   curl --data-binary '{"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.launch", "params":{"callsign": "Cobalt", "type":"", "uri":""}}' -H 'content-type:text/plain;' http://127.0.0.1:9998/jsonrpc

Destroy

    curl --data-binary ' {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.destroy", "params":{"callsign":"Cobalt"}}' -H 'content-type:text/plain;' http://127.0.0.1:9998/jsonrpc

Known Issues

S. NoIssuesStatusRemarks
1Unable to pair bluetooth remote via resident appopenBT via controller UI is working as expected
2Wifi connections are unsuccessful via resident appOpenWifi via controller Ui is working as expected
3Board reboot every 30 minutesopen

As work around, comment out On failure from dsmgr.service.

Path : /lib/systemd/system/dsmgr.service

Comment out " OnFailure=reboot-notifier@%i.service"

4App launch takes time to loadOpenblank screen is observed between key press and video playback begins for a small amount of time

Trouble Shooting

  • Overcoming build time fetch errors: 
    • If fetch failure occurs for libinput, comment SRC_URI related changes from meta-cmf/recipes-graphics/libinput/libinput_git.bbappend.
    • If fetch failure occurs for gst-plugins-ugly,use mirror source, for that comment out SRC_URI related changes from meta-cmf/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bbappend.    
  •  If the wireless networks are not listed in controller wifi page, try after disabling and enabling wifi from Network page, networks will be listed.

1 Comment

  1. Unknown User (rnarayanan) I've setup a host environment in an AWS EC2 instance and followed the steps above but about 2 hours into the build I'm seeing an error. Can you tell me what I'm doing wrong?

    FYI: I had to change the version of python from python3 to python2.7 because after running "MACHINE=raspberrypi-rdk-ipmc source meta-cmf-raspberrypi/setup-environment" I was seeing this error;

    OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3.
    Please set up python v2 as your default 'python' interpreter.
    | ERROR: oe_runmake failed
    | cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
    | cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
    | cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
    | In file included from /usr/include/stdlib.h:55:0,
    |                  from graphics.c:31:
    | /usr/include/bits/floatn.h:75:1: error: unknown machine mode '__TC__'
    |  typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
    |  ^~~~~~~
    | /usr/include/bits/floatn.h:87:9: error: unknown type name '__float128'
    |  typedef __float128 _Float128;
    |          ^~~~~~~~~~
    | In file included from /usr/include/stdlib.h:55:0,
    |                  from vgft.c:31:
    | /usr/include/bits/floatn.h:75:1: error: unknown machine mode '__TC__'
    |  typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
    |  ^~~~~~~
    | /usr/include/bits/floatn.h:87:9: error: unknown type name '__float128'
    |  typedef __float128 _Float128;
    |          ^~~~~~~~~~
    | In file included from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/pthreads/vcos_platform.h:47:0,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/vcos.h:118,
    |                  from vgfont.h:36,
    |                  from graphics.c:34:
    | /usr/include/pthread.h:682:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |       __cleanup_fct_attribute;
    |       ^~~~~~~~~~~~~~~~~~~~~~~
    | /usr/include/pthread.h:694:3: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |    __cleanup_fct_attribute;
    |    ^~~~~~~~~~~~~~~~~~~~~~~
    | /usr/include/pthread.h:739:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |       ;
    |       ^
    | In file included from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/pthreads/vcos_platform.h:47:0,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/vcos.h:118,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vmcs_host/vc_dispmanx.h:33,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/khronos/include/EGL/eglplatform.h:110,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/khronos/include/EGL/egl.h:36,
    |                  from graphics_x_private.h:35,
    |                  from vgft.c:33:
    | /usr/include/pthread.h:682:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |       __cleanup_fct_attribute;
    |       ^~~~~~~~~~~~~~~~~~~~~~~
    | /usr/include/pthread.h:694:3: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |    __cleanup_fct_attribute;
    |    ^~~~~~~~~~~~~~~~~~~~~~~
    | /usr/include/pthread.h:739:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |       ;
    |       ^
    | In file included from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/pthreads/vcos_platform.h:47:0,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/vcos.h:118,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vmcs_host/vc_dispmanx.h:33,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/khronos/include/EGL/eglplatform.h:110,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/khronos/include/EGL/egl.h:36,
    |                  from graphics_x_private.h:35,
    |                  from font.c:56:
    | /usr/include/pthread.h:682:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |       __cleanup_fct_attribute;
    |       ^~~~~~~~~~~~~~~~~~~~~~~
    | /usr/include/pthread.h:694:3: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |    __cleanup_fct_attribute;
    |    ^~~~~~~~~~~~~~~~~~~~~~~
    | /usr/include/pthread.h:739:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
    |       ;
    |       ^
    | In file included from /usr/include/stdlib.h:55:0,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/pthreads/vcos_platform.h:59,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vcos/vcos.h:118,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/vmcs_host/vc_dispmanx.h:33,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/khronos/include/EGL/eglplatform.h:110,
    |                  from /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/interface/khronos/include/EGL/egl.h:36,
    |                  from graphics_x_private.h:35,
    |                  from font.c:56:
    | /usr/include/bits/floatn.h:75:1: error: unknown machine mode '__TC__'
    |  typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
    |  ^~~~~~~
    | /usr/include/bits/floatn.h:87:9: error: unknown type name '__float128'
    |  typedef __float128 _Float128;
    |          ^~~~~~~~~~
    | ../../Makefile.include:11: recipe for target 'graphics.o' failed
    | make: *** [graphics.o] Error 1
    | make: *** Waiting for unfinished jobs....
    | ../../Makefile.include:11: recipe for target 'vgft.o' failed
    | make: *** [vgft.o] Error 1
    | ../../Makefile.include:11: recipe for target 'font.o' failed
    | make: *** [font.o] Error 1
    | make: Leaving directory '/home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/git/host_applications/linux/apps/hello_pi/libs/vgfont'
    | WARNING: /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/temp/run.do_compile.11929:1 exit 1 from 'exit 1'
    | ERROR: Function failed: do_compile (log file is located at /home/ubuntu/workspace/build-raspberrypi-rdk-ipmc/tmp/work/raspberrypi_rdk_ipmc-rdk-linux-gnueabi/userland/git-r5/temp/log.do_compile.11929)
    ERROR: Task (/home/ubuntu/workspace/meta-raspberrypi/recipes-graphics/userland/userland_git.bb:do_compile) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 1034 tasks of which 0 didn't need to be rerun and 1 failed.
    NOTE: Writing buildhistory
    
    Summary: 1 task failed:
      /home/ubuntu/workspace/meta-raspberrypi/recipes-graphics/userland/userland_git.bb:do_compile
    Summary: There were 23 WARNING messages shown.
    Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
    ubuntu@ip-172-31-25-146:~/workspace/build-raspberrypi-rdk-ipmc$ client_loop: send disconnect: Broken pipe