Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Webconfig is a configuration management server from which RDK devices download configurations during bootup or when updates are available. The project is written in Go and has been open-sourced to the RDK community. You can find it here: https://github.com/rdkcentral/webconfig/blob/develop/README.md. The objective is to set up the Webconfig server using the open-sourced repository, so that it can be used by the RDK reference platform."

**Note - All tests mentioned in this page are done on RDK-B device ( Rpi4 )

How To Setup


  • GO version 1.17 and above 
  • Cassandra should be running
  • Java ( openjdk > 11.0 ) 


Code Block
~$ sudo wget https://golang.org/dl/go1.20.3.linux-amd64.tar.gz
~$ sudo tar -C /usr/local -xzf go1.20.3.linux-amd64.tar.gz
~$ ls /usr/local/go/bin/
go  gofmt
~# go version
go version go1.20.3 linux/amd64  


~# java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment (build 11.0.18+10-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
~#
~# echo "deb https://debian.cassandra.apache.org 41x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
deb https://debian.cassandra.apache.org 41x main
~#
~# curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
100  274k  100  274k    0     0   193k      0  0:00:01  0:00:01 --:--:--  193k
OK
~# sudo apt-get update
~# sudo apt-get install cassandra
~# ls /usr/sbin/cassandra
~# cassandra -v
4.1.1

:~# ps -ef | grep cassa
cassand+  222987       1  0 May04 ?        02:01:43 /usr/bin/java

Build And Run Application


Code Block
$ export WEBCONFIG_KEY=`head -c 32 /dev/random | base64`
$ mkdir -p /app/logs/webconfig
$ cd /go/src/github.com/rdkcentral/webconfig
$ make
$ bin/webconfig-linux-amd64 -f config/sample_webconfig.conf

** Note:  

After build, modify "config/sample_webconfig.conf" based on the server ip and port detail


Set Data to DB 


Code Block
curl -s -i "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/document/privatessid" -H 'Content-type: application/msgpack' --data-binary @privatessid.msgpack -X POST

curl -s -i "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/document/lan" -H 'Content-type: application/msgpack' --data-binary @lan.msgpack -X POST


Verify data in DB

Code Block
cqlsh:webconfig>  select * from xpc_group_config where cpe_mac='D83ADD0D178F';

 cpe_mac      | group_id    | error_code | error_details | expiry | params | payload                                                                                                                            | state | updated_time                    | version
--------------+-------------+------------+---------------+--------+--------+------------------------------------------------------------------------------------------------------------------------------------+-------+---------------------------------+-----------
 D83ADD0D178F |        moca |       null |          null |   null |   null |                                                                                                       0x81a6456e61626c65a474727565 |     2 | 2023-05-16 23:48:41.941000+0000 | 683076856
 D83ADD0D178F | privatessid |          0 |               |   null |   null | 0x8c105971de71bd30ae8a6d0fb10973174a97a0da0bd372b87f2342c132c554421de36916a06721d18cc1226d2a830b4af4297aa91611af89de4bf78b59859707 |     2 | 2023-05-16 23:48:24.845000+0000 | 563331257

(2 rows)
cqlsh:webconfig>


RDK Device downloads data

Code Block
~# curl -s "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/config"                                                                
--2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI
Content-type: application/msgpack
Etag: 683076856
Namespace: moca

▒▒Enable▒true
--2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI
Content-type: application/msgpack
Etag: 563331257
Namespace: privatessid

▒▒2.4▒rdkm_2.4▒5▒rdkm_5
--2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI--

RDK-B Device Sync


  • Make sure Webconfig service is running, otherwise restart service -  systemctl restart webconfig
  • Verify data is in DB by following "Set Data to DB" section. Below results are pulled for "lan" subdoc with below values

    Code Block
        "lan": {
            "DhcpServerEnable": True,
            "LanIPAddress": "10.0.0.1",
            "LanSubnetMask": "255.255.255.0",
            "DhcpStartIPAddress": "10.0.0.7",
            "DhcpEndIPAddress": "10.0.0.249",
            "LeaseTime": 3600
        }
    
    
  • Set below tr181 params ( change the MAC to DUT CM MAC )
