RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Alert | ||||
---|---|---|---|---|
| ||||
Table of Contents |
---|
...
The dab-adapter-rs the "DAB <-> RDK adapter" can be executed both on the RDK device or using an external PC.
...
Preferred mode of operation : "On Device" implementation
Reference:
Comaptible Navigator UI version 4.1.3 or later. (Why is it? - UI need to listen and manage external app lifecycle related events and send app state report to Alexa.)
All the below commands can be executed from device console (SSH prompt or serial terminal).
...
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)
DAB Request | DAB Category |
---|
Thunder Implementation for the Request | ||
---|---|---|
operations/list | Supported Operations | No 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= |
[Note: Implementation supports only YouTube common port. If previous state is suspended; then moveToFront & setFocus rdkshell APIs are called with AppID matching callsign.]
applications/getstate |
movetofront |
rdkcentral. |
github. |
io/ |
rdkservices/ |
#/api/RDKShellPlugin?id=setfocus Note: Implementation supports only YouTube common port. |
applications/launch-with-content
If parameter is present; App specific deeplink API is invoked. For YouTube: https://code.rdkcentral. |
applications/get-state
Please see Provideplatformspecificapplifecycledelays/timeouts for adding platform specific tuning. |
applications/launch-with-content |
applications/exit
device/info
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id= |
getstate |
https://rdkcentral.github.io/rdkservices/#/api/RDKShellPlugin?id= |
https://rdkcentral.github.io/rdkservices/#/api/ |
RDKShellPlugin?id= |
getvisibility |
RDKShellPlugin?id= |
setvisibility |
Note: Implementation supports only YouTube common port. Please see Provideplatformspecificapplifecycledelays/timeouts for adding platform specific tuning. | |
applications/get-state | https://rdkcentral.github.io/rdkservices/#/api/ |
RDKShellPlugin?id= |
getstate |
applications/ |
exit | https://rdkcentral.github.io/rdkservices/#/api/ |
RDKShellPlugin?id= |
getstate |
RDKShellPlugin?id= |
destroy |
Please see Provideplatformspecificapplifecycledelays/timeouts for adding platform specific tuning. | ||
device/info | System |
getdeviceinfo [estb_mac is used as DAB Device ID] |
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)
https://rdkcentral.github.io/rdkservices/#/api/NetworkPlugin?id=getinterfaces |
system/settings/list
systeminfo [uptime is extracted from this] |
deviceidentification [chipset is extracted from this] | |
system/restart | https://rdkcentral.github.io/rdkservices/#/api/ |
SystemPlugin?id= |
reboot | |
system/settings/list | https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id= |
https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id= |
https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id= |
https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id= |
CEC: checks availability of https://rdkcentral.github.io/rdkservices/#/api/ |
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 |
Note: expecting response as "Framerate60" instead of "FRAMERATE_60" as per component owner review. Documentation needs updation. https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id= |
PictureMode: not implemented (not an STB feature)
VideoInputSource : not implemented due to lack of device capability.
system/settings/set
input/key/list
Platform configurable key map /opt/dab_platform_keymap.json with following format: key value pair of "DAB_KEY": PLATFORM_KEYCODE
language | js |
---|
[Note: injectKey will not be overridden by the rdkshell_keymapping.json so put the final KEYCODE in /opt/dab_platform_keymap.json]
https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=getsettophdrsupport |
output/image
[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=getconnectedaudioports |
device-telemetry/start
device-telemetry/stop
device-telemetry/metrics
app-telemetry/start
app-telemetry/stop
app-telemetry/metrics
health-check/get
messages
voice/list
Code Block | ||
---|---|---|
| ||
{"enable":false, "ptt":{"enable":false}} |
voice/send-text
https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setenableaudioport https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setforcehdrmode https://rdkcentral.github.io/rdkservices/#/api/DisplaySettingsPlugin?id=setsoundmode https://rdkcentral.github.io/rdkservices/#/api/TextToSpeechPlugin?id=enabletts https://rdkcentral.github.io/rdkservices/#/api/UserPreferencesPlugin?id=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 | https://rdkcentral.github.io/rdkservices/#/api/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] | |||||
input/long-key-press | https://rdkcentral.github.io/rdkservices/#/api/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.io/rdkservices/#/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. | |||||
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 Check | No RDK specific implementation required. | ||||
messages | Operational General Notifications | As per DAB-2.0 specifiction; it is an optional requirement. | ||||
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.
| |||||
voice/send-audio | https://rdkcentral.github.io/rdkservices/#/api/VoiceControlPlugin?id=voicesessionrequest
| |||||
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
| |||||
version | Version | No RDK specific implementation required. | ||||
For generating DAB Device ID | Generic | https://rdkcentral.github.io/rdkservices/#/api/SystemPlugin?id=getdeviceinfo with param estb_mac | ||||
For feature/service availability | Generic | https://github.com/rdkcentral/Thunder/blob/master/Source/WPEFramework/doc/ControllerPlugin.md#property.services [Used as 'status@callsign'] |
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 | ||
---|---|---|
| ||
{
"KEY_GREEN": 406,
"KEY_YELLOW": 403,
"KEY_BLUE": 404,
"KEY_HOME": 173
} |
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 | ||||
---|---|---|---|---|
| ||||
{
"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 | ||||
---|---|---|---|---|
| ||||
{
"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
}
}
|
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 | ||
---|---|---|
| ||
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto-clients moreutils |
moreutils |
Code Block |
---|
user@DABMonitor:~$ mosquitto_sub -h 10.0.0.4 -v -t '#' | ts '[%Y%b%d %H:%M:%.S]'
|
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]'
|
...