Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 54

...

Preferred mode of operation : "On Device" implementation

Image Added


Image AddedImage Removed

Reference:

Alexa based implementation flow

Image Modified

Device run-times

...

Below table enlists the API mapping details of current DAB adapter implementation of RDK for STB devices. RDK APIs are listed under 'Thunder Implementation'.

API details are as per dab-adapter version : https://github.com/device-automation-bus/dab-adapter-rs/commit/f6318d0080ab8282f758bb2bf19a0097f58f34a6 (6.0 f6318d)

System
Input
Device & Application Telemetry
Voice
DAB RequestDAB CategoryThunder Implementation for the Request
operations/listSupported OperationsNo RDK specific implementation required except platform specific key map configuration.
applications/list
Applications



https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=getavailabletypes

Use the response to match the AppID as per DAB-2.0 spec. [Note: should have YouTube, Amazon & Netflix as types in the API response.]

applications/launch
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=launch (topmost:true, focused:true)

Note: Implementation supports only YouTube common port.
If previous state is suspended; then moveToFront & setFocus rdkshell APIs are called with AppID matching callsign.

getstate
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=launchapplications/launch-with-content
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=
launch
movetofront
https://
code
rdkcentral.
rdkcentral
github.
com
io/
r
rdkservices/
plugins/gitiles/rdk/components/generic/cobalt/+/refs/heads/24.lts.dev/plugin/doc/CobaltPlugin.md#method.deeplink
#/api/RDKShellPlugin?id=setfocus
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=getvisibility
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=setvisibility

Note: Implementation supports only YouTube common port.
If previous state is suspended; then moveToFront & setFocus rdkshell APIs are called with AppID matching callsign.

applications/get-state

If parameter is present; App specific deeplink API is invoked.

For YouTube: https://code.rdkcentral.

github.io

com/

rdkservices

r/

#

plugins/

api/RDKShellPlugin?id=getstate

gitiles/rdk/components/generic/cobalt/+/refs/heads/24.lts.dev/plugin/doc/CobaltPlugin.md#deeplink-method

Please see Provideplatformspecificapplifecycledelays/timeouts for adding platform specific tuning.

applications/launch-with-content
applications/exit
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=destroy
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=
suspend
device/info
getstate

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginRDKShellPlugin?id=getconnectedvideodisplayslaunch

https://code.rdkcentral.github.iocom/rdkservicesr/#plugins/api/SystemPlugin?id=getdeviceinfogitiles/rdk/components/generic/cobalt/+/refs/heads/24.lts.dev/plugin/doc/CobaltPlugin.md#method.deeplink

https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id=getscreenresolutionmovetofront

https://rdkcentral.github.io/rdkservices/#/api/NetworkPluginRDKShellPlugin?id=getinterfacessetfocus

https://rdkcentral.github.io/rdkservices/#/api/
DeviceInfoPlugin
RDKShellPlugin?id=
systeminfo [estb_mac is used as DAB Device ID]
getvisibility
https://rdkcentral.github.io/rdkservices/#/api/
DeviceIdentificationPlugin
RDKShellPlugin?id=setvisibility

Note: Implementation supports only YouTube common port.
If previous state is suspended; then moveToFront & setFocus rdkshell APIs are called with AppID matching callsign.

Please see Provideplatformspecificapplifecycledelays/timeouts for adding platform specific tuning.

applications/get-state
deviceidentification
https://rdkcentral.github.io/rdkservices/#/api/
NetworkPlugin
RDKShellPlugin?id=
getipsettings
getstate
systemapplications/restartexit
https://rdkcentral.github.io/rdkservices/#/api/SystemPluginRDKShellPlugin?id=rebootsystem/settings/listgetstate
https://rdkcentral.github.io/rdkservices/#/api/
DisplaySettingsPlugin
RDKShellPlugin?id=
getsupportedresolutions
destroy

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginRDKShellPlugin?id=getsupportedaudioportssuspend

Please see Provideplatformspecificapplifecycledelays/timeouts for adding platform specific tuning.

device/info
System



https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getsupportedaudiomodesgetconnectedvideodisplays

https://rdkcentral.github.io/rdkservices/#/api/FrameRatePluginSystemPlugin?id=getdisplayframerategetdeviceinfo [estb_mac is used as DAB Device ID]

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginRDKShellPlugin?id=getsettophdrsupportgetscreenresolution

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginNetworkPlugin?id=gettvhdrsupport