Code Block
root@Docsis-Gateway:~# dmcli eRT getv Device.X_RDK_WebConfig.
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(webconfig): Device.X_RDK_WebConfig.
Execution succeed.
Parameter    1 name: Device.X_RDK_WebConfig.RfcEnable
               type:       bool,    value: true
Parameter    2 name: Device.X_RDK_WebConfig.URL
               type:     string,    value: http://webconfig.rdkcentral.com:9007/api/v1/device/e45f0156ff0e/config
  • Trigger Force Sync for root subdoc
Code Block
root@RaspberryPi-Gateway:~# dmcli eRT setv Device.X_RDK_WebConfig.ForceSync string root
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
setv from/to component(webconfig): Device.X_RDK_WebConfig.ForceSync
Execution succeed.
  • Webconfig client will receive the response from server and parse the data and send to corresponding component
Code Block
230524-20:50:50.019046 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: curl Ip resolve option set as default mode
230524-20:50:50.386953 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: g_ETAG updated for primary sync is 3515477887
230524-20:50:50.387148 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: webConfig curl response 0 http_code 200
230524-20:50:50.387228 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: curl response Time: 0.4 seconds
230524-20:50:50.387305 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: ct is multipart/mixed; boundary=2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI, content_res is 0
230524-20:50:50.387368 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Content-Type is multipart/mixed. Valid
230524-20:50:50.387823 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Size of the docs is :1
230524-20:50:50.387927 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: doc root is updated to version 3515477887 status pending error_details none error_code 0 trans_id 0 temp->retry_count 0
230524-20:50:50.388001 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Added 2 mp entries To tmp List
230524-20:50:50.388067 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: node is pointing to temp->name root temp->version 3515477887 temp->status pending temp->error_details none
230524-20:50:50.388131 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: node is pointing to temp->name lan temp->version 4270650766 temp->status pending_apply temp->error_details none
230524-20:50:50.388201 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: doc lan is updated to version 4270650766 status pending error_details none error_code 0 trans_id 0 temp->retry_count 0
230524-20:50:50.388866 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: subdoc_name: lan, version: 4270650766, transaction_id: 29118
230524-20:50:50.389014 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: doc lan is updated to version 4270650766 status pending error_details none error_code 0 trans_id 29118 temp->retry_count 0
230524-20:50:50.389082 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Request:> param[0].name = Device.DHCPv4.Server.Lan, type = 5
230524-20:50:50.393169 [mod=WEBCONFIG, lvl=INFO] [tid=27441] WEBCONFIG: Received msg lan,29118,4270650766,ACK,13 from topic webconfigSignal
230524-20:50:50.393263 [mod=WEBCONFIG, lvl=INFO] [tid=27441] WEBCONFIG: Received webconfig event signal Info 
  • At this point Ccsp component will receive data from webconfig client and apply the settings in subdoc
Code Block
230524-20:50:50.391013 [mod=PAM, lvl=WARN] [tid=1671] base64 decoded data contains 190 bytes
230524-20:50:50.391083 [mod=PAM, lvl=WARN] [tid=1671] Base64 decode Elapsed time : 0 ms
230524-20:50:50.391156 [mod=PAM, lvl=WARN] [tid=1671] MSGPACK_UNPACK_SUCCESS :2
230524-20:50:50.391239 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->entries_count is 1
230524-20:50:50.391303 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->subdoc_name is lan
230524-20:50:50.391367 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->version is 4270650766
230524-20:50:50.391431 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->transaction_id is 29118
230524-20:50:50.391494 [mod=PAM, lvl=WARN] [tid=1671] Lan configuration received
230524-20:50:50.391563 [mod=PAM, lvl=INFO] [tid=1671] PushBlobRequest : subdoc_name lan , txid 29118, version 4270650766 , entries 1
  • Verify subdoc settings are applied to tr81 data model by doing regular dmcli get command


RDK-B Device Reboot Sync


Code Block
root@RaspberryPi-Gateway:~# cat /rdklogs/logs/WEBCONFIGlog.txt.0 CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
setv from/to component(webconfig): Device.X_RDK_WebConfig.ForceSync
Execution succeed.

