Native application to test DIAL functionality in RDK environment without an app manager or system UI. This implentation is based on XCast plugin and RDKShell for supporting app state management and reporting. By default YouTube & Netflix are supported based on Cobalt and Netflix thunder plugin callsign availability.
The application uses color-coded logging for easy debug:
- 🔴 ERROR (RED): Critical errors
- 🟠 WARN (ORANGE): Warnings
- 🟢 TRACE (GREEN): Debug trace information (enabled with
--enable-trace) - ⚪ INFO (DEFAULT): General information
- Real-time App Monitoring: Tracks application lifecycle events (launch, suspend, resume, terminate) with the help of
RDKShellplugin events. - Debug Logging: Comprehensive logging with color-coded output along with option to enable extended debug logs.
- JSON Configuration: Override option for app settings using optional
/opt/appConfig.json- specifying app specific deeplink method and baseurl. - Friendly Name Configuration: Enables network friendly name settings with default format
RDKE-<8DigitRandomNumber>
- boost
- websocketpp
- jsoncpp
- cmake (for building)
If you are building using Yocto, use this command to checkout:
devtool add --autorev xdialtester https://github.com/joseinweb/xdialtester.git --srcbranch mainAdd the following line in the recipe:
DEPENDS += "jsoncpp websocketpp systemd boost"| Option | Description | Example |
|---|---|---|
--enable-apps=<apps> |
Comma-separated list of apps | --enable-apps=YouTube,Netflix,Amazon |
--enable-debug |
Enable detailed debug logging | --enable-debug |
--enable-trace |
Enable trace-level logging (most verbose) | --enable-trace |
--friendlyname=<Name> |
Provide custom friendly name | --friendlyname=RDKE12345 |
| Variable | Description | Default |
|---|---|---|
SMDEBUG |
Enable debug(if defined) and trace mode (when its exactly set as "TRACE") | Not set |
Preconditions: Activate required plugins before running this test app.
curl -X POST http://127.0.0.1:9998/jsonrpc -d '{"jsonrpc":"2.0","id":1,"method":"Controller.1.activate","params":{"callsign":"org.rdk.Xcast"}}'
curl -X POST http://127.0.0.1:9998/jsonrpc -d '{"jsonrpc":"2.0","id":2,"method":"Controller.1.activate","params":{"callsign":"org.rdk.RDKShell"}}'
curl -X POST http://127.0.0.1:9998/jsonrpc -d '{"jsonrpc":"2.0","id":3,"method":"Controller.1.activate","params":{"callsign":"org.rdk.System"}}'
# Use thunder plugin API if below binary is not available.
SetPowerState ON
curl -X POST http://127.0.0.1:9998/jsonrpc -d '{"jsonrpc":"2.0","id":4,"method":"org.rdk.PowerManager.setPowerState","params":{"keyCode":30,"powerState":"ON","standbyReason":"User Initiated"}}'# Run with default apps (YouTube, Netflix, Amazon)
./xdialtester
# Specify only required app
./xdialtester --enable-apps=YouTube
# Enable debug logging
./xdialtester --enable-debug
# Enable trace logging (most verbose)
./xdialtester --enable-trace
# Enable both debug and trace logging
./xdialtester --enable-debug --enable-trace
# Combination with specific apps
./xdialtester --enable-apps=Netflix --enable-debug --enable-trace
# Set custom friendly name
./xdialtester --friendlyname=RDKE12345This can intake an optional app configuration /opt/appConfig.json on startup. This JSON file provides an option to adjust the app's base url and deeplink method. Default settings are as below
"YouTube" - "https://www.youtube.com/tv" and "Cobalt.1.deeplink"
"Netflix" - "https://www.netflix.com" and "Netflix.1.systemcommand"
"Amazon" - "https://www.amazon.com/gp/video" and "PrimeVideo.1.deeplink"
- Path:
/opt/appConfig.json - Owner: Should be readable by the user running xdialtester
- Format: Valid JSON with UTF-8 encoding
{
"appConfig": [
{
"name": "YouTube",
"baseurl": "https://www.youtube.com/tv",
"deeplinkmethod": "Cobalt.1.deeplink"
},
{
"name": "Netflix",
"baseurl": "https://www.netflix.com",
"deeplinkmethod": "Netflix.1.systemcommand"
},
{
"name": "Amazon",
"baseurl": "https://www.amazon.com/gp/video",
"deeplinkmethod": "PrimeVideo.1.deeplink"
}
]
}| Field | Type | Required | Description | Example |
|---|---|---|---|---|
name |
String | Yes | Application identifier used in DIAL requests and command line | "YouTube", "Netflix" |
baseurl |
String | Yes | Base URL for deep linking. Can include query parameters | "https://www.youtube.com/tv" |
deeplinkmethod |
String | Optional | Thunder method name for sending deep links | "Cobalt.1.deeplink" |
The application uses color-coded logging:
- 🔴 ERROR (RED): Critical errors
- 🟠 WARN (ORANGE): Warnings
- 🟢 TRACE (GREEN): Debug trace information (enabled with
--enable-trace) - ⚪ INFO (DEFAULT): General information
The xdialtester works as a DIAL client that communicates with the RDK Thunder framework through the org.rdk.Xcast plugin.
- Ensure the mobile app and DUT are on the same network
- Ensure Thunder framework is running on your device
- Set device IP environment variable:
- Ensure device is in proper power state (ON)
export DEVICEIP=192.168.1.100 # Replace with your device's IP address- Activate required plugins:
# Activate XCast plugin (handles DIAL protocol)
curl -X POST http://$DEVICEIP:9998/jsonrpc -d '{"jsonrpc":"2.0","id":1,"method":"Controller.1.activate","params":{"callsign":"org.rdk.Xcast"}}'
# Activate RDKShell plugin (handles app lifecycle)
curl -X POST http://$DEVICEIP:9998/jsonrpc -d '{"jsonrpc":"2.0","id":2,"method":"Controller.1.activate","params":{"callsign":"org.rdk.RDKShell"}}'
# Activate System plugin (for setting friendly name etc)
curl -X POST http://$DEVICEIP:9998/jsonrpc -d '{"jsonrpc":"2.0","id":3,"method":"Controller.1.activate","params":{"callsign":"org.rdk.System"}}'
# Verify plugins are active
curl -X POST http://$DEVICEIP:9998/jsonrpc -d '{"jsonrpc":"2.0","id":4,"method":"Controller.1.status"}'
# Change device power state to ON if NOT
curl -X POST http://$DEVICEIP:9998/jsonrpc -d '{"jsonrpc":"2.0","id":5,"method":"org.rdk.PowerManager.setPowerState","params":{"keyCode":30,"powerState":"ON","standbyReason":"User Initiated"}}'
# Find the correct DIAL port (common ports: 56889 for REST, 56890 for SSDP)
netstat -tlnp | grep -E ":(56889|56890|56789)"- Start xdialtester application:
./xdialtester --enable-apps=YouTube,Netflix- Launch the Second screen mobile application to test the casting functionality on First screen.