
{"id":10594,"date":"2026-02-16T11:13:16","date_gmt":"2026-02-16T11:13:16","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/support\/?page_id=10594"},"modified":"2026-02-16T11:13:33","modified_gmt":"2026-02-16T11:13:33","slug":"integration-guide-for-third-party-applications-into-rdk-b-stack","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/","title":{"rendered":"Integration Guide for third-party applications into RDK-B stack"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Overview\">Overview<\/h2>\n\n\n\n<p>This guide is intended to provide guidance for those who want to integrate their custom application to an RDK-B based device. The guide covers the below cases<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>How to add a third-party application to the Yocto build system<\/li>\n\n\n\n<li>How to get the application running in the target device<\/li>\n\n\n\n<li>How to control and configure the application<\/li>\n\n\n\n<li>How the application can fetch data from the platform to share to head-end<\/li>\n<\/ul>\n\n\n\n<p>The guide is based on the Raspberry Pi reference platform available for community, but is easily portable to other devices with minimal changes. The below mentioned names are used for the purpose of explaining the process in the guide (names for each are kept slightly different for ease of distinguishing in between)<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Source file:<\/td><td>sampleapp.c<\/td><\/tr><tr><td>Service name:<\/td><td>sample<\/td><\/tr><tr><td>Meta layer folder:<\/td><td>meta-rdk-sampleapp<\/td><\/tr><tr><td>Recipe name:<\/td><td>sampleapp<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-IntegrateapplicationtoYoctobuildsystem\">Integrate application to Yocto build system<\/h2>\n\n\n\n<p>RDK is based on Yocto build system. Based on Yocto philosophy, it is advised to use a separate layer for the sample application which will provide better portability also. A sample folder with desired structure is created and attached as zip. Please refer it for examples<\/p>\n\n\n\n<p>Steps to be followed:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Createanewmetalayerforstoringbuildrelateddata\">Create a new meta layer for storing build related data<\/h3>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;In order to add the new application to the Yocto build system (and to keep it independent of existing RDK versions as well as SoC\/OEM\/MSO), add a new meta layer. For this, a new folder named meta-&lt;layername&gt; will be added in the base directory of the Yocto build. The layer details need to be mentioned in layer.conf file.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;In the example used<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;a) Create a folder named meta-rdk-sampleapp for keeping the layer configuration files<\/p>\n\n\n\n<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ ls meta-rdk-sampleapp<\/strong><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>conf\/ &nbsp;licenses\/&nbsp; LICENSES.TXT&nbsp; recipes-new\/<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b) Add the layer specific configurations to a conf file, so that it can be taken up by the build system when parsing for recipes. The layer configuration is stored in a layer.conf under the conf folder in the meta layer folder.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The configuration file contains settings to take all the bitbake and bitbake append recipes inside the meta-layer during the build, as well as some Yocto related generic configs required for a layer config file.<\/p>\n\n\n\n<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ ls meta-rdk-sampleapp\/conf\/layer.conf<\/strong><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>meta-rdk-sampleapp\/conf\/layer.conf<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;c) Mention the licenses file. Apache 2.0 License file is the default license. Other licenses also can be included ( provided related changes are done in recipe files )<\/p>\n\n\n\n<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ ls meta-rdk-sampleapp\/LICENSES.TXT<\/strong><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>meta-rdk-sampleapp\/LICENSES.TXT<\/em><\/p>\n\n\n\n<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ ls meta-rdk-sampleapp\/licenses<\/strong><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<em>Apache-2.0<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Createanewbitbakerecipefilefortheapplication\">&nbsp;Create a new bitbake recipe file for the application<\/h3>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Add a bitbake recipe file that provides the details of the application including location of code, any config files to be imported, any variables to be set (w.r.t Yocto build system) etc. ).<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Add relevant fields like&nbsp;<strong>LICENSE,LIC_FILES_CHKSUM, inherit<\/strong>&nbsp;etc.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; In the example, a bitbake recipe is added at the below mentioned location (so as to accommodate applications with multiple recipes associated with them across various inner layers):<\/p>\n\n\n\n<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ ls meta-rdk-sampleapp\/recipes-new\/sampleapp\/*.bb<\/strong><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>meta-rdk-sampleapp\/recipes-new\/sampleapp\/<\/em><em><a href=\"http:\/\/sampleapp.bb\/\">sampleapp.bb<\/a><\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;License used is Apache 2.0 and autotools is inherited<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>&nbsp;LICENSE = &#8220;Apache-2.0&#8221;<\/em><\/p>\n\n\n\n<p><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; S = &#8220;${WORKDIR}\/sample&#8221;<\/em><\/p>\n\n\n\n<p><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LIC_FILES_CHKSUM = &#8220;<a href=\"file:\/\/license;md5=175792518e4ac015ab6696d16c4f607e\/\">file:\/\/LICENSE;md5=175792518e4ac015ab6696d16c4f607e<\/a>&#8220;<\/em><\/p>\n\n\n\n<p><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;inherit autotools<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Add\/Pointtothesourcecode(alongwithbuildfiles)intherecipe\">&nbsp;Add\/Point to the source code( along with build files ) in the recipe<\/h3>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Once the bitbake recipe file is added, point to the source file location from within the bitbake recipe. This can be achieved with the help of&nbsp;<strong>SRC_URI&nbsp;<\/strong>variable. If multiple sources are to be fetched,&nbsp;<strong>SRC_URI +=<\/strong>&nbsp;will do the trick<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;In the example, a tar ball is used as the source location for the source code. So the location where the tar ball is present (using&nbsp;<strong>FILESEXTRAPATHS_prepend<\/strong>&nbsp;variable) needs to be specified<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<em>FILESEXTRAPATHS_prepend := &#8220;${THISDIR}:&#8221;<\/em><\/p>\n\n\n\n<p><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SRC_URI =&nbsp;<a href=\"file:\/\/sampleapp.tgz\/\">file:\/\/sampleapp.tgz<\/a><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Addaservicefiletocontroltheapplication\">&nbsp;Add a service file to control the application<\/h3>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; In order to control the application, it should be registered as a service. This will help systemd to take care of starting\/stopping the service.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; In the example, the service file is also added inside the tar ball. The location of service file is within a scripts folder (for ease of separating it from the build related files) and is at the below location<\/p>\n\n\n\n<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ ls meta-rdk-sampleapp\/recipes-new\/sampleapp\/files\/sample\/scripts\/sample.service<\/strong><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;meta-rdk-sampleapp\/recipes-new\/sampleapp\/files\/sample\/scripts\/sample.service<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; The service file just mentions the location of the sample application (which needs to be controlled by it) along with some generic service file information<\/p>\n\n\n\n<p><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ cat meta-rdk-sampleapp\/recipes-new\/sampleapp\/files\/sample\/scripts\/sample.service<\/strong>[Unit]<\/p>\n\n\n\n<p><em>Description=Example sampleapp systemd service.<\/em><\/p>\n\n\n\n<p><em>[Service]<\/em><\/p>\n\n\n\n<p><em>Type=simple<\/em><\/p>\n\n\n\n<p><em>ExecStart=\/usr\/bin\/sampleAppn<\/em><\/p>\n\n\n\n<p><em>ExecStop=\/bin\/sh -c &#8216; echo &#8220;Sample service Stopped&#8221; &#8216;<\/em><\/p>\n\n\n\n<p><em>[Install]<\/em><\/p>\n\n\n\n<p><em>WantedBy=multi-user.target<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Definethedeliverablesoftherecipe\">&nbsp;Define the deliverables of the recipe<\/h3>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; Deliverables of the recipe includes the files that will be packaged and included in the final binary, as part of this component. This might include executable, script files, xml\/con files, certificates etc.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; In the example, the deliverables are the sample application binary (<strong>sampleAppn)<\/strong>&nbsp;and the service file (&nbsp;<strong>sample.service<\/strong>&nbsp;) . The application binary will be taken up by the recipe as part of its default behaviour.The service file, should be manually copied to rootfs using&nbsp;<strong>do_install_append<\/strong>&nbsp;function, as well as marked as a service file using the&nbsp;<strong>SYSTEMD_SERVICE_${PN}<\/strong>&nbsp;variable. Both the service file and the binary should be marked for packaging to the final image too using&nbsp;<strong>FILES_${PN}<\/strong>&nbsp;variable. The below mentioned additions in the sample app bitbake recipe file should do the trick<\/p>\n\n\n\n<p><em>do_install_append () {<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp; # Config files and scripts<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp; install -d ${D}${systemd_unitdir}\/system<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp; install -D -m 0644 ${S}\/scripts\/sample.service ${D}${systemd_unitdir}\/system\/sample.service<\/em><\/p>\n\n\n\n<p><em>}<\/em><\/p>\n\n\n\n<p><em>SYSTEMD_SERVICE_${PN} += &#8220;sample.service&#8221;<\/em><\/p>\n\n\n\n<p><em>FILES_${PN} += &#8221; \\<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/usr\/bin\/* \\<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${systemd_unitdir}\/system\/sample.service \\<\/em><\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Addthemeta-layertothemachineconfiguration,sothatthisistakenupduringcompilation\">Add the meta-layer to the machine configuration, so that this is taken up during compilation<\/h3>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; The changes to add the recipe to the build configuration for the target is device specific ( ie the target device to which the application is being integrated ).<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; This generally involves (but might differ from platform to platform) adding the layer to the setup-environment file and to add the bitbake recipe name to the main package group recipe.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;In the example, the below changes are added to the respective files for raspberry pi reference platform build system,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u00a0 \u00a0 \u00a0 \u00a0In\u00a0<strong>\u00a0meta-cmf-raspberrypi\/conf\/layer.conf<\/strong><\/li>\n<\/ul>\n\n\n\n<p>&nbsp; &nbsp;&nbsp;<em>&nbsp; &nbsp; &nbsp;LAYERDEPENDS_cmf-raspberrypi = &#8221; rdk-sampleapp&#8221;<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u00a0 \u00a0 \u00a0 In\u00a0<strong>meta-cmf-raspberrypi\/setup-environment<\/strong><\/li>\n<\/ul>\n\n\n\n<p><em># Add meta-rdk-sampleapp only if not already present for RDK-B<\/em><\/p>\n\n\n\n<p><em>echo &#8220;${_RDK_FLAVOR}&#8221;<\/em><\/p>\n\n\n\n<p><em>if [[ &#8220;${_RDK_FLAVOR}&#8221; = &#8220;rdkb&#8221; ]]<\/em><\/p>\n\n\n\n<p><em>then<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp; if [ $(grep &#8216;^BBLAYERS&#8217; conf\/bblayers.conf | grep -c &#8216;meta-rdk-sampleapp&#8217;) -eq 0 -a -d&nbsp; $TOP_DIR\/meta-rdk-sampleapp ]<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp; then<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cat &gt;&gt; conf\/bblayers.conf &lt;&lt;EOF<\/em><\/p>\n\n\n\n<p><em>BBLAYERS =+ &#8220;\\${RDKROOT}\/meta-rdk-sampleapp&#8221;<\/em><\/p>\n\n\n\n<p><em>EOF<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp; fi<\/em><\/p>\n\n\n\n<p><em>fi<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u00a0 \u00a0In\u00a0<strong>meta-cmf-raspberrypi\/recipes-core\/packagegroups\/packagegroup-rdk-oss-broadband.bbappend\u00a0<\/strong>, add this to the end of<strong>\u00a0DEPENDS_packagegroup-rdk-oss-broadband_append\u00a0<\/strong>variable.<\/li>\n<\/ul>\n\n\n\n<p>&nbsp; &nbsp; &nbsp;&nbsp;<em>sampleapp \\<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Runtheapplicationintargetdevice\">Run the application in target device<\/h2>\n\n\n\n<p>This section details how the application can be run as a service. Running the application as a cron job or any other method standard to Linux is not included here (but can easily be achieved following standard Linux practices). Running the application by a trigger from head-end is explained later in section&nbsp;<a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#IntegrationGuideforthird-partyapplicationsintoRDK-Bstack-Control\/Configuretheapplication\">Control &amp; Configure the application<\/a><\/p>\n\n\n\n<p>As mentioned in previous section, the application is packaged along with a service file that can be used to start\/stop\/restart it as per standard systemd commands.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To start:<\/li>\n<\/ul>\n\n\n\n<p><strong>systemctl start &lt;servicename&gt;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To stop:<\/li>\n<\/ul>\n\n\n\n<p><strong>systemctl stop &lt;servicename&gt;<\/strong><\/p>\n\n\n\n<p><em>*Note that any logic that needs to be run before exit of the service needs to be taken care externally (see below section &nbsp;<a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#IntegrationGuideforthird-partyapplicationsintoRDK-Bstack-Control\/Configuretheapplication\">Control &amp; Configure the application<\/a>&nbsp;for an example) as systemd won\u2019t be able to handle it<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To restart:<\/li>\n<\/ul>\n\n\n\n<p><strong>systemctl restart &lt;servicename&gt;<\/strong><\/p>\n\n\n\n<p>In the Raspberry Pi example, the name of the service is sample, so the commands to start, stop or restart the service will be (in the order)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To start:<\/li>\n<\/ul>\n\n\n\n<p><strong>systemctl start sample<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To stop:<\/li>\n<\/ul>\n\n\n\n<p><strong>systemctl stop sample<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To restart:<\/li>\n<\/ul>\n\n\n\n<p><strong>systemctl restart sample<\/strong><\/p>\n\n\n\n<p>To check the status of the service, the command<strong>&nbsp;\u2018systemctl status sample\u2019&nbsp;<\/strong>can be used<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Autostarttheapplication\">Auto start the application<\/h2>\n\n\n\n<p>This section details how the application is set to start\/stop automatically during boot up. If no other special control is required to start\/stop the service and it can just start at boot up of device, it can be simply achieved by marking the service as enabled against the&nbsp;<strong>SYSTEMD_AUTO_ENABLE<\/strong>&nbsp;variable in the bitbake recipe. The change would look as given below:<\/p>\n\n\n\n<p><em>SYSTEMD_AUTO_ENABLE = &#8220;enable&#8221;<\/em><\/p>\n\n\n\n<p>In the Raspberry Pi example, this needs to be added anywhere in the file&nbsp;<strong>meta-rdk-sampleapp\/recipes-new\/sampleapp\/sampleapp.bb<\/strong><\/p>\n\n\n\n<p>In a real world scenario, the application start-up will be mostly conditional. To achieve this, the sys config variables available within the RDK-B can be used. The Syscfg system usually consists of a persistent data base which will be used up by the RDK-B to maintain status\/data of various parameters. Syscfg offers a set operation (which can be used to update the status) and a get operation (which can be used to retrieve the current status). In order to achieve conditional start, the below two changes are required<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The default value of the variable needs to be added to the system_defaults file (this will be used up during first boot as well as boot up following a factory reset). This file will be used to populate the Syscfg db during first time boot<\/li>\n<\/ol>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The file is present in \/etc\/utopia\/system_defaults in the CPE. In order to add the variable and its default value, the file system_defaults need to be added with the variable name and default value<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;In the Raspberry Pi example, the system_defaults file is present at&nbsp;<strong>meta-cmf-raspberrypi\/recipes-ccsp\/util\/utopia\/system_defaults.&nbsp;&nbsp;<\/strong>The below line should be added to the file (1 denotes enabled and 0 denotes disabled in the example)<\/p>\n\n\n\n<p>&nbsp; &nbsp;<em>&nbsp; &nbsp; &nbsp; &nbsp;sampleapp_enabled=1<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp;2.The regular value of the variable needs to be fetched during start-up so as to decide if service needs to be started or not.<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;The regular file is usually present in the \/nvram\/syscfg.db file in CPE. Once the file is populated, there is no change required to update the values. To set\/get the value in syscfg.db, the below commands can be used<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To set value to 0<\/li>\n<\/ul>\n\n\n\n<p><em>syscfg set sampleapp_enabled 0<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To set the value to 1<\/li>\n<\/ul>\n\n\n\n<p><em>syscfg set sampleapp_enabled 1<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To save the value to Syscfg db file, the below command needs to be run<\/li>\n<\/ul>\n\n\n\n<p><em>syscfg commit<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To retrieve the value<\/li>\n<\/ul>\n\n\n\n<p><em>syscfg get sampleapp_enabled<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; 3. The variable value needs to be used to control service start-up<\/p>\n\n\n\n<p>Instead of starting the application as such( from the service file ), a conditional check needs to be added in the service file&nbsp; which gets the value of the sysconfig variable sampleapp_enabled and then starts the sample application only if the value is set to 1. In the example, the line in black needs to be changed to the line in brown&nbsp; in the file&nbsp;<strong>meta-rdk-sampleapp\/recipes-new\/sampleapp\/files\/sample\/scripts\/sample.service<\/strong><\/p>\n\n\n\n<p><em>ExecStart=\/usr\/bin\/sampleAppn<\/em><\/p>\n\n\n\n<p><em>ExecStart=\/bin\/sh -c &#8216;val=`syscfg get sampleapp_enabled`; echo &#8220;$val&#8221;; if [ &#8220;$val&#8221; == 1 ]; then \/usr\/bin\/sampleAppn; fi &#8216;<\/em><\/p>\n\n\n\n<p>To verify the results, set the value of \u2018sampleapp_enabled\u2019 variable to 1, restart the device and check the status of service using the command<strong>&nbsp;\u2018systemctl status sample\u2019<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Control\/Configuretheapplication\">Control\/Configure the application<\/h2>\n\n\n\n<p>The standard method to control and configure an application or component in RDK-B \/ CCSP is to use TR-181 data models. This helps the application to communicate with other CCSP components as well as head end systems using the standard communication mechanism in RDK-B.<\/p>\n\n\n\n<p>Depending on the requirements, the data models can be part of<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>An existing CCSP component ( for e.g.: CcspPandM ) or<\/li>\n\n\n\n<li>A new CCSP Component created for ad-hoc control of the sample application<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-AddingaNewTestComponent:AddingaNewTestComponent\"><strong><u>Adding a New Test Component:<\/u><\/strong><\/h3>\n\n\n\n<p><strong>This section briefs how to add a new component along with TR-181 data models to RDK-B.<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-TestComponentAPIList\">Test Component API List<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>TestComponent_GetParamUlongValue<\/td><td>&nbsp;API is used to retrieve the parameter value of type \u201cunsignedInt\u201d<\/td><\/tr><tr><td>TestComponent_SetParamUlongValue<\/td><td>API is used to set the parameter value of type \u201cunsignedInt\u201d<\/td><\/tr><tr><td>TestComponent_GetParamStringValue&nbsp;<\/td><td>API is used to retrieve the parameter value of type \u201cstring\u201d<\/td><\/tr><tr><td>TestComponent_SetParamStringValue&nbsp; &nbsp;<\/td><td>API is used to set the parameter value of type \u201cstring\u201d<\/td><\/tr><tr><td>TestComponent_Commit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/td><td>To Commit all the update to the data model<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Buildccsp-testcomponentforRaspberryPidevice\">Build ccsp-testcomponent for Raspberry Pi device<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Put the\u00a0<a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/123896069\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#\">ccsp-testcomponent.bb<\/a>\u00a0recipe file inside meta-rdk-broadband\/recipes-ccsp\/ccsp\u00a0 location.<\/li>\n\n\n\n<li>\u00a0Create folder names &#8220;files&#8221; under\u00a0 &#8220;meta-rdk-broadband\/recipes-ccsp\/ccsp&#8221; path<\/li>\n\n\n\n<li>Put\u00a0<a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/123896069\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#\">CcspTestComponent.tar.gz<\/a>\u00a0(source code of TestComponent)\u00a0file inside meta-rdk-broadband\/recipes-ccsp\/ccsp\/files\u00a0 \u00a0location.<\/li>\n\n\n\n<li>Build the test component inside build directory i.e. build-raspberrypi-rdk-broadband directory.<br><em>bitbake ccsp-testcomponent<\/em><\/li>\n\n\n\n<li>Binary file of test component will be present inside build-raspberrypi-rdk-broadband\/tmp\/work\/cortexa7hf-neon-vfpv4-rdk-linux-gnueabi\/ccsp-testcomponent\/1.0-r0\/image\/usr\/bin\/ location<\/li>\n\n\n\n<li>XML file of test component will be present inside\u00a0<br>build-raspberrypi-rdk-broadband\/tmp\/work\/cortexa7t2hf-neon-vfpv4-rdk-linux-gnueabi\/ccsp-testcomponent\/1.0-r0\/image\/usr\/ccsp\/testcomponent\/ location.<\/li>\n<\/ol>\n\n\n\n<p>NOTE : For rpi4 , yocto 3.1 use&nbsp;<a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/123896069\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#\">ccsp_testcomponent.tar.gz<\/a>&nbsp;to avoid build errors due to cfg directory missing<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-RuntheTestComponent\">Run the Test Component<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-CopythesupportedfilestoRaspberryPidevice\">Copy the supported files to&nbsp;Raspberry Pi device<\/h5>\n\n\n\n<p>Copy test_component (Binary of ccsp-testcomponent, generated in step 4 of Build) and TestComponent.xml (present at location mentioned in step 5 of Build) to \/tmp\/ directory of Raspberry Pi device.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-ExecutetheTestComponentintheRaspberryPidevice\">Execute the TestComponent in the&nbsp;Raspberry Pi device<\/h5>\n\n\n\n<p>Go to \/tmp\/ directory of Raspberry Pi 3 and start the ccsp-testcomponent<br><em>.\/test_component -subsys eRT.<\/em><\/p>\n\n\n\n<p>You can check the status of the process by doing&nbsp;<em>&nbsp;ps&nbsp;<\/em>in the RPi device.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-ValidateifcomponentisregisteredwithCR\">Validate if component is registered with CR<\/h5>\n\n\n\n<p>DMCLI (Database Manager Command Line Interface) provides interface used to send and receive command\/messages via CLI (Command Line Interface) over Telnet and SSH protocols.<\/p>\n\n\n\n<p>List all the test component parameters using dmcli:<\/p>\n\n\n\n<p><em>dmcli eRT getv Device.TestComponent.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Expected Output:\nCR component name is: eRT.com.cisco.spvtg.ccsp.CR\nsubsystem_prefix eRT.\ngetv from\/to component(eRT.com.cisco.spvtg.ccsp.testcomponent): Device.TestComponent.\nExecution succeed.\nParameter    1 name: Device.TestComponent.TestSampleParamUlong\n               type:       uint,    value: 1<\/pre>\n\n\n\n<p>Change the &#8220;TestSampleParamUlong&#8221; parameter value by using below command:<\/p>\n\n\n\n<p><em>dmcli eRT setv Device.TestComponent.TestSampleParamUlong uint 5<\/em><\/p>\n\n\n\n<p>Now verify the value by this command<\/p>\n\n\n\n<p><em>dmcli eRT getv Device.TestComponent.TestSampleParamUlong<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-IncludeNewlyAddedComponentinPackageGroup\">Include Newly Added Component in Package Group<\/h4>\n\n\n\n<p>Once the validation is successfully done and we can now include the new component (ccsp-testcomponent) in the package groups.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u00a0Open &#8220;packagegroup-rdk-ccsp-broadband.bb&#8221; file present at &#8220;meta-rdk\/recipes-core\/packagegroups\/packagegroup-rdk-ccsp-broadband.bb&#8221; location.<\/li>\n\n\n\n<li>In the &#8220;RDEPENDS_packagegroup-rdk-ccsp-broadband&#8221; flag add the name of new component.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Addinganewparametertotheexistingcomponent\">Adding a new parameter to the existing component<\/h3>\n\n\n\n<p>This method can be utilized if the sample application has functionality similar to an existing component or if there are no detailed configurations required to be done from head-end using different protocols (which are abstracted by RDK-B and converter to TR-181 format). In this options, a new TR-181 data model can be added to an existing component. To achieve this, the changes required are<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add the data model details in the corresponding xml file<\/li>\n\n\n\n<li>Add the data model parameter to the corresponding DML file<\/li>\n\n\n\n<li>Add the underlying functionality to the corresponding API file<\/li>\n<\/ul>\n\n\n\n<p>Refer files in folder sampleDatamodel_Existing_Component for more details.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-AddingthedatamodeldetailsinXMLfile\">Adding the data model details in XML file<\/h4>\n\n\n\n<p>A data model is known to exist, along with its characteristics, based on its configuration in xml file. In order to add the details in XML, the first thing to check is whether the type of the data model (Boolean, int , string etc. ) is already supported in the targeted object family. If it is already present, skip to next section where adding data model parameter is explained. If it is not present, need to add the set and get function details to xml file<\/p>\n\n\n\n<p><em>&lt;object&gt;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;<strong>X_CISCO_COM_DeviceControl<\/strong>&lt;\/name&gt;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&lt;objectType&gt;object&lt;\/objectType&gt;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&lt;functions&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/em><\/p>\n\n\n\n<p><em>&lt;<strong>func_GetParamTypeValue&gt;GetFunctionName_For_Type&lt;\/func_GetParamTypeValue<\/strong>&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;<strong>func_SetParamTypeValue&gt; SetFunctionName_For_Type &lt;\/func_SetParamTypeValue<\/strong>&gt;<\/em><\/p>\n\n\n\n<p>In the above code, replace the highlighted text within &lt;&gt; with proper data type. Also, replace the function name with proper get and set function names for the type as defined in DML file in next section<\/p>\n\n\n\n<p>In order to add the details of data model, add the below code block within the&nbsp;<strong>&lt;parameters&gt; &lt;\/parameters&gt;&nbsp;<\/strong>block. Syntax should be<\/p>\n\n\n\n<p><em>&lt;parameter&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;name&gt;<strong>DataModel_Name&lt;<\/strong>\/name&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;type&gt;<strong>DataModel_Type<\/strong>&lt;\/type&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;syntax&gt;<strong>DataModel_Type_Syntax<\/strong>&lt;\/syntax&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;writable&gt;<strong>True_If_DataModel_Is_Writable_False_If_ReadOnly<\/strong>&lt;\/writable&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;\/parameter&gt;<\/em><\/p>\n\n\n\n<p>In the above snippet, replace highlighted code with respective values (use existing data models for a reference, if required)<\/p>\n\n\n\n<p>In the example case, the data model will be added under&nbsp;<strong>Device.X_CISCO_COM_DeviceControl<\/strong>. The data model is of type bool. The set and get functions are&nbsp;<strong>X_CISCO_COM_DeviceControl_GetParamBoolValue&nbsp;<\/strong>and<strong>&nbsp;X_CISCO_COM_DeviceControl_SetParamBoolValue.<\/strong>&nbsp;So the code will look like<\/p>\n\n\n\n<p><em>&lt;object&gt;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;<strong>X_CISCO_COM_DeviceControl<\/strong>&lt;\/name&gt;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&lt;objectType&gt;object&lt;\/objectType&gt;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&lt;functions&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;<strong>func_GetParamBoolValue&gt;X_CISCO_COM_DeviceControl_GetParamBoolValue&lt;\/func_GetParamBoolValue<\/strong>&gt;<\/em><\/p>\n\n\n\n<p><em>&lt;<strong>func_SetParamBoolValue&gt;X_CISCO_COM_DeviceControl_SetParamBoolValue&lt;\/func_SetParamBoolValue<\/strong>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/em><\/p>\n\n\n\n<p><em>..<\/em><\/p>\n\n\n\n<p><em>..<\/em><\/p>\n\n\n\n<p><em>..<\/em><\/p>\n\n\n\n<p><em>&lt;parameters&gt;<\/em><\/p>\n\n\n\n<p><em><strong>&lt;parameter&gt;<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>&lt;name&gt;SampleAppEnable&lt;\/name&gt;<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>&lt;type&gt;boolean&lt;\/type&gt;<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>&lt;syntax&gt;bool&lt;\/syntax&gt;<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>&lt;writable&gt;true&lt;\/writable&gt;<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>&lt;\/parameter&gt;<\/strong><\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-AddthedatamodelparametertothecorrespondingDMLfile(cosa_x_cisco_com_devicecontrol_dml.*)\">Add the data model parameter to the corresponding DML file (cosa_x_cisco_com_devicecontrol_dml.*)<\/h4>\n\n\n\n<p>Any invocation of the data model results in the call being redirected to the functions defined in DML file. These are the same functions that are being mentioned in the XML file. Changes include (refer attached code files for details)<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Declare the set and get functions (mentioned in the XML) in header file and define them in c file (Skip this if data model is of an existing type)<\/li>\n\n\n\n<li>In the definition of both functions, add an \u2018if\u2019 case to check if the invocation is for the defined data model<\/li>\n<\/ol>\n\n\n\n<p><em>if (AnscEqualString(ParamName, &#8220;<strong>DataModelName<\/strong>&#8220;, TRUE))<\/em><\/p>\n\n\n\n<p><em>{<\/em><\/p>\n\n\n\n<p><em>\u2026<\/em><\/p>\n\n\n\n<p><em>}<\/em><\/p>\n\n\n\n<p>Replace the highlighted part in above snippet with the data model name mentioned in XML<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the get function, either invoke the corresponding get function in API file or directly get it from syscfg APIs. In either case, update the output variable passed into the function (refer attached code files for details)<\/li>\n\n\n\n<li>In the set function, invoke the corresponding set function in API file. Return status based on API function return value (refer attached code files for details)<\/li>\n<\/ol>\n\n\n\n<p>In the example, the below code will be added to the get function&nbsp;<strong>X_CISCO_COM_DeviceControl_GetParamBoolValue<\/strong>&nbsp;, which will read the value from syscfg db and returns the value<\/p>\n\n\n\n<p><em>if (AnscEqualString(ParamName, &#8220;SampleAppEnable&#8221;, TRUE))<\/em><\/p>\n\n\n\n<p><em>{<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char buf[8] = {0};<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; syscfg_get( NULL, &#8220;sampleapp_enabled&#8221;, buf, sizeof(buf));<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(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sp;&nbsp;&nbsp; }<\/em><\/p>\n\n\n\n<p><em>}<\/em><\/p>\n\n\n\n<p>For the set function&nbsp;<strong>X_CISCO_COM_DeviceControl_SetParamBoolValue,<\/strong>&nbsp;the below code snippet is used (where&nbsp;<strong>CosaDmlDcSetSampleApp<\/strong>&nbsp;is the API function for set) which will set the value in syscfg db, invokes the API function and then returns the status<\/p>\n\n\n\n<p><em>if (AnscEqualString(ParamName, &#8220;SampleAppEnable&#8221;, TRUE))<\/em><\/p>\n\n\n\n<p><em>{<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char buf[8] = {0};<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pMyObject-&gt;Enable = bValue;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; snprintf(buf,sizeof(buf),&#8221;%d&#8221;,bValue);<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( syscfg_set(NULL,&#8221;sampleapp_enabled&#8221;, buf) != 0 )<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AnscTraceWarning((&#8220;syscfg_commit failed \\n&#8221;));<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retStatus = CosaDmlDcSetSampleApp(NULL, pMyObject-&gt;Enable);<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( retStatus != ANSC_STATUS_SUCCESS )<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return FALSE;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return TRUE;<\/em><\/p>\n\n\n\n<p><em>}<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-AddtheAPIincorrespondingAPIfile(cosa_x_cisco_com_devicecontrol_apis.*)\">Add the API in corresponding API file (cosa_x_cisco_com_devicecontrol_apis.*)<\/h4>\n\n\n\n<p>The API file contains the actual API (invoked by the function in DML file) that performs the action intended to be performed by the SET operation (and in most cases the data fetch for the GET operation). Changes include (refer attached code files for details)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add the declaration of the API in header file<\/li>\n\n\n\n<li>Add the definition in the corresponding C file<\/li>\n\n\n\n<li>In the definition body, run the corresponding commands to start the service (either using system () or exec () or choice of other functions)<\/li>\n<\/ul>\n\n\n\n<p>In the example, the below code snippet is added to start (restart is used in case service is stuck and Data Model is invoked to recover) and stop the service<\/p>\n\n\n\n<p>A<em>NSC_STATUS<\/em><\/p>\n\n\n\n<p><em>CosaDmlDcSetSampleApp<\/em><\/p>\n\n\n\n<p><em>(<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANSC_HANDLE hContext,<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BOOLEAN pFlag<\/em><\/p>\n\n\n\n<p><em>)<\/em><\/p>\n\n\n\n<p><em>{<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pFlag == 0)<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system(&#8220;systemctl restart sample&#8221;);<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CcspTraceInfo((&#8220;Inside restart\\n&#8221;));<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ANSC_STATUS_SUCCESS;<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/em><\/p>\n\n\n\n<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/&nbsp;&nbsp; return ANSC_STATUS_SUCCESS;<\/em><\/p>\n\n\n\n<p><em>}<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-AddinganewCCSPComponentcreatedforad-hoccontrolofthesampleapplication\">Adding a new CCSP Component created for ad-hoc control of the sample application<\/h3>\n\n\n\n<p>This method helps in having an ad-hoc CCSP agent to control and configure the application. Advantages include lesser or no dependency on other components (including their health), portability to multiple platforms and ease of use in upgraded versions of RDK-B. In this method, a new CCSP component is added along with data models to control the application (steps to add the data model in this case is same as mentioned in above section)<\/p>\n\n\n\n<p>The detailed sample files are included in the sample_ccspComponent folder in the associated zip file which should be referred to and used as a template to start with<\/p>\n\n\n\n<p>In short,<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add the bitbake recipe file ccsp-testcomponent.bb to the meta layer where the sample component is added ( see\u00a0<a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#IntegrationGuideforthird-partyapplicationsintoRDK-Bstack-IntegrateapplicationtoYoctobuildsystem\">Integrate application to Yocto build system<\/a>\u00a0)<\/li>\n\n\n\n<li>Update the bitbake recipe to point to actual code, as well as any required changes<\/li>\n\n\n\n<li>Update bblayers or conf files for required changes, if any. Add the recipe to relevant package group file and update the component name in RDEPENDS flag( see\u00a0<a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#IntegrationGuideforthird-partyapplicationsintoRDK-Bstack-IntegrateapplicationtoYoctobuildsystem\">Integrate application to Yocto build system<\/a>)<\/li>\n\n\n\n<li>Update the XML file at CcspTestComponent\\scripts\\TestComponent.xml with required data models to control the application. Refer section\u00a0<a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Addinganewparametertotheexistingcomponent\">Adding a new parameter to the existing component<\/a><a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDKM\/%5BDRAFT%5D+Integration+Guide+for+third-party+applications+into+RDK-B+stack#id-%5BDRAFT%5DIntegrationGuideforthird-partyapplicationsintoRDK-Bstack-Addinganewparametertotheexistingcomponent\">t<\/a>\u00a0for details on how to add data models<\/li>\n\n\n\n<li>Update the CCSP Component service file for any required conditional start at CcspTestComponent\\scripts\\CcspTestComponent.service<\/li>\n\n\n\n<li>Update the DML and API functionalities (for ease, both are in the same file in the attached sample) in the file at CcspTestComponent\\source\\TestComponent\\cosa_apis_testcomponentplugin.*<\/li>\n\n\n\n<li>Update the SRC_URI in the bitbake recipe to point to the location with updated code (either recipe or tgz file)<\/li>\n\n\n\n<li>Makefiles etc. are already available in the tgz file with required config<\/li>\n\n\n\n<li>Compile and generate image. Verify CCSP component service is running fine or not<\/li>\n<\/ol>\n\n\n\n<p>Detailed steps are given below<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-IntegratethecomponenttoYoctobuildsystem\">Integrate the component to Yocto build system<\/h4>\n\n\n\n<p>Refer&nbsp;<a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#IntegrationGuideforthird-partyapplicationsintoRDK-Bstack-IntegrateapplicationtoYoctobuildsystem\">Integrate application to Yocto build system<\/a>&nbsp;for more details on how to integrate a component in Yocto.&nbsp;Refer section&nbsp;<a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Integration+Guide+for+third-party+applications+into+RDK-B+stack#IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Addinganewparametertotheexistingcomponent\">Adding a new parameter to the existing component<\/a><a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDKM\/%5BDRAFT%5D+Integration+Guide+for+third-party+applications+into+RDK-B+stack#id-%5BDRAFT%5DIntegrationGuideforthird-partyapplicationsintoRDK-Bstack-Addinganewparametertotheexistingcomponent\">t<\/a>&nbsp;for details on how data models are added in a component<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Put the ccsp-testcomponent.bb recipe file inside\u00a0<em>meta-rdk-broadband\/recipes-ccsp\/ccsp<\/em>\u00a0\u00a0location.<\/li>\n\n\n\n<li>Create folder names &#8220;files&#8221; under\u00a0\u00a0<em>meta-rdk-broadband\/recipes-ccsp\/ccsp<\/em>\u00a0path (Note: In real world, this step should be replaced with fetching source code directly from git )<\/li>\n\n\n\n<li>Put CcspTestComponent.tar.gz (source code of TestComponent) file inside\u00a0<em>meta-rdk-broadband\/recipes-ccsp\/ccsp\/files<\/em>\u00a0\u00a0 location.<\/li>\n\n\n\n<li>Re-run the &#8216;source&#8217; and &#8216;bitbake&#8217; commands\u00a0<br><em>bitbake ccsp-testcomponent<\/em><\/li>\n\n\n\n<li>Binary file of test component will be present inside\u00a0<em>build-raspberrypi-rdk-broadband\/tmp\/work\/cortexa7hf-neon-vfpv4-rdk-linux-gnueabi\/ccsp-testcomponent\/1.0-r0\/image\/usr\/bin\/<\/em>\u00a0location<\/li>\n\n\n\n<li>XML file of test component will be present inside\u00a0<em>build-raspberrypi-rdk-broadband\/tmp\/work\/cortexa7t2hf-neon-vfpv4-rdk-linux-gnueabi\/ccsp-testcomponent\/1.0-r0\/image\/usr\/ccsp\/testcomponent\/\u00a0<\/em>location<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Validatethecomponent\">Validate the component<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Copy\u00a0<em>test_component<\/em>\u00a0(Binary of ccsp-testcomponent, generated in step 4 of Build) and TestComponent.xml (present at location mentioned in step 5 of Build) to\u00a0<em>\/tmp\/<\/em>\u00a0directory of test device<\/li>\n\n\n\n<li>Go to\u00a0<em>\/tmp\/<\/em>\u00a0directory of test device and start the ccsp-testcomponent by running the command<br><em>.\/test_component -subsys eRT.<\/em><\/li>\n\n\n\n<li><em>Verify the component is registered and accessible by running a data model walk using below command<br><\/em><em>dmcli eRT getv Device.TestComponent.<\/em><\/li>\n\n\n\n<li>Change the &#8220;TestSampleParamUlong&#8221; parameter value by using below command:<br><em>dmcli eRT setv Device.TestComponent.TestSampleParamUlong uint 5<\/em><\/li>\n\n\n\n<li>Now verify the value by this command<br><em>dmcli eRT getv Device.TestComponent.TestSampleParamUlong<\/em><\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-IncludeNewlyAddedComponentinPackageGroup.1\">Include Newly Added Component in Package Group<\/h4>\n\n\n\n<p>Once the validation is successfully done and we can now include the new component (ccsp-testcomponent) in the package groups.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u00a0Open packagegroup-rdk-ccsp-broadband.bb\u00a0file present at\u00a0<em>meta-rdk\/recipes-core\/packagegroups\/<a href=\"http:\/\/packagegroup-rdk-ccsp-broadband.bb\/\">packagegroup-rdk-ccsp-broadband.bb<\/a><\/em>\u00a0\u00a0location.<\/li>\n\n\n\n<li>In the\u00a0<em>RDEPENDS_packagegroup-rdk-ccsp-broadband<\/em>\u00a0flag add the name of new component.<\/li>\n<\/ol>\n\n\n\n<p>Following this, in the next build, this component will be taken up by bitbake and packaged in the final build image<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Howtheapplicationcanfetchdatafromtheplatformtosharetohead-end?\">How the application can fetch data from the platform to share to head-end?<\/h2>\n\n\n\n<p>This section details on how to fetch the data for the running application. RDK-B platforms offer many methods to collect data from the CPE. This includes (but not limited to)<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>TR-181 data models<\/li>\n\n\n\n<li>Linux commands<\/li>\n\n\n\n<li>Log files<\/li>\n\n\n\n<li>SoC\/OEM specific utilities<\/li>\n\n\n\n<li>RDK-B specific files<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-TR-181datamodels\">TR-181 data models<\/h3>\n\n\n\n<p>TR-181 data models are the de-facto method to fetch data from multiple components in RDK-B. As per RDK-B Architecture, HAL calls to fetch data from platform should be invoked only by the corresponding CCSP component and other components as well as 3<sup>rd<\/sup>&nbsp;party should be using TR-181 data models to fetch data from that CCSP component. The sampleapp can use data models to fetch data internally, based on request or based on a polling mechanism. There are APIs like Cdm_GetParamString(), to fetch data using available TR-181 data models.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-LinuxCommands\"><strong>Linux Commands<\/strong><\/h3>\n\n\n\n<p>Basic Linux commands to get IP, ARP, trace route etc. can be used to fetch basic networking info as well as device health status (CPU, Memory, Load average etc.). Depending on the support from SoC, more Linux executables might be available. Utilities as part of RDK-B stack like syscfg, sysevent, psmcli etc. can also be used to fetch data<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Logfiles\">Log files<\/h3>\n\n\n\n<p>A good amount of information are available from log files. Logs are located at \/rdklogs\/logs\/ and each component has its own log file so as to collect component specific logs. Generic logs like wifihealth.txt, ArmConsoleLog.txt, Boot log etc. have data either from multiple components or data not restricted to any components<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-SoC\/OEMspecificutilities\">SoC\/OEM specific utilities<\/h3>\n\n\n\n<p>This depends on the support provided by SoC, but utilities like brctl etc. should be available<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-RDK-Bspecificfiles\">RDK-B specific files<\/h3>\n\n\n\n<p>Many of the device specific information are available from RDK-B specific files like \/etc\/device.properties, \/etc\/utopia\/system_defaults etc. and can be used to fetch specific data<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Howtheapplicationcansharecollecteddatatohead-end?\">How the application can share collected data to head-end?<\/h2>\n\n\n\n<p>Depending on the data format, there exists multiple methods to share the data with head-end. This includes (but not limited to)<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>SNMP \u2013 Support already available in RDK-B<\/li>\n\n\n\n<li>TR-69 \u2013 Support already available in RDK-B<\/li>\n\n\n\n<li>WebPA \u2013 Support already available in RDK-B<\/li>\n\n\n\n<li>HTTPS POST (JSON\/file) \u2013 Post data\/file using curl in secured connection<\/li>\n\n\n\n<li>SFTP (file)-Post collected data in file to FTP servers( for cloud operations )<\/li>\n\n\n\n<li>Custom secured connections \u2013 Custom server client direct connections<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-AdditionalLinks\">Additional Links<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Supported TR-181 data models<\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/RDK-B+TR-181+Data+Model\">RDK-B TR-181 Data Model<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Refer the below to fetch the telemetry details from device<\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/wiki.rdkcentral.com\/display\/RDK\/Telemetry+-+configurations%2C+working+procedure\">Telemetry &#8211; configurations , working procedure<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"IntegrationGuideforthirdpartyapplicationsintoRDKBstack-Attachedfiles\">Attached files<\/h2>\n\n\n\n<p>The sample code is attached in&nbsp;<a href=\"https:\/\/wiki.rdkcentral.com\/download\/attachments\/123896069\/IntergationGuide_SampleCode.zip?version=1&amp;modificationDate=1601967594000&amp;api=v2\">IntegrationGuide_SampleCode<\/a>&nbsp; .The following table provides the details on the attached code:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>sample_application<\/td><td>meta-rdk-sampleapp.zip<\/td><td>A sample application that serves as an example for the actual sample application<\/td><\/tr><tr><td>sample_ccspComponent<\/td><td>ccsp-testcomponent.bb&nbsp;CcspTestComponent.tar.gz<\/td><td>A sample Ccsp component that can be used to control the sample application. The bb file is the bitbake recipe and the tar ball contains all the sample code for a Ccsp component and the required functionality can be achieved by making changes in the same<\/td><\/tr><tr><td>sampleDatamodel_Existing_Component<\/td><td>cosa_x_cisco_com_devicecontrol_apis.c&nbsp; cosa_x_cisco_com_devicecontrol_dml.ccosa_x_cisco_com_devicecontrol_apis.h&nbsp; cosa_x_cisco_com_devicecontrol_dml.h<\/td><td>Files with sample changes that help to add a TR-181 data model in an existing component( including both DML and API files<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Overview This guide is intended to provide guidance for those who want to integrate their [&hellip;]<\/p>\n","protected":false},"author":659,"featured_media":0,"parent":207,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-10594","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Integration Guide for third-party applications into RDK-B stack - RDK Documentation Portal | Support<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integration Guide for third-party applications into RDK-B stack - RDK Documentation Portal | Support\" \/>\n<meta property=\"og:description\" content=\"Overview This guide is intended to provide guidance for those who want to integrate their [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Support\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-16T11:13:33+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"18 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/\",\"name\":\"Integration Guide for third-party applications into RDK-B stack - RDK Documentation Portal | Support\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/support\/#website\"},\"datePublished\":\"2026-02-16T11:13:16+00:00\",\"dateModified\":\"2026-02-16T11:13:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Support\",\"item\":\"https:\/\/developer.rdkcentral.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Articles\",\"item\":\"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Integration Guide for third-party applications into RDK-B stack\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/support\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/support\/\",\"name\":\"RDK Documentation Portal | Support\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Integration Guide for third-party applications into RDK-B stack - RDK Documentation Portal | Support","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/","og_locale":"en_US","og_type":"article","og_title":"Integration Guide for third-party applications into RDK-B stack - RDK Documentation Portal | Support","og_description":"Overview This guide is intended to provide guidance for those who want to integrate their [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/","og_site_name":"RDK Documentation Portal | Support","article_modified_time":"2026-02-16T11:13:33+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/","url":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/","name":"Integration Guide for third-party applications into RDK-B stack - RDK Documentation Portal | Support","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/support\/#website"},"datePublished":"2026-02-16T11:13:16+00:00","dateModified":"2026-02-16T11:13:33+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/integration-guide-for-third-party-applications-into-rdk-b-stack\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/support\/"},{"@type":"ListItem","position":2,"name":"Support","item":"https:\/\/developer.rdkcentral.com\/support\/"},{"@type":"ListItem","position":3,"name":"Articles","item":"https:\/\/developer.rdkcentral.com\/support\/support\/articles\/"},{"@type":"ListItem","position":4,"name":"Integration Guide for third-party applications into RDK-B stack"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/support\/#website","url":"https:\/\/developer.rdkcentral.com\/support\/","name":"RDK Documentation Portal | Support","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/pages\/10594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/users\/659"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/comments?post=10594"}],"version-history":[{"count":1,"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/pages\/10594\/revisions"}],"predecessor-version":[{"id":10595,"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/pages\/10594\/revisions\/10595"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/pages\/207"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/support\/wp-json\/wp\/v2\/media?parent=10594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}