root@RaspberryPi-Gateway:~# 230518-19:59:56.595249 [mod=WEBCONFIG, lvl=INFO] [tid=5737] WEBCONFIG: Received poke request, proceed to parseForceSyncJson
230518-19:59:56.595416 [mod=WEBCONFIG, lvl=INFO] [tid=5737] WEBCONFIG: Force sync json parsed: [privatessid]
230518-19:59:56.595493 [mod=WEBCONFIG, lvl=INFO] [tid=5737] WEBCONFIG: Trigger force sync
230518-19:59:56.595644 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: ForceSyncDoc privatessid ForceSyncTransID.
230518-19:59:56.622941 WEBCONFIG: read file script is called
230518-19:59:56.631238 WEBCONFIG: CURL_RESPONSE path is /tmp/.cURLresponse
230518-19:59:56.634573 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Failed to read token from /etc/parodus/parodus_read_file.sh. Proceeding to create new token.
230518-19:59:56.670815 WEBCONFIG: No /nvram/certs/devicecert_1.pk12 using static cert
230518-19:59:56.680418 WEBCONFIG: No /usr/bin/GetConfigFile to fetch /tmp/.cfgStaticxpki
230518-19:59:56.689169 WEBCONFIG: Failure configuration file missing
230518-19:59:56.691845 [mod=WEBCONFIG, lvl=ERROR] [tid=5878] WEBCONFIG: Failed to create new token
230518-19:59:56.691963 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: reboot reason is unknown
230518-19:59:56.692087 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: versionsList is NONE-REBOOT
230518-19:59:56.692158 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: version_header formed IF-NONE-MATCH:NONE-REBOOT
230518-19:59:56.692225 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: schema_header formed Schema-Version: v1.0
230518-19:59:56.692289 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: supportedVersion fetched is NULL
230518-19:59:56.692352 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: supportedDocs_header formed X-System-Supported-Docs: 16777247,33554435,50331649,67108865,83886081,100663297,117440513,134217729,201326594,218103809,251658241
230518-19:59:56.692427 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: bootTime_header formed X-System-Boot-Time: 1684439782
230518-19:59:56.692494 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: FwVersion_header formed X-System-Firmware-Version: rdkb-generic-broadband-image_rdk-next_20230511162210
230518-19:59:56.692560 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: status_header formed X-System-Status: Operational
230518-19:59:56.692631 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: currentTime_header formed X-System-Current-Time: 1684439996
230518-19:59:56.692697 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: systemReadyTime_header formed X-System-Ready-Time: 1684439892
230518-19:59:56.692827 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: uuid_header formed Transaction-ID: 825e8635-2f91-4bcf-88d7-97c92b588e40
230518-19:59:56.692894 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: productClass_header formed X-System-Product-Class: XB3
230518-19:59:56.692963 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: ModelName_header formed X-System-Model-Name: RPI
230518-19:59:56.693028 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: The get_global_supplementarySync() is 0
230518-19:59:56.697086 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: docList is root
230518-19:59:56.697189 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Webconfig root ConfigURL is http://webconfig.rdkcentral.com:9007/api/v1/device/e45f0156ff0e/config?group_id=root
230518-19:59:56.697265 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: g_interface fetched is erouter0
230518-19:59:56.697343 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: curl Ip resolve option set as default mode
230518-19:59:57.023404 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: g_ETAG updated for primary sync is 1883965250
230518-19:59:57.023608 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: webConfig curl response 0 http_code 200
230518-19:59:57.023767 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: curl response Time: 0.3 seconds
230518-19:59:57.023847 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: ct is multipart/mixed; boundary=2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI, content_res is 0
230518-19:59:57.023912 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Content-Type is multipart/mixed. Valid
230518-19:59:57.024303 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Size of the docs is :1
230518-19:59:57.024415 [mod=WEBCONFIG, lvl=ERROR] [tid=5878] WEBCONFIG: Multipart list is empty
230518-19:59:57.024518 [mod=WEBCONFIG, lvl=INFO] [tid=5879] WEBCONFIG: dest is event:subdoc-report/privatessid/mac:e45f0156ff0e/status
230518-19:59:57.024638 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: The Maintenance Sync triggers at Fri 230519 02:01:29
230518-19:59:57.024728 [mod=WEBCONFIG, lvl=INFO] [tid=5879] WEBCONFIG: stringifiedNotifyPayload is {"device_id":"mac:e45f0156ff0e","namespace":"privatessid","application_status":"failed","error_code":311,"error_details":"multipart_cache_NULL","transaction_uuid":"unknown","version":"0"}
230518-19:59:57.024792 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: reset maintenanceSync to false
230518-19:59:57.025021 [mod=WEBCONFIG, lvl=INFO] [tid=5879] WEBCONFIG: Notification successfully sent to Webconfig.Upstream
[  216.048167] sh[9497]: device wlan0 is already a member of a bridge; can't enslave it to bridge brlan0.
[  216.074517] sh[9498]: interface wlan1 does not exist!
[  226.262396] sh[10157]: device wlan0 is already a member of a bridge; can't enslave it to bridge brlan0.
[  226.289465] sh[10158]: interface wlan1 does not exist!
[  236.478289] sh[10362]: device wlan0 is already a member of a bridge; can't enslave it to bridge brlan0.
[  236.503898] sh[10363]: interface wlan1 does not exist!
[  239.775543] audit: type=1701 audit(1684440023.027:82): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=10420 comm="irq0" exe="/home/root/irq0" sig=11 res=1
[  239.807159] audit: type=1701 audit(1684440023.057

RDK-B Supplementary Sync

  • Telemetry Profile

    Code Block
    root@RaspberryPi-Gateway:/rdklogs/logs# dmcli eRT setv Device.X_RDK_WebConfig.ForceSync string telemetry
    CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    setv from/to component(webconfig): Device.X_RDK_WebConfig.ForceSync
    Execution succeed.
    
    root@RaspberryPi-Gateway:/rdklogs/logs# 230530-15:35:37.547091 [mod=WEBCONFIG, lvl=INFO] [tid=29150] WEBCONFIG: Received poke request, proceed to parseForceSyncJson
    230530-15:35:37.547241 [mod=WEBCONFIG, lvl=INFO] [tid=29150] WEBCONFIG: Force sync json parsed: [telemetry]
    230530-15:35:37.547318 [mod=WEBCONFIG, lvl=INFO] [tid=29150] WEBCONFIG: Trigger force sync
    230530-15:35:37.547492 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: ForceSyncDoc telemetry ForceSyncTransID.
    230530-15:35:37.547574 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: Received supplementary poke request for telemetry
    230530-15:35:37.576459 WEBCONFIG: read file script is called
    230530-15:35:37.584323 WEBCONFIG: CURL_RESPONSE path is /tmp/.cURLresponse
    230530-15:35:37.586732 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: Failed to read token from /etc/parodus/parodus_read_file.sh. Proceeding to create new token.
    230530-15:35:37.619106 WEBCONFIG: No /nvram/certs/devicecert_1.pk12 using static cert
    230530-15:35:37.627332 WEBCONFIG: No /usr/bin/GetConfigFile to fetch /tmp/.cfgStaticxpki
    230530-15:35:37.635796 WEBCONFIG: Failure configuration file missing
    230530-15:35:37.638102 [mod=WEBCONFIG, lvl=ERROR] [tid=29151] WEBCONFIG: Failed to create new token
    230530-15:35:37.638201 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: schema_header formed Schema-Version: v1.0
    230530-15:35:37.638270 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: supportedVersion fetched is NULL
    230530-15:35:37.638335 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: supportedDocs_header formed X-System-Supported-Docs: 16777247,33554435,50331649,67108865,83886081,100663297,117440513,134217729,201326594,218103809,251658241
    230530-15:35:37.638465 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: supplementaryDocs_header formed X-System-SupplementaryService-Sync: telemetry
    230530-15:35:37.638532 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: bootTime_header formed X-System-Boot-Time: 1685460231
    230530-15:35:37.638596 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: FwVersion_header formed X-System-Firmware-Version: rdkb-generic-broadband-image_rdk-next_20230529134707
    230530-15:35:37.638661 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: status_header formed X-System-Status: Operational
    230530-15:35:37.638730 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: currentTime_header formed X-System-Current-Time: 1685460937
    230530-15:35:37.638793 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: systemReadyTime_header formed X-System-Ready-Time: 1685460892
    230530-15:35:37.638920 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: uuid_header formed Transaction-ID: 04cd2679-d137-4575-b05c-e7ab62712a10
    230530-15:35:37.638995 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: productClass_header formed X-System-Product-Class: XB3
    230530-15:35:37.639058 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: ModelName_header formed X-System-Model-Name: RPI
    230530-15:35:37.639122 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: telemetryVersion_header formed X-System-Telemetry-Profile-Version: 2.0
    230530-15:35:37.639185 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: PartnerID_header formed X-System-PartnerID: RDKM
    230530-15:35:37.641770 [mod=WEBCONFIG, lvl=ERROR] [tid=29151] WEBCONFIG: Failed to get AccountID
    230530-15:35:37.641862 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: DeviceWanMac_header formed X-System-Wan-Mac: e45f01fb134b
    230530-15:35:37.641929 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: The get_global_supplementarySync() is 1
    230530-15:35:37.645594 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: Webconfig root ConfigURL is http://webconfig.rdkcentral.com:9007/api/v1/device/e45f01fb134b/config
    230530-15:35:37.645691 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: g_interface fetched is erouter0
    230530-15:35:37.645758 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: curl Ip resolve option set as default mode
    230530-15:35:38.264791 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: webConfig curl response 0 http_code 200
    230530-15:35:38.264928 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: curl response Time: 0.6 seconds
    230530-15:35:38.265009 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: ct is multipart/mixed; boundary=2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI, content_res is 0
    230530-15:35:38.265075 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: Content-Type is multipart/mixed. Valid
    230530-15:35:38.265521 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: Size of the docs is :1
    230530-15:35:38.265635 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: Added 2 mp entries To tmp List
    230530-15:35:38.265705 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: node is pointing to temp->name root temp->version 0 temp->status pending temp->error_details none
    230530-15:35:38.265785 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: node is pointing to temp->name telemetry temp->version 2106546670 temp->status pending_apply temp->error_details none
    230530-15:35:38.265859 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: doc telemetry is updated to version 2106546670 status pending error_details none error_code 0 trans_id 0 temp->retry_count 0
    230530-15:35:38.266531 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: subdoc_name: telemetry, version: 2106546670, transaction_id: 42154
    230530-15:35:38.266685 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: doc telemetry is updated to version 2106546670 status pending error_details none error_code 0 trans_id 42154 temp->retry_count 0
    230530-15:35:38.266752 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: Request:> param[0].name = Device.X_RDKCENTRAL-COM_T2.ReportProfilesMsgPack, type = 5
    230530-15:35:38.269840 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: The ret status for rbus_setMulti is 0
    230530-15:35:38.270021 [mod=WEBCONFIG, lvl=INFO] [tid=29150] WEBCONFIG: Received msg telemetry,42154,2106546670,ACK,13 from topic webconfigSignal
    230530-15:35:38.270039 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: ccspRetStatus is 100
    230530-15:35:38.270125 [mod=WEBCONFIG, lvl=INFO] [tid=29150] WEBCONFIG: Received webconfig event signal Info telemetry,42154,2106546670,ACK,13
    230530-15:35:38.270209 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: setValues success. ccspStatus : 100
    230530-15:35:38.270375 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: TIMEOUT EVENT: telemetry,42154,2106546670,ACK,13 (doc apply need time)
    230530-15:35:38.270508 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: The Maintenance Sync triggers at Wed 230531 00:38:02
    230530-15:35:38.270623 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: doc apply need time, start timer.
    230530-15:35:38.270689 [mod=WEBCONFIG, lvl=INFO] [tid=29151] WEBCONFIG: reset maintenanceSync to false
    230530-15:35:38.270758 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: Timer list is empty
    230530-15:35:38.270901 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: new_node->subdoc_name telemetry new_node->txid 42154 new_node->timeout 13 status 1 added to list
    230530-15:35:38.270968 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: startWebcfgTimer success
    230530-15:35:38.271457 [mod=WEBCONFIG, lvl=INFO] [tid=29152] WEBCONFIG: dest is event:subdoc-report/telemetry/mac:e45f01fb134b/ack
    230530-15:35:38.271538 [mod=WEBCONFIG, lvl=INFO] [tid=29152] WEBCONFIG: stringifiedNotifyPayload is {"device_id":"mac:e45f01fb134b","namespace":"telemetry","application_status":"pending","timeout":13,"transaction_uuid":"04cd2679-d137-4575-b05c-e7ab62712a10","version":"2106546670"}
    230530-15:35:38.271739 [mod=WEBCONFIG, lvl=INFO] [tid=29152] WEBCONFIG: Notification successfully sent to Webconfig.Upstream
    230530-15:35:38.289294 [mod=WEBCONFIG, lvl=INFO] [tid=29150] WEBCONFIG: Received msg telemetry,42154,2106546670,ACK,0 from topic webconfigSignal
    230530-15:35:38.289389 [mod=WEBCONFIG, lvl=INFO] [tid=29150] WEBCONFIG: Received webconfig event signal Info telemetry,42154,2106546670,ACK,0
    230530-15:35:38.289577 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: ACK EVENT: telemetry,42154,2106546670,ACK,0 (doc apply success)
    230530-15:35:38.289648 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: doc apply success, proceed to add to DB
    230530-15:35:38.289721 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: doc telemetry is updated to version 2106546670 status success error_details none error_code 0 trans_id 42154 temp->retry_count 0
    230530-15:35:38.289803 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: No DB update for supplementary sync as version is not required to be stored.
    230530-15:35:38.289868 [mod=WEBCONFIG, lvl=INFO] [tid=29157] WEBCONFIG: Tmp list root doc delete is required
    230530-15:35:38.290018 [mod=WEBCONFIG, lvl=INFO] [tid=29152] WEBCONFIG: dest is event:subdoc-report/telemetry/mac:e45f01fb134b/status
    230530-15:35:38.290104 [mod=WEBCONFIG, lvl=INFO] [tid=29152] WEBCONFIG: stringifiedNotifyPayload is {"device_id":"mac:e45f01fb134b","namespace":"telemetry","application_status":"success","transaction_uuid":"04cd2679-d137-4575-b05c-e7ab62712a10","version":"2106546670"}
    230530-15:35:38.290307 [mod=WEBCONFIG, lvl=INFO] [tid=29152] WEBCONFIG: Notification successfully sent to Webconfig.Upstream
    230530-15:35:38.271332 [mod=T2, lvl=INFO] [tid=31718] FILE:../../../../../../../../../rdk/components/generic/telemetry/source/bulkdata/reportprofiles.c  FUNCTION:Process_Telemetry_WebConfigRequest    LINE:856
    230530-15:35:38.271480 [mod=T2, lvl=INFO] [tid=31718] FILE:../../../../../../../../../rdk/components/generic/telemetry/source/bulkdata/reportprofiles.c  FUNCTION:Process_Telemetry_WebConfigRequest    LINE:860 Execution in Handler, excuted
    230530-15:35:38.271649 [mod=T2, lvl=INFO] [tid=31718] Number of report profiles in current configuration is 1
    230530-15:35:38.271773 [mod=T2, lvl=INFO] [tid=31718] rbuscore.c:2287 RBus Enabled
    
    230530-15:35:38.271904 [mod=T2, lvl=INFO] [tid=31718] SAMPLE_RDKM is found
    230530-15:35:38.271990 [mod=T2, lvl=INFO] [tid=31718] rbuscore.c:2287 RBus Enabled
    
    230530-15:35:38.272085 [mod=T2, lvl=INFO] [tid=31718] No data elements present to unregister230530-15:35:38.272287 [mod=T2, lvl=INFO] [tid=31718] Profile SAMPLE_RDKM with de7c4719 hash already exist
    230530-15:35:38.272441 [mod=T2, lvl=INFO] [tid=31718] rbuscore.c:2287 RBus Enabled


Test Utility

** Note : Need Python 3.10.6

This utility binary will

  • generate the desired data for a specific subdoc and push it to server.
  • generated msgpack data will be pushed to the server which can be synced to RDK device using webconfig client.

View file
namecreate_webconfig_blo.pyc
height250


Steps to follow –

  • Copy the exe to a folder
  • Create a json file with subdoc data in the same folder where the exe is present.

Sample data:

Code Block
{

        "DhcpServerEnable": "True",

        "LanIPAddress": "10.0.0.1",

        "LanSubnetMask": "255.255.255.0",

        "DhcpStartIPAddress": "10.0.0.7",

        "DhcpEndIPAddress": "10.0.0.249",

        "LeaseTime": 3600

}


  • Run the exe with corresponding subdocType, Tr181 and MAC

Usage:

./create_webconfig_blob.pyc <subdoc.json> <subdoc_type> <tr181> < eCM MAC>"

Example :

./python3 create_webconfig_blob.pyc  lan.json "lan" "Device.DHCPv4.Server.Lan" "e45f0156ff0e"