RDK Resources
RDK Preferred
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
org.rdk.RDKShell.1
RDKShell controls the management of composition, layout, Z order, and key handling
Description: moves the client to the front or top of the Z order
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.moveToFront", "params":{ "client": "org.rdk.Netflix"}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description:
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.moveToBack", "params":{ "client": "org.rdk.Netflix" }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Moves the client behind the specified target
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.moveBehind", "params":{ "client": "org.rdk.Netflix", "target": "org.rdk.RDKBrowser2"}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Sets focus to the specified client
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setFocus", "params":{ "client": "org.rdk.Netflix" }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Kills the client
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.kill", "params":{ "client": "org.rdk.Netflix" }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Adds a key intercept to the client application specified. The keys are specified by key code and a set of modifiers. Regardless of the application that has focus, key presses that match the key code and modifiers will be sent to the client application
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.addKeyIntercept", "params":{ "keyCode": 10, "modifiers": ["alt", "shift"], "client": "org.rdk.Netflix" }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Removes the key intercept
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.removeKeyIntercept", "params":{"keyCode": 10, "modifiers": ["alt", "shift"], "client": "org.rdk.Netflix"}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: gets the screen resolution
Arguments: none
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getScreenResolution", "params":{ }} Response: {"jsonrpc":"2.0", "id":3, "result": {"w": 1920, "h": 1080} }
Description: Sets the screen resolution
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setScreenResolution", "params":{ "w": 1920, "h": 1080 }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Gets a list of clients
Arguments: none
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getClients", "params":{ }} Response: {"jsonrpc":"2.0", "id":3, "result": { "clients": ["org.rdk.Netflix", "org.rdk.RDKBrowser2"]} }
Description: returns an array of clients in Z order, starting with the top most application client first
Arguments: none
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getZOrder", "params":{ }} Response: {"jsonrpc":"2.0", "id":3, "result": { "clients": ["org.rdk.Netflix", "org.rdk.RDKBrowser2"]} }
Description: gets the bounds of the specified client
Arguments:
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getBounds", "params":{ "client": "org.rdk.RDKBrowser2"}} Response: {"jsonrpc":"2.0", "id":3, "result": { "x": 0, "y": 0, "w": 600, "h": 400} }
Description: sets the bounds of the specified client
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setBounds", "params":{ "client": "org.rdk.RDKBrowser2", "x": 0, "y": 0, "w": 600, "h": 400 }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: gets the visibility of the specified client
Arguments:
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getVisibility", "params":{ "client": "org.rdk.Netflix" }} Response: {"jsonrpc":"2.0", "id":3, "result": {"visible": true} }
Description:
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setVisibility", "params":{ "client": "org.rdk.Netflix", "visible": true }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: gets the opacity of the specified client
Arguments:
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getOpacity", "params":{ "client": "org.rdk.Netflix"}} Response: {"jsonrpc":"2.0", "id":3, "result": { "opacity" : 100} }
Description: Sets the opacity of the given client
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setOpacity", "params":{ "client": "org.rdk.Netflix", "opacity": 100}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Enables or disables inactivity reporting and events
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.enableInactivityReporting", "params":{ "enable": true}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Sets the inactivity notification interval
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setInactivityInterval", "params":{ "interval": 15}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Adds a key listener to an app. The keys are bubbled up based on their z-order
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.addKeyListener", "params":{ "keys": [{ "keyCode": 49, "modifiers": [], "activate":false, "propagate":true }, { "keyCode": 50, "modifiers": [], "activate":false, "propagate":true }], "client": "org.rdk.Netflix" }}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Removes a key listener for an app
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.removeKeyListener", "params":{"keys": [{ "keyCode": 49, "modifiers": [] }, { "keyCode": 50, "modifiers": [] }], "client": "org.rdk.Netflix" }}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Performs a set of animations
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.addAnimation", "params":{"animations": [{ "client": "HtmlApp", "x":0, "y":0, "w":1920, "h":1080, "duration":"3" }, { "client": "ResidentApp", "x":0, "y":0, "w":0, "h":0, "sx":0.5, "sy":0.5, "duration":"2" } ]}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Scale an application
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.setScale", "params":{"client": "ResidentApp", "sx":1.5, "sy":1.5}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Scale an application
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getScale", "params":{"client": "ResidentApp"}} Response: {"jsonrpc":"2.0", "id":3, "result": {"sx":1.5, "sy":1.5} }
Description: Triggers key events (key press and release)
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.generateKey", "params":{ "keys":[ { "keyCode": 49, "modifiers": [], "delay":1.0, "callsign":"appName" }, { "keyCode": 50, "modifiers": [], "delay":2.0 } ] }} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Launches an application
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.launch", "params":{"callsign": "app1", "type":"HtmlApp", "uri":"https://www.example.com", "x":0, "y":0, "w":1920, "h":1080}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: Suspend an application
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.suspend", "params":{"callsign": "Cobalt"}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: destroys an application
Arguments:
Returns: none
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.destroy", "params":{"callsign": "Cobalt"}} Response: {"jsonrpc":"2.0", "id":3, "result": {} }
Description: returns the list of application types available on the firmware.
Arguments: none
Returns: list of available application types
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getAvailableTypes", "params":{}} Response: {"jsonrpc":"2.0", "id":<number>, "result": {”types":[ "LightningBrowser", "HtmlBrowser", "Cobalt", "Netflix"], "success" : true} }
Description: returns the list of application types available on the firmware.
Arguments: none
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getState", "params":{}} Response: {"jsonrpc":"2.0", "id":<number>, "result": {"runtimes":[ {"callsign":"netflix1", "state":"suspended", "uri":"https://…. "}, {"callsign":"cobalt1", "state":"resumed", "uri":"https://…. "} ], "success": true} }
Description: returns the list of application types available on the firmware.
Arguments: none
Returns:
Request : {"jsonrpc":"2.0", "id":3, "method":"org.rdk.RDKShell.1.getSystemResourceInfo", "params":{}} Response: {"jsonrpc":"2.0", "id":<number>, "result": {"runtimes":[ {"callsign":"netflix1", "ram":123, "vram":50}, {"callsign":"html1", "ram":123, "vram":50}, {"callsign":”cobalt1", "ram":123, "vram":50}], "success": true} }
Description: An event that is broadcasted when a device has been inactive for a period of time. This event is broadcasted at the frequency specified by setInactivityInterval if the device is not active. The default frequency is 15 minutes.
Parameters:
Description: An event that is broadcasted when an runtime is launched
Parameters:
Description: An event that is broadcasted when an runtime is suspended
Parameters:
Description: An event that is broadcasted when an runtime is destroyed
Parameters:
16 Comments
Z-bing.jiang
keys miss “” in addKeyListener and removeKeyListener
Ganesh Sahu
Z-bing.jiang Can you please provide more details on the issue, the device on which this issue is observed and how to reproduce it?
Arkadiusz Radoń
It is:
"params"
:{
keys: [{
"
keyCode"
:
49
,
And should be:
"params"
:{"
keyCode"
:49
,In the examples here on the wiki in sections mentioned by bing.jiang
Ganesh Sahu
corrected the pointed errors.
bkskoti
Hi ,
I enabled RDKShell in STB and able to run above commands, when I tried getclients command, getting getClients as empty.
is there any steps how to create/integrate simple html/third-party app into rdkshell and test?
Steve Ford
If you launch something using RDKShell then it should be listed as a client, e.g. (I'm running these commands from a PC):
> curl --data-binary '{"jsonrpc":"2.0","id":1,"method":"org.rdk.RDKShell.1.launch","params":{"callsign":"Cobalt"}}' http://<ipaddr>:9998/jsonrpc
{"jsonrpc":"2.0","id":1,"result":{"launchType":"activate","success":true}}
> curl --data-binary '{"jsonrpc":"2.0","id":2,"method":"org.rdk.RDKShell.1.getClients"}' http://<ipaddr>:9998/jsonrpc
{"jsonrpc":"2.0","id":2,"result":{"clients":["cobalt"],"success":true}}
bkskoti
When i tried above commands for simple app i was getting below error and webkit was crashing/killing
2021 Jan 11 11:29:10.129453 mediabox WPEFramework[8774]: 1610364550127: ERROR: ../git/drm/westeros-gl/westeros-gl.c:4993 westeros-gl: wstGLInit: unable to resolve eglGetDisplay.
Michael Fiess
It sounds like we may need to debug this issue to get to the bottom of this problem you're seeing. Please feel free to reach out to me, and we'll find a time that is convenient for you to debug this issue together.
bkskoti
Hi Fiess,
I tried solving above issue. But got some other issue when tried to run the rdkshell
./rdkshell
initializing rdk shell
Ignored file read due to keyMap env not set
Ignored file read due to input devices environment variable not set
key initial delay: 500 repeat interval: 100
Essos Info: westeros (essos) version 1.01.19
Essos Info: westeros (essos) config supports: direct 1 wayland 1
1613628651578: ERROR: ../git/drm/westeros-gl/westeros-gl.c:4991 BKS start
1613628651578: ERROR: ../git/drm/westeros-gl/westeros-gl.c:5024 BKS END
1613628651578: INFO: ../git/drm/westeros-gl/westeros-gl.c:2895 opened /dev/dri/card0: master 0
1613628651578: INFO: ../git/drm/westeros-gl/westeros-gl.c:3051 wstInitCtx: current mode 1280x720@60
Essos Info: displaySizeCallback: display size 1280x720
Essos Info: displaySizeCallback: display safe (64,36,1152,648)
Essos error during initialization: Error. Unable to get EGL display: eglError 3000
Essos Info: essResize 1280x720
Can you tell me when and how we can connect?
Deepthi Suseelan
bkskoti
Can you please post the contents of your wpeframework.service file. Also the platform which you are using.
bkskoti
Deepthi Suseelan
I am using realTek(arm) and wpeframework.service content is
[Unit]
Description=wpeframework
Before=xre-receiver.service
After=lighttpd.service iarmbusd.service pwrmgr.service irmgr.service dsmgr.service sysmgr.service authservice.service
[Service]
PIDFile=/var/run/WPEFramework.pid
EnvironmentFile=-/etc/wpeframework/WPEFramework.env
Environment="WAYLAND_DISPLAY=wayland-0"
Environment="XDG_RUNTIME_DIR=/tmp"
Environment="XDG_DATA_HOME=/opt/QT/home"
Environment="LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/lib/realtek"
Environment="LD_PRELOAD=/usr/lib/libwayland-client.so.0:/usr/lib/libwayland-egl.so.0:/usr/lib/realtek/libVOutWrapper.so:/usr/lib/realtek/libjpu.so:/usr/lib/realtek/libvpu.so:/usr/lib/libwesteros_gl.so.0"
Environment="GST_PLUGIN_PATH=$GST_PLUGIN_PATH:/usr/lib/gstreamer-1.0"
Environment="GST_DEBUG=2"
ExecStart=-/usr/bin/WPEFramework -b
#ExecStop=/bin/kill $MAINPID
#Restart=always
#KillMode=mixed
Restart=no
KillSignal=SIGKILL
[Install]
WantedBy=multi-user.target
Deepthi Suseelan
bkskoti
The LD_PRELOAD requirement for any platform is based on whether there is a need to overload certain EGL methods. On some platforms, wayland EGL implementation is separate from the EGL implementation and hence the need to preload libwayland-egl.so.
On platforms using westeros drm backend (which I assume Realtek is), libwesteros-gl.so needs to overload some EGL methods and hence the need to preload libwesteros_gl.so
Can you please try removing the preload of libwayland-egl.
bkskoti
With your suggested change, During box bootup i am getting below error and WPEFramework is crashing.
initializing rdk shell
Ignored file read due to keyMap env not set
Ignored file read due to input devices environment variable not set
key initial delay: 500 repeat interval: 100
INFO [AbstractPlugin.h:67] AbstractPlugin:
INFO: ../git/drm/westeros-gl/westeros-gl.c:2895 opened /dev/dri/card0: master 0
INFO [SystemServices.cpp:253] SystemServices: first boot so setting mode to 'NORMAL' ('/tmp/system_service_temp.conf' does not contain("mode"))
WARN [SystemServices.cpp:694] setMode: request to switch to mode 'NORMAL' from mode '' with duration -1
INFO: ../git/drm/westeros-gl/westeros-gl.c:3051 wstInitCtx: current mode 1280x720@60
INFO: ../git/drm/westeros-gl/westeros-gl.c:5479 native window: wxh=1280x720
INFO: ../git/drm/westeros-gl/westeros-gl.c:3586 choosing output mode: 1280x720x60
Deepthi Suseelan
bkskoti
Can you also please share the rdkshell "launch" command you used to launch the application.
Steve Ford
Can you provide some more info for some of the APIs, such as what values are possible for the "type" argument for the "launch" command?
Can a normal executable to started using RDKShell, such as the essos-sample demo app, and if so, how would this be done?
Michael Fiess
Hey Steve, you can run the RDKShell getAvailableTypes API to learn of the available types that are configured on your device.
RDKShell does provide a way to launch a normal executable as well. This support was recently added. We will update the documentation on new APIs available to accomplish this in a few days.