Alert |
---|
title | Work In-Progress |
---|
type | Warning |
---|
|
|
...
Architecture & Set-up
The dab-adapter-rs the "DAB <-> RDK adapter" can be executed both on the RDK device or using an external PC.
Note: current implementation is for STB devices.
Preferred mode of operation : "On Device" implementation
Image Added
Image Added
Reference:
Image Added
Alexa based implementation flow
Image Added
Device run-times
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).
Related RFC
Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.DAB.Enable |
---|
...
tr181 -s -t boolean -v false Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.DAB.Enable |
---|
DAB Operations - API Map
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)
Category | DAB | Thunder |
---|
Supported Operations | applications/list | { "jsonrpc": "2.0", "id": 42, "method": "Controller.1.status@YouTube" } { "jsonrpc": "2.0", "id": 42, "method": "Controller.1.status@Netflix" } { "jsonrpc": "2.0", "id": 42, "method": "Controller.1.status@Amazon" } |
applications/launchlaunch" / "Controller.1.status@YouTube" / "Controller.1.deactivate@YouTubeDAB 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 |
---|
|
{
"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 |
---|
|
{
"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
}
}
|
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).
Image Added
Install required tools on the DAB Monitor Linux machine
Code Block |
---|
|
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)
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
|
Common pit-falls
- How to get Device ID: Device ID which need to be supplied to the dab-compliance-suite to connect with dab-adapter instance running on the device can be obtained from dab-adapter start-up log.
Code Block |
---|
title | journalctl -fu dab-adapter |
---|
|
root@AmlogicFirebolt:~# journalctl -fu dab-adapter
-- Logs begin at Mon 2023-09-11 16:32:00 UTC. --
Sep 11 16:35:05 AmlogicFirebolt systemd[1]: Started DAB <-> RDK adapter.
Sep 11 16:35:05 AmlogicFirebolt dab-adapter[22887]: Monitoring changes of /run/dab-enable
Sep 11 16:35:06 AmlogicFirebolt dab-adapter[22887]: DAB Device ID: AC64CF339B28
Sep 11 16:35:06 AmlogicFirebolt dab-adapter[22887]: Ready to process DAB requests
Sep 11 16:35:33 AmlogicFirebolt dab-adapter[22887]: OK: operations/list |
References