MEMC: false

LowLatencyMode: true as its being enabled by the pipeline property. No plugin exposed APIs available.

VideoInputSource : Home (STB's playback source is its app itself.)

PictureMode: None (not an STB feature)

system/settings/get

getinterfaces

https:https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginDeviceInfoPlugin?id=getsupportedresolutionssysteminfo [uptime is extracted from this]

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginDeviceIdentificationPlugin?id=getsupportedaudioportsdeviceidentification

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginNetworkPlugin?id=getsupportedaudiomodesgetipsettings

https://rdkcentral.github.io/rdkservices/#/api/HdmiCec_2PluginDeviceInfoPlugin?id=getenabledmake

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginDeviceInfoPlugin?id=getsoundmodemodelid

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginDeviceInfoPlugin?id=getmutedserialnumber

https://rdkcentral.github.io/rdkservices/#/api/FrameRatePluginDeviceInfoPlugin?id=getdisplayframeratefirmwareversion

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginDeviceIdentificationPlugin?id=getconnectedvideodisplaysdeviceidentification [chipset is extracted from this]

system/restart
https://rdkcentral.github.io/rdkservices/#/api/
DisplaySettingsPlugin
SystemPlugin?id=
getsettophdrsupport
reboot
system/settings/list


https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=gettvhdrsupportgetsupportedresolutions

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getconnectedaudioportsgetsupportedaudioports

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getvolumelevelgetsupportedaudiomodes

https://rdkcentral.github.io/rdkservices/#/api/TextToSpeechPluginDisplaySettingsPlugin?id=isttsenabled

system/settings/set

getsettophdrsupport

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setcurrentresolutiongettvhdrsupport

https://rdkcentral.github.io/rdkservices/#/api/FrameRatePluginTextToSpeechPlugin?id=setdisplayframerateisttsenabled

CEC: checks availability of https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setvolumelevelhttps://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setmutedHdmiCec_2Plugin

MEMC: false

LowLatencyMode: true as its being enabled by the pipeline property. No plugin exposed APIs available.

VideoInputSource : Home (STB's playback source is its app itself.)

PictureMode: None (not an STB feature)

system/settings/get

https://rdkcentral.github.io/rdkservices/#/api/HdmiCec_2PluginDisplayInfoPlugin?id=setenabledwidth

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginDisplayInfoPlugin?id=setenableaudioportheight

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPluginDisplayInfoPlugin?id=setforcehdrmodeframerate

Note: expecting response as "Framerate60" instead of "FRAMERATE_60" as per component owner review. Documentation needs updation.

https:/https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setsoundmodegetsupportedresolutions

https://rdkcentral.github.io/rdkservices/#/api/TextToSpeechPluginDisplaySettingsPlugin?id=enablettsgetsupportedaudioports

PictureMode: not implemented (not an STB feature)

VideoInputSource : not implemented due to lack of device capability.

input/key/list

Platform configurable key map /opt/dab_platform_keymap.json with following format: key value pair of "DAB_KEY": PLATFORM_KEYCODE

Code Block
languagejs
{
  "KEY_GREEN": 406,
  "KEY_YELLOW": 403,
  "KEY_BLUE": 404,
  "KEY_HOME": 173
}

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getsupportedaudiomodes

https://rdkcentral.github.io/rdkservices/#/api/HdmiCec_2Plugin?id=getenabled

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getsoundmode

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getmuted

input/key-press

https://rdkcentral.github.io/rdkservices/#/api/

RDKShellPlugin

DisplaySettingsPlugin?id=

injectkey

getconnectedvideodisplays

[Note: injectKey will not be overridden by the rdkshell_keymapping.json so put the final KEYCODE in /opt/dab_platform_keymap.json]

input/long-key-press

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getsettophdrsupport

https://rdkcentral.github.io/rdkservices/#/api/RDKShellPluginDisplaySettingsPlugin?id=injectkeygettvhdrsupport

[Note: injectKey will not be overridden by the rdkshell_keymapping.json so put the final KEYCODE in /opt/dab_platform_keymap.json]

output/image
Output

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getconnectedaudioports

https://rdkcentral.github.io/rdkservices/#/api/ScreenCapturePluginDisplaySettingsPlugin?id=uploadscreencapture

device-telemetry/start
TBD: Funtionality not tested.
device-telemetry/stop
TBD: Funtionality not tested.
device-telemetry/metrics
TBD: Funtionality not tested.
app-telemetry/start
TBD: Funtionality not tested.
app-telemetry/stop
TBD: Funtionality not tested.
app-telemetry/metrics
TBD: Funtionality not tested.
health-check/get
Health CheckNo RDK specific implementation required.
messages
Operational General NotificationsTBD: Funtionality not tested.

getvolumelevel

https://rdkcentral.github.io/rdkservices/#/api/TextToSpeechPlugin?id=isttsenabled

https://rdkcentral.github.io/rdkservices/#/api/UserPreferencesPlugin?id=getuilanguage

system/settings/set

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getconnectedvideodisplays

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setcurrentresolution

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getconnectedaudioports

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setvolumelevel

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setmuted

voice/list

https://rdkcentral.github.io/rdkservices/#/api/

VoiceControlPlugin

HdmiCec_2Plugin?id=

voicestatusvoice/set

setenabled

https://rdkcentral.github.io/rdkservices/#/api/

VoiceControlPlugin

DisplaySettingsPlugin?id=

configurevoice with following parameter in the current implementation.
Code Block
languagejs
{"enable":false, "ptt":{"enable":false}}
voice/send-audio

setenableaudioport

https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setforcehdrmode

https://rdkcentral.github.io/rdkservices/#/api/

VoiceControlPlugin

DisplaySettingsPlugin?id=

voicesessionrequest
Code Block
languagejs
{"audio_file":"/tmp/tts.wav","type":"ptt_audio_file"}
voice/send-text

setsoundmode

https://rdkcentral.github.io/rdkservices/#/api/TextToSpeechPlugin?id=enabletts

https://rdkcentral.github.io/rdkservices/#/api/

VoiceControlPlugin

UserPreferencesPlugin?id=

voicesessionrequest
Code Block
languagejs
{"audio_file":"/tmp/tts.wav","type":"ptt_audio_file"}
versionVersionNo RDK specific implementation required.

setuilanguage

PictureMode: not implemented (not an STB feature)

VideoInputSource : not implemented due to lack of device capability.

input/key/list
Input

Platform configurable key map /opt/dab_platform_keymap.json.

Please see Provideplatformkeymapconfiguration
input/key-press
For generating DAB Device IDGeneric
 
https://rdkcentral.github.io/rdkservices/#/api/
SystemPlugin
RDKShellPlugin?id=
getdeviceinfo with param estb_mac
injectkey

[Note: injectKey will not be overridden by the rdkshell_keymapping.json so put the final KEYCODE in /opt/dab_platform_keymap.json]

input/long-key-press
For feature/service availabilityGenerichttps://github.com/rdkcentral/Thunder/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#method.activate

https://rdkcentral.github.comio/rdkcentralrdkservices/Thunder#/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#method.deactivateapi/RDKShellPlugin?id=injectkey

[Note: injectKey will not be overridden by the rdkshell_keymapping.json so put the final KEYCODE in /opt/dab_platform_keymap.json]

output/image
Output

https://rdkcentral.github.comio/rdkcentralrdkservices/Thunder#/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#property.services [Used as 'status@callsign']api/ScreenCapturePlugin?id=uploadscreencapture

device-telemetry/start
Device & Application Telemetry




As per DAB-2.0 specifiction; it is an optional requirement. TBD: Funtionality not tested.
device-telemetry/stop
As per DAB-2.0 specifiction; it is an optional requirement. TBD: Funtionality not tested.
device-telemetry/metrics
As per DAB-2.0 specifiction; it is an optional requirement.
https://rdkcentral.github.io/rdkservices/#/api/DeviceInfoPlugin?id=systeminfo [totalram, freeram & cpuload is used]
app-telemetry/start
As per DAB-2.0 specifiction; it is an optional requirement. TBD: Funtionality not tested.
app-telemetry/stop
As per DAB-2.0 specifiction; it is an optional requirement. TBD: Funtionality not tested.
app-telemetry/metrics
As per DAB-2.0 specifiction; it is an optional requirement. Funtionality not implemented.
health-check/get
Health CheckNo RDK specific implementation required.
messages
Operational General Notifications
As per DAB-2.0 specifiction; it is an optional requirement.
No RDK specific implementation required.
voice/list
Voice


https://rdkcentral.github.io/rdkservices/#/api/VoiceControlPlugin?id=voicestatus

voice/set

https://rdkcentral.github.io/rdkservices/#/api/VoiceControlPlugin?id=configurevoice with following parameter in the current implementation.

Code Block
languagejs
{"enable":false, "ptt":{"enable":false}}
voice/send-audio
https://rdkcentral.github.io/rdkservices/#/api/VoiceControlPlugin?id=voicesessionrequest
Code Block
languagejs
{"audio_file":"/tmp/tts.wav","type":"ptt_audio_file"}
voice/send-text

To convert the audio to platform compatible format; gst-launch-1.0 binary is required.

https://rdkcentral.github.io/rdkservices/#/api/VoiceControlPlugin?id=voicesessionrequest
Code Block
languagejs
{"audio_file":"/tmp/tts.wav","type":"ptt_audio_file"}
versionVersionNo RDK specific implementation required.
For generating DAB Device IDGeneric

https://rdkcentral.github.io/rdkservices/#/api/SystemPlugin?id=getdeviceinfo with param estb_mac

For feature/service availabilityGeneric

https://github.com/rdkcentral/Thunder/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#method.activate

https://github.com/rdkcentral/Thunder/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#method.deactivate

https://github.com/rdkcentral/Thunder/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#property.services [Used as 'status@callsign']

DAB Integration & Debug Helpers

How to fine tune dab-adapter to platform

Provide platform keymap configuration

RDK dab-adapter by default is configured to align DAB keymap with RDKShell keycodes https://github.com/rdkcentral/RDKShell/blob/master/linuxkeys.h. There is another provision to override or add more keys by introducing a platform specific keymap configuration file to dab-adapter runtime.

Create /opt/dab_platform_keymap.json with following format: key value pair of "DAB_KEY": PLATFORM_KEYCODE.

Code Block
languagejs
{
  "KEY_GREEN": 406,
  "KEY_YELLOW": 403,
  "KEY_BLUE": 404,
  "KEY_HOME": 173
}

Provide platform specific app lifecycle delays/timeouts

The time required to launch and exit an app runtime would be greately dependent on the platform. DAB-2.0 specification mandates that the DAB app lifecycle APIs shall only return the DAB response after the app lifecycle is completed.

Create /opt/dab_platform_app_lifecycle.json and add app specific parameters as per following template.

Code Block
languagejs
titleTemplate
{
    "dab-app-id-lowercase": {
        "cold_launch_timeout_ms": 6000,
        "resume_launch_timeout_ms": 3000,
        "exit_to_destroy_timeout_ms": 2500,
        "exit_to_background_timeout_ms": 2000
    }
}


Code Block
languagejs
titleExample
{
    "youtube": {
        "cold_launch_timeout_ms": 6000,
        "resume_launch_timeout_ms": 3000,
        "exit_to_destroy_timeout_ms": 2500,
        "exit_to_background_timeout_ms": 2000
    },
    "primevideo": {
        "cold_launch_timeout_ms": 8000,
        "resume_launch_timeout_ms": 4000,
        "exit_to_destroy_timeout_ms": 5000,
        "exit_to_background_timeout_ms": 2300
    }
} 

DAB Message Sniffer for analysis

This section details about how to setup a tool to see DAB messages being exchanged over the test network using a Linux PC(DAB Monitor).

...

Code Block
languagebash
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto-clients moreutils

Listen to the MQTT messages from the broker(dab-adapter)

 mosquitto-clients moreutils

Listen to the MQTT messages from the broker(dab-adapter)

Code Block
user@DABMonitor:~$ mosquitto_sub -h 10.0.0.4 -v -t '#' | ts '[%Y%b%d %H:%M:%.S]'

How to run DAB adapter binary in debug mode

If at any time during DAB adapter development or integration phase wanted to see what is the Thunder API request payload and its platform response that dab-adapter sends/receives, you could run the dab-adapter binary with verbose mode enabled as below.

Code Block
user@STB:~$ dab-adapter --debug true
Code Block
user@DABMonitor:~$ mosquitto_sub -h 10.0.0.4 -v -t '#' | ts '[%Y%b%d %H:%M:%.S]'

Common pit-falls

...