Closed arun-madhavan-013 closed 9 months ago
Added missing uptime fetch API changes as well without using a struct based parsing logic because it will fail when more properties gets added to same method response.
Test Details: dab-adapter logs:
d35@d35:~/Desktop/dab-works/dab-adapter-rs$ ./target/debug/dab-adapter -b 10.0.0.81 -d 10.0.0.81 --debug true
DAB<->RDK Adapter [4fe230a4135bc95e74483f4a41a6abb2bdd30445]
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.System.getDeviceInfo","params":{"params":["estb_mac"]}}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"estb_mac":"00:10:20:30:7E:C5","success":true}}
DAB Device ID: 001020307EC5
Ready to process DAB requests
OK: device/info
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.DisplaySettings.getConnectedVideoDisplays"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"connectedVideoDisplays":["HDMI0"],"success":true}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"DeviceInfo.make"}
RDK response: {"jsonrpc":"2.0","id":1,"error":{"code":1,"message":"ERROR_GENERAL"}}
Key 'make' not found in response.
RDK request: {"jsonrpc":"2.0","id":1,"method":"DeviceInfo.modelid"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"sku":"REALTEKHANK"}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"DeviceInfo.serialnumber"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"serialnumber":"hanke500"}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"DeviceIdentification.deviceidentification"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"firmwareversion":"REALTEK_SDK-6.3.0::READWRITE:WPE_R4:RDK_NEXT","chipset":"Realtek Hank","deviceid":"OEaGFua2U1MDA"}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"DeviceInfo.firmwareversion"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"imagename":"rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227","yocto":"dunfell"}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getScreenResolution"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"w":1920,"h":1080,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.Network.getInterfaces"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"interfaces":[{"interface":"ETHERNET","macAddress":"00:10:20:30:7e:c5","enabled":true,"connected":true},{"interface":"WIFI","macAddress":"ec:9c:32:aa:c5:d4","enabled":true,"connected":false}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"DeviceInfo.systeminfo"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"version":"4.2.#R4.2","uptime":1240,"totalram":1881755648,"freeram":981381120,"totalswap":0,"freeswap":0,"devicename":"mediaclient-mediabox","cpuload":"12","cpuloadavg":{"avg1min":37920,"avg5min":50336,"avg15min":43456},"serialnumber":"","time":"Tue, 27 Feb 2024 15:33:49"}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.Network.getIPSettings","params":{"interface":"ETHERNET"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"interface":"ETHERNET","ipversion":"IPV6","autoconfig":true,"ipaddr":"2601:4c:0:420:210:20ff:fe30:7ec5","netmask":"ffff:ff00::","gateway":"fe80::be9b:68ff:fec0:272b","primarydns":"","secondarydns":"","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.Network.getIPSettings","params":{"interface":"WIFI"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":false}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.System.getDeviceInfo","params":{"params":["estb_mac"]}}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"estb_mac":"00:10:20:30:7E:C5","success":true}}
OK: device/info
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.DisplaySettings.getConnectedVideoDisplays"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"connectedVideoDisplays":["HDMI0"],"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.RDKShell.getScreenResolution"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"w":1920,"h":1080,"success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.Network.getInterfaces"}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"interfaces":[{"interface":"ETHERNET","macAddress":"00:10:20:30:7e:c5","enabled":true,"connected":true},{"interface":"WIFI","macAddress":"ec:9c:32:aa:c5:d4","enabled":true,"connected":false}],"success":true}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"DeviceInfo.systeminfo"}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"version":"4.2.#R4.2","uptime":1242,"totalram":1881755648,"freeram":980897792,"totalswap":0,"freeswap":0,"devicename":"mediaclient-mediabox","cpuload":"13","cpuloadavg":{"avg1min":40160,"avg5min":50592,"avg15min":43584},"serialnumber":"","time":"Tue, 27 Feb 2024 15:33:52"}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.Network.getIPSettings","params":{"interface":"ETHERNET"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"interface":"ETHERNET","ipversion":"IPV6","autoconfig":true,"ipaddr":"2601:4c:0:420:210:20ff:fe30:7ec5","netmask":"ffff:ff00::","gateway":"fe80::be9b:68ff:fec0:272b","primarydns":"","secondarydns":"","success":true}}
RDK request: {"jsonrpc":"2.0","id":3,"method":"org.rdk.Network.getIPSettings","params":{"interface":"WIFI"}}
RDK response: {"jsonrpc":"2.0","id":3,"result":{"success":false}}
RDK request: {"jsonrpc":"2.0","id":1,"method":"org.rdk.System.getDeviceInfo","params":{"params":["estb_mac"]}}
RDK response: {"jsonrpc":"2.0","id":1,"result":{"estb_mac":"00:10:20:30:7E:C5","success":true}}
^C
d35@d35:~/Desktop/dab-works/dab-adapter-rs$
MQTT Listener logs:
d35@d35:~/Desktop/dab-works/dab-adapter-rs$ mosquitto_sub -h 10.0.0.81 -v -t '#' | ts '[%Y%b%d %H:%M:%.S]'
[2024Feb27 10:33:49.056845] dab/001020307EC5/device/info {}
[2024Feb27 10:33:49.671539] dab/_response/dab/001020307EC5/device/info {"chipset":"Realtek Hank","deviceId":"001020307EC5","displayType":"External","firmwareBuild":"rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227","firmwareVersion":"rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227","manufacturer":"Dummy response for make.","model":"REALTEKHANK","networkInterfaces":[{"connected":true,"dns":[],"ipAddress":"2601:4c:0:420:210:20ff:fe30:7ec5","macAddress":"00:10:20:30:7e:c5","type":"Ethernet"},{"connected":false,"dns":[],"ipAddress":"","macAddress":"ec:9c:32:aa:c5:d4","type":"Wifi"}],"screenHeightPixels":1080,"screenWidthPixels":1920,"serialNumber":"hanke500","status":200,"uptimeSince":1709046789000}
[2024Feb27 10:33:52.044567] dab/001020307EC5/device/info {}
[2024Feb27 10:33:52.444488] dab/_response/dab/001020307EC5/device/info {"chipset":"Realtek Hank","deviceId":"001020307EC5","displayType":"External","firmwareBuild":"rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227","firmwareVersion":"rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227","manufacturer":"Dummy response for make.","model":"REALTEKHANK","networkInterfaces":[{"connected":true,"dns":[],"ipAddress":"2601:4c:0:420:210:20ff:fe30:7ec5","macAddress":"00:10:20:30:7e:c5","type":"Ethernet"},{"connected":false,"dns":[],"ipAddress":"","macAddress":"ec:9c:32:aa:c5:d4","type":"Wifi"}],"screenHeightPixels":1080,"screenWidthPixels":1920,"serialNumber":"hanke500","status":200,"uptimeSince":1709046790000}
Compliance Suite Response Init call takes 600ms but subsequent ones about 400ms
d35@d35:~/Desktop/dab-works/dab-compliance-suite$ dabSingleTest DeviceInfoConformance
testing device/info {} ...
device/info Latency, Expected: 200 ms, Actual: 626 ms
device/info took more time than expected.
[ FAILED ]
{
"chipset": "Realtek Hank",
"deviceId": "001020307EC5",
"displayType": "External",
"firmwareBuild": "rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227",
"firmwareVersion": "rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227",
"manufacturer": "Dummy response for make.",
"model": "REALTEKHANK",
"networkInterfaces": [
{
"connected": true,
"dns": [],
"ipAddress": "2601:4c:0:420:210:20ff:fe30:7ec5",
"macAddress": "00:10:20:30:7e:c5",
"type": "Ethernet"
},
{
"connected": false,
"dns": [],
"ipAddress": "",
"macAddress": "ec:9c:32:aa:c5:d4",
"type": "Wifi"
}
],
"screenHeightPixels": 1080,
"screenWidthPixels": 1920,
"serialNumber": "hanke500",
"status": 200,
"uptimeSince": 1709046789000
}
d35@d35:~/Desktop/dab-works/dab-compliance-suite$
d35@d35:~/Desktop/dab-works/dab-compliance-suite$ dabSingleTest DeviceInfoConformance
testing device/info {} ...
device/info Latency, Expected: 200 ms, Actual: 412 ms
device/info took more time than expected.
[ FAILED ]
{
"chipset": "Realtek Hank",
"deviceId": "001020307EC5",
"displayType": "External",
"firmwareBuild": "rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227",
"firmwareVersion": "rdk-generic-mediaclient-westeros-wpe-image_FBT_nightly-20240226-dunfell_20240226060227",
"manufacturer": "Dummy response for make.",
"model": "REALTEKHANK",
"networkInterfaces": [
{
"connected": true,
"dns": [],
"ipAddress": "2601:4c:0:420:210:20ff:fe30:7ec5",
"macAddress": "00:10:20:30:7e:c5",
"type": "Ethernet"
},
{
"connected": false,
"dns": [],
"ipAddress": "",
"macAddress": "ec:9c:32:aa:c5:d4",
"type": "Wifi"
}
],
"screenHeightPixels": 1080,
"screenWidthPixels": 1920,
"serialNumber": "hanke500",
"status": 200,
"uptimeSince": 1709046790000
}
d35@d35:~/Desktop/dab-works/dab-compliance-suite$
This change has the following:
Test Details: For a "release" type build; the static hashmap triggered APIs will cause Complaince Suite error response if not supported by platform.
For a "non-release" type build; they won't cause Complaince Suite error as its not DAB integration error; instead platform API integration error.