Pre-requisite

  • Access to Raspberry Pi terminal.
  • Access to Xconf server from browser https://xconf.rdkcentral.com:19093/admin/ux/loginForm 
    • For Admin mode(read and writ permission) -> username : admin, password: RdkXcadm$2120
    • For User mode(only read mode) -> username: user, password: RdkXcusr@2210          

Admin UI: Common Configuration

  • Define Environments

           Flow:  Xconf-server -> Common -> Environments
           Click on Create Button.

           

         

           Click on Create, Enter the ID and Description fields, click on Save.
           ID : <Unique Identifier>  ; Description : <Description>

           


  • Define Models

          Flow: Xconf-server -> Common -> Models
          Click on Create, Enter the ID and Description fields, click on Save.

           

           


  • Define Mac List

          Flow: Xconf-server -> Common -> MAC Lists -> Create -> Add your Device MAC address -> Save.

         


  • Define IP List

          Flow: Xconf-server -> Common -> IP Lists -> Create-> Create -> Add your device IP address -> Save.

         

          

Feature Validation: LogUpload

  • In Raspberry Board, add the server details for log upload.
  • Configure the Bellow details to dcm.properties and comment out the other details .

            File :  /etc/dcm.properties

           LOG_SERVER=xconf.rdkcentral.com
           DCM_LOG_SERVER=https://xconf.rdkcentral.com/xconf/logupload.php
           DCM_LOG_SERVER_URL=https://xconf.rdkcentral.com:19092/loguploader/getSettings
           DCM_SCP_SERVER=xconf.rdkcentral.com
           HTTP_UPLOAD_LINK=https://xconf.rdkcentral.com/xconf/telemetry_upload.php
           DCA_UPLOAD_URL=xconf.rdkcentral.com

           DCM_HTTP_SERVER_URL=https://xconf.rdkcentral.com/xconf/telemetry_upload.php
           DCM_LA_SERVER_URL=https://xconf.rdkcentral.com/xconf/logupload.php


  • In Xconf UI Change Application to stb in top right corner of the window.

           


  • Defining the Upload repositories

          Flow: Xconf-server -> DCM -> Upload repository -> create ->save
          Name: <Unique Identifier>
          Description: <Unique Identifier>
          URL:  HTTPS: https://xconf.rdkcentral.com/xconf/logupload.php

         


  • Defining the formula

           Flow: Xconf-server -> DCM -> Formulas -> Create
           Name: <unique name for log upload>
           Description: <Short description for log upload>
           Percentage: 100
           Build condition:  estbMacAddress IS <MAC Address> OR estbIP IS <IP Address> 
                                    (or)  estbMacAddress IS <MAC Address>  AND model is <Model Name>   (Model name is already configured under Common Tab)

           


  • As soon as the formula is saved, then a ‘define Settings’ tab with ‘Create Device Settings’, ‘Create log settings’, Create VOD settings’ will be available.

         


  • Click on 'Create Device Settings' tab and edit the Device Settings.

           


  • Click on ‘Create Log Update setting’ and Edit the Log upload Setting (Create schedule & add the upload repository created beforehand).

           Name: Enter the name given during Log Upload Formula Creation.
           Note: The formula will be effective only if we select 'Are Settings Active' option to 'true' in 'Create Device Settings' and 'Log Upload settings'.

           


Verification at Xconf UI.

  • Test Page for Log Upload
    Flow: Xconf-Server -> DCM ->Test Page 
  • Parameters: give a parameter that will match the one of the formulas that you have created.
    • estbMacAddress < MAC Address> or
    • estbIP <IP Address>
    • model <Model Name>

     



          Log Upload: Client End Verification (In RPI)


  • Sample Output:

         

  • On successful Log upload, conf file will be created under /tmp directory. This file contains the details of log upload settings which are already configured in the server.
              File : /tmp/DCMSettings.conf

         


  • Verify the logs in /rdklogs/logs/dcmscript.log file
  • The log file contains the details of
    • Service status, tftp details, reboot flag , check on reboot flag ,
    • Upload settings details – location, protocol.
  • Shows list of files which are to be uploaded to the server as a tar file (logs will be zipped and creates a tar file on every bootup/service restart), Backup folder details (/rdklogs/logs/PreviousLogs_backup)
  • HTTP request processing status.   
  • Log files are stored in .tgz format and markers are stored in <mac_address>-TELE-<date>.json

         

  • Json response on server

         

  • Sample log

    root@RaspberryPi-Gateway:/rdklogs/logs# tail -f dcmscript.log &
    [1] 6839
    root@RaspberryPi-Gateway:/rdklogs/logs#  Starting execution of DCMscript.sh
    TFTP_SERVER: xconf.rdkcentral.com
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:01:54.887232 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-01AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    The Previous Logs folder is missing
    230411-07:01:55.237896 dca : Only Direct connection is available
    230411-07:01:55.259956 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    Build Type: dev Log file: 04-11-23-07-01AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:02:05.562055 dca: Direct connection success - ret:0
    230411-07:02:05.574482 dca: Json message successfully submitted.
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-ArmConsolelog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-BootTime.log
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-CRlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-Consolelog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-FirewallDebug.txt
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-LM.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-MnetDebug.txt
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-PAMlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-PARODUSlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-PSMlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-TDMlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-TR69log.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-WEBPAlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-WiFilog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-dcmscript.log
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-swupdate.log
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-02AM-version.txt
    04-11-23-07-02AM-ArmConsolelog.txt.0
    04-11-23-07-02AM-BootTime.log
    04-11-23-07-02AM-CRlog.txt.0
    04-11-23-07-02AM-Consolelog.txt.0
    04-11-23-07-02AM-FirewallDebug.txt
    04-11-23-07-02AM-LM.txt.0
    04-11-23-07-02AM-MnetDebug.txt
    04-11-23-07-02AM-PAMlog.txt.0
    04-11-23-07-02AM-PARODUSlog.txt.0
    04-11-23-07-02AM-PSMlog.txt.0
    04-11-23-07-02AM-TDMlog.txt.0
    04-11-23-07-02AM-TR69log.txt.0
    04-11-23-07-02AM-WEBPAlog.txt.0
    04-11-23-07-02AM-WiFilog.txt.0
    04-11-23-07-02AM-dcmscript.log
    04-11-23-07-02AM-swupdate.log
    04-11-23-07-02AM-version.txt
    Uploading logs 04-11-23-07-01AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    tar: 04-11-23-07-01AM.tgz: file is the archive; skipping
    04-11-23-07-02AM-ArmConsolelog.txt.0
    04-11-23-07-02AM-BootTime.log
    04-11-23-07-02AM-CRlog.txt.0
    04-11-23-07-02AM-Consolelog.txt.0
    04-11-23-07-02AM-FirewallDebug.txt
    04-11-23-07-02AM-LM.txt.0
    04-11-23-07-02AM-MnetDebug.txt
    04-11-23-07-02AM-PAMlog.txt.0
    04-11-23-07-02AM-PARODUSlog.txt.0
    04-11-23-07-02AM-PSMlog.txt.0
    04-11-23-07-02AM-TDMlog.txt.0
    04-11-23-07-02AM-TR69log.txt.0
    04-11-23-07-02AM-WEBPAlog.txt.0
    04-11-23-07-02AM-WiFilog.txt.0
    04-11-23-07-02AM-dcmscript.log
    04-11-23-07-02AM-swupdate.log
    04-11-23-07-02AM-version.txt
    Uploading logs 04-11-23-07-01AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder
    Moving to Previous Logs Backup Folder
    tail: dcmscript.log: file truncated
    Uploading Logs with DCM UploadOnReboot set to true
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:05:11.424110 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-05AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    230411-07:05:11.667428 dca : Only Direct connection is available
    230411-07:05:11.685759 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:05:22.145133 dca: Direct connection success - ret:0
    230411-07:05:22.154718 dca: Json message successfully submitted.
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-ArmConsolelog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-BootTime.log
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-CRlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-Consolelog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-FirewallDebug.txt
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-LM.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-MnetDebug.txt
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-PAMlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-PARODUSlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-PSMlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-TDMlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-TR69log.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-WEBPAlog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-WiFilog.txt.0
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-dcmscript.log
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-swupdate.log
    /lib/rdk/uploadSTBLogs.sh: line 167: /bin/timestamp: No such file or directory
     Processing file...04-11-23-07-05AM-version.txt
    04-11-23-07-05AM-ArmConsolelog.txt.0
    04-11-23-07-05AM-BootTime.log
    04-11-23-07-05AM-CRlog.txt.0
    04-11-23-07-05AM-Consolelog.txt.0
    04-11-23-07-05AM-FirewallDebug.txt
    04-11-23-07-05AM-LM.txt.0
    04-11-23-07-05AM-MnetDebug.txt
    04-11-23-07-05AM-PAMlog.txt.0
    04-11-23-07-05AM-PARODUSlog.txt.0
    04-11-23-07-05AM-PSMlog.txt.0
    04-11-23-07-05AM-TDMlog.txt.0
    04-11-23-07-05AM-TR69log.txt.0
    04-11-23-07-05AM-WEBPAlog.txt.0
    04-11-23-07-05AM-WiFilog.txt.0
    04-11-23-07-05AM-dcmscript.log
    04-11-23-07-05AM-swupdate.log
    04-11-23-07-05AM-version.txt
    Uploading logs 04-11-23-07-04AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    04-11-23-07-04AM.tgz
    04-11-23-07-05AM-ArmConsolelog.txt.0
    04-11-23-07-05AM-BootTime.log
    04-11-23-07-05AM-CRlog.txt.0
    04-11-23-07-05AM-Consolelog.txt.0
    04-11-23-07-05AM-FirewallDebug.txt
    04-11-23-07-05AM-LM.txt.0
    04-11-23-07-05AM-MnetDebug.txt
    04-11-23-07-05AM-PAMlog.txt.0
    04-11-23-07-05AM-PARODUSlog.txt.0
    04-11-23-07-05AM-PSMlog.txt.0
    04-11-23-07-05AM-TDMlog.txt.0
    04-11-23-07-05AM-TR69log.txt.0
    04-11-23-07-05AM-WEBPAlog.txt.0
    04-11-23-07-05AM-WiFilog.txt.0
    04-11-23-07-05AM-dcmscript.log
    04-11-23-07-05AM-swupdate.log
    04-11-23-07-05AM-version.txt
    Uploading logs 04-11-23-07-05AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder
    Moving to Previous Logs Backup Folder
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:10:11.594295 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-10AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    230411-07:10:11.968455 dca : Only Direct connection is available
    230411-07:10:11.997319 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:10:22.212030 dca: Direct connection success - ret:0
    230411-07:10:22.222547 dca: Json message successfully submitted.
    04-11-23-07-10AM-ArmConsolelog.txt.0
    04-11-23-07-10AM-BootTime.log
    04-11-23-07-10AM-CRlog.txt.0
    04-11-23-07-10AM-Consolelog.txt.0
    04-11-23-07-10AM-FirewallDebug.txt
    04-11-23-07-10AM-LM.txt.0
    04-11-23-07-10AM-MnetDebug.txt
    04-11-23-07-10AM-PAMlog.txt.0
    04-11-23-07-10AM-PARODUSlog.txt.0
    04-11-23-07-10AM-PSMlog.txt.0
    04-11-23-07-10AM-TDMlog.txt.0
    04-11-23-07-10AM-TR69log.txt.0
    04-11-23-07-10AM-WEBPAlog.txt.0
    04-11-23-07-10AM-WiFilog.txt.0
    04-11-23-07-10AM-dcmscript.log
    04-11-23-07-10AM-swupdate.log
    04-11-23-07-10AM-version.txt
    Uploading logs 04-11-23-07-10AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:15:11.910473 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-15AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    230411-07:15:12.207803 dca : Only Direct connection is available
    230411-07:15:12.235454 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:15:22.507326 dca: Direct connection success - ret:0
    230411-07:15:22.516624 dca: Json message successfully submitted.
    04-11-23-07-15AM-ArmConsolelog.txt.0
    04-11-23-07-15AM-BootTime.log
    04-11-23-07-15AM-CRlog.txt.0
    04-11-23-07-15AM-Consolelog.txt.0
    04-11-23-07-15AM-FirewallDebug.txt
    04-11-23-07-15AM-LM.txt.0
    04-11-23-07-15AM-MnetDebug.txt
    04-11-23-07-15AM-PAMlog.txt.0
    04-11-23-07-15AM-PARODUSlog.txt.0
    04-11-23-07-15AM-PSMlog.txt.0
    04-11-23-07-15AM-TDMlog.txt.0
    04-11-23-07-15AM-TR69log.txt.0
    04-11-23-07-15AM-WEBPAlog.txt.0
    04-11-23-07-15AM-WiFilog.txt.0
    04-11-23-07-15AM-dcmscript.log
    04-11-23-07-15AM-swupdate.log
    04-11-23-07-15AM-version.txt
    04-11-23-07-15AM-wifihealth.txt
    Uploading logs 04-11-23-07-15AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:20:11.916415 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-20AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    230411-07:20:12.155150 dca : Only Direct connection is available
    230411-07:20:12.173850 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:20:22.367094 dca: Direct connection success - ret:0
    230411-07:20:22.375902 dca: Json message successfully submitted.
    04-11-23-07-20AM-ArmConsolelog.txt.0
    04-11-23-07-20AM-BootTime.log
    04-11-23-07-20AM-CRlog.txt.0
    04-11-23-07-20AM-Consolelog.txt.0
    04-11-23-07-20AM-FirewallDebug.txt
    04-11-23-07-20AM-LM.txt.0
    04-11-23-07-20AM-MnetDebug.txt
    04-11-23-07-20AM-PAMlog.txt.0
    04-11-23-07-20AM-PARODUSlog.txt.0
    04-11-23-07-20AM-PSMlog.txt.0
    04-11-23-07-20AM-TDMlog.txt.0
    04-11-23-07-20AM-TR69log.txt.0
    04-11-23-07-20AM-WEBPAlog.txt.0
    04-11-23-07-20AM-WiFilog.txt.0
    04-11-23-07-20AM-dcmscript.log
    04-11-23-07-20AM-swupdate.log
    04-11-23-07-20AM-version.txt
    04-11-23-07-20AM-wifihealth.txt
    Uploading logs 04-11-23-07-20AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:25:16.689426 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-25AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    230411-07:25:16.919765 dca : Only Direct connection is available
    230411-07:25:16.938127 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:25:27.298600 dca: Direct connection success - ret:0
    230411-07:25:27.307538 dca: Json message successfully submitted.
    04-11-23-07-25AM-ArmConsolelog.txt.0
    04-11-23-07-25AM-BootTime.log
    04-11-23-07-25AM-CRlog.txt.0
    04-11-23-07-25AM-Consolelog.txt.0
    04-11-23-07-25AM-FirewallDebug.txt
    04-11-23-07-25AM-LM.txt.0
    04-11-23-07-25AM-MnetDebug.txt
    04-11-23-07-25AM-PAMlog.txt.0
    04-11-23-07-25AM-PARODUSlog.txt.0
    04-11-23-07-25AM-PSMlog.txt.0
    04-11-23-07-25AM-TDMlog.txt.0
    04-11-23-07-25AM-TR69log.txt.0
    04-11-23-07-25AM-WEBPAlog.txt.0
    04-11-23-07-25AM-WiFilog.txt.0
    04-11-23-07-25AM-dcmscript.log
    04-11-23-07-25AM-swupdate.log
    04-11-23-07-25AM-version.txt
    04-11-23-07-25AM-wifihealth.txt
    Uploading logs 04-11-23-07-25AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:30:11.690231 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-30AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    230411-07:30:11.924824 dca : Only Direct connection is available
    230411-07:30:11.943922 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:30:22.136394 dca: Direct connection success - ret:0
    230411-07:30:22.145563 dca: Json message successfully submitted.
    04-11-23-07-30AM-ArmConsolelog.txt.0
    04-11-23-07-30AM-BootTime.log
    04-11-23-07-30AM-CRlog.txt.0
    04-11-23-07-30AM-Consolelog.txt.0
    04-11-23-07-30AM-FirewallDebug.txt
    04-11-23-07-30AM-LM.txt.0
    04-11-23-07-30AM-MnetDebug.txt
    04-11-23-07-30AM-PAMlog.txt.0
    04-11-23-07-30AM-PARODUSlog.txt.0
    04-11-23-07-30AM-PSMlog.txt.0
    04-11-23-07-30AM-TDMlog.txt.0
    04-11-23-07-30AM-TR69log.txt.0
    04-11-23-07-30AM-WEBPAlog.txt.0
    04-11-23-07-30AM-WiFilog.txt.0
    04-11-23-07-30AM-dcmscript.log
    04-11-23-07-30AM-swupdate.log
    04-11-23-07-30AM-version.txt
    04-11-23-07-30AM-wifihealth.txt
    Uploading logs 04-11-23-07-30AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder
    Telemetry Profile File Being Used : /tmp/DCMSettings.conf
    230411-07:35:13.203201 dca upload url from dcmresponse is https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    Build Type: dev Log file: 04-11-23-07-35AM.tgz TFTP Server: https://xconf.rdkcentral.com/xconf/logupload.php Protocol: 0 UploadHttpLink: 0
    230411-07:35:13.427803 dca : Only Direct connection is available
    230411-07:35:13.446079 dca: Sleeping for 9 before upload.
    Uploading Logs with DCM UploadOnReboot set to true
    230411-07:35:24.082882 dca: Direct connection success - ret:0
    230411-07:35:24.092352 dca: Json message successfully submitted.
    04-11-23-07-35AM-ArmConsolelog.txt.0
    04-11-23-07-35AM-BootTime.log
    04-11-23-07-35AM-CRlog.txt.0
    04-11-23-07-35AM-Consolelog.txt.0
    04-11-23-07-35AM-FirewallDebug.txt
    04-11-23-07-35AM-LM.txt.0
    04-11-23-07-35AM-MnetDebug.txt
    04-11-23-07-35AM-PAMlog.txt.0
    04-11-23-07-35AM-PARODUSlog.txt.0
    04-11-23-07-35AM-PSMlog.txt.0
    04-11-23-07-35AM-TDMlog.txt.0
    04-11-23-07-35AM-TR69log.txt.0
    04-11-23-07-35AM-WEBPAlog.txt.0
    04-11-23-07-35AM-WiFilog.txt.0
    04-11-23-07-35AM-dcmscript.log
    04-11-23-07-35AM-swupdate.log
    04-11-23-07-35AM-version.txt
    04-11-23-07-35AM-wifihealth.txt
    Uploading logs 04-11-23-07-35AM.tgz  onto https://xconf.rdkcentral.com/xconf/logupload.php
    Moving to Previous Logs Backup Folder

         Attaching sample file :  B8_27_EB_22_16_36-Logs-11-10-21-07-00AM.tgz


Feature Validation: Telemetry

  • Telemetry configuration can be done by adding a permanent profile which contains below objects
    • Upload repository
    • Profile options (Header, content, frequency etc.)
  • Creating a targeting rule which is basically mapping the profile to a set of MAC/IP/Device etc
  • Note: DCM settings should be already done for the devices that you are going to set telemetry configuration.


  • Create a new Telemetry Profile.
    Flow: X-conf-server -> Telemetry -> Permanent Profiles -> Create button

           


  • The permanent profile must have the below entries
    • Name of the RPI device profile
    • Upload Repository (HTTP/TFTP, HTTPS)(HTTPS:https://xconf.rdkcentral.com/xconf/telemetry_upload.php)
    • Telemetry profile Entries(We can add multiple telemetry profiles using “+” button.
    • In the Telemetry Permanent Profile page, there will be a 5th column that allows a component name to be entered. The component name is optional and may be present for only some of the entries in the Telemetry profile.

         


  • Once you save the permanent profile, you will get a message overlay ‘Profile added to the pending changes’. Then go to Changes -> select the profile you create -> Click on “Approve selected changes”.

           


           


  • Then the permanent profile will be listed under Telemetry - > Permanent profiles.
  • Creating targeting rules for RPI
    • Flow: X-conf-server -> Telemetry -> Targeting rules -> Create
    • Name : Name of the Targeting Rule
    • Rule : ex : estbMacAddress IS <MAC Address>
    • Bound Profile : Choose the Permanent Profile

           

  • Verification of telemetry test page.
    After creating the permanent profile and targeting rules, go to Telemetry->Test page and give a parameter that will match the one of the rules that you have created. Then matched rule will be displayed like below.

           


         Sample Output

         


  • Server configuration that we set in Xconf server is copied to /tmp/DCMSettings.conf file.

           


  • Logs and Telemetry markers are uploaded via HTTPS to the xconf server https://xconf.rdkcentral.com/xconf/upload/ (To view the page : https://xconf.rdkcentral.com/xconf/upload/display.php)
  • Log files are stored in .tgz format and markers are stored in <mac_address>-TELE-<date>.json
  • Sample Log is as below

    opensource platforms----------------------------
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-06:59:32.843185 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-06:59:42.866790 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-06:59:52.890779 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:00:02.914375 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:00:12.937990 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:00:22.961802 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:00:32.986518 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:00:43.011579 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:00:53.035361 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:01:03.059069 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:01:13.083146 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:01:23.107606 waiting for previous log done file
    TELEMETRY_PREVIOUS_LOG_COMPLETE--------------/tmp/.telemetry_previous_log_done
    230411-07:01:33.131361 waiting for previous log done file
    230411-07:01:43.146667 Max wait for previous log done file reached. Proceeding with new config from xconf
    before calling dca_utility  start of TELEMETRY LOGIC-----------------
    inside dca_utility script with 1 as value for arguments
    No dca-utility pid -------
    230411-07:01:43.329827 First dca execution after bootup. Clearing all markers.
    230411-07:01:43.360777 Telemetry Folder does not exist . Creating now
    230411-07:01:43.383522 dca: Trigger type is :1
    triggertype------------1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1890    0  1890    0     0   1231      0 --:--:--  0:00:01 --:--:--  1230
    sleep for :------------------
    770
    calling processJsonResponse--------
    after calling processJsonResponse-----------
    after calling clearTelemetryConfig-----------
    after calling generateTelemetryConfig--------
    schedulecronjob!!
    after calling scheduleCron-------------------
    dcaoutputjson----!!!!!!!!!!!!----{"searchResult":[{"Firewall":"9"},{"<remaining_keys>":"<remaining_values>"}]}
    230411-07:01:52.295101 getAccountId() called from: /lib/rdk/dca_utility.sh -  partner_id retrieved from syscfg.db : RDKM
    230411-07:01:52.423759 getAccountId() called from: /lib/rdk/dca_utility.sh -  account_id is not available from syscfg.db or tr181 param, defaulting to Unknown...
    outputjson---------------{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"<#=#>EROUTER_IPV6<#=#>"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:01:52"}
    outputjson1---------------{"searchResult":[{"Firewall":"9"},{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"<#=#>EROUTER_IPV6<#=#>"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:01:52"}]}
    TELEMETRY_JSON_RESPONSE file is -----------/nvram/rtl_json.txt
    number of proUPdel:90
    Upload protocol is:HTTPS
    HTTPURL:https://xconf.rdkcentral.com/xconf/logupload.php
    ifconfig: eth0: error fetching interface information: Device not found
    ifconfig: eth0: error fetching interface information: Device not found
    =============Telemetry has file only one upload=======================
    call uploadLogOnReboot
    Sleeping for seven minutes
    ifconfig: eth0: error fetching interface information: Device not found
    grep: /etc/syslog.conf: No such file or directory
    grep: /etc/syslog.conf: No such file or directory
    call uploadLogOnReboot
    Sleeping for seven minutes
    230411-07:02:04.286149 dca: Using Direct commnication
    number of proUPdel1:90
    Upload protocol telemetry is:HTTPS
    before HTTP upload
    number of httpdeli:90
    HTTPTELEMETRYURL:https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    ------CURL_CMD:curl --tlsv1.2 -w '%{http_code}\n' -H "Accept: application/json" -H "Content-type: application/json" -X POST -d @/nvram/rtl_json.txt 'https://xconf.rdkcentral.com/xconf/telemetry_upload.php' --connect-timeout 30 -m 30
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   299    0     0  100   299      0    263  0:00:01  0:00:01 --:--:--   263
    http code in telemetry is :200
    HTTP telemetry curl upload succeded!!!!!!!!!!!!!!!!!
    Done sleeping prev logpath /rdklogs/logs//PreviousLogs
    ckp100-------------prev log path-------------/rdklogs/logs//PreviousLogs
    rm: cannot remove `04-11-23-07-01AM.tgz': No such file or directory
    ckp101---------------------upload log-----true
    total 563
    drwxr-xr-x 2 root root   1024 Apr 11 07:02 .
    drwxr-xr-x 4 root root   3072 Apr 11 07:01 ..
    -rw-r--r-- 1 root root   9240 Apr 11 07:02 04-11-23-07-02AM-ArmConsolelog.txt.0
    -rw-r--r-- 1 root root    529 Apr 11 07:01 04-11-23-07-02AM-BootTime.log
    -rw-r--r-- 1 root root  13541 Apr 11 07:02 04-11-23-07-02AM-CRlog.txt.0
    -rw-r--r-- 1 root root  63697 Apr 11 07:02 04-11-23-07-02AM-Consolelog.txt.0
    -rw-r--r-- 1 root root  85613 Apr 11 07:01 04-11-23-07-02AM-FirewallDebug.txt
    -rw-r--r-- 1 root root   2659 Apr 11 07:02 04-11-23-07-02AM-LM.txt.0
    -rw-r--r-- 1 root root  17456 Apr 11 07:01 04-11-23-07-02AM-MnetDebug.txt
    -rw-r--r-- 1 root root  89703 Apr 11 07:02 04-11-23-07-02AM-PAMlog.txt.0
    -rw-r--r-- 1 root root   7557 Apr 11 07:02 04-11-23-07-02AM-PARODUSlog.txt.0
    -rw-r--r-- 1 root root 152586 Apr 11 07:02 04-11-23-07-02AM-PSMlog.txt.0
    -rw-r--r-- 1 root root   2967 Apr 11 07:02 04-11-23-07-02AM-TDMlog.txt.0
    -rw-r--r-- 1 root root  10988 Apr 11 07:02 04-11-23-07-02AM-TR69log.txt.0
    -rw-r--r-- 1 root root  67106 Apr 11 07:02 04-11-23-07-02AM-WEBPAlog.txt.0
    -rw-r--r-- 1 root root  36328 Apr 11 07:02 04-11-23-07-02AM-WiFilog.txt.0
    -rw-r--r-- 1 root root    730 Apr 11 07:01 04-11-23-07-02AM-dcmscript.log
    -rw-r--r-- 1 root root   1094 Apr 11 07:01 04-11-23-07-02AM-swupdate.log
    -rw-r--r-- 1 root root    203 Apr 11 07:02 04-11-23-07-02AM-version.txt
    Done sleeping prev logpath /rdklogs/logs//PreviousLogs
    ckp100-------------prev log path-------------/rdklogs/logs//PreviousLogs
    rm: cannot remove `04-11-23-07-01AM.tgz': No such file or directory
    ckp101---------------------upload log-----true
    total 563
    drwxr-xr-x 2 root root   1024 Apr 11 07:02 .
    drwxr-xr-x 4 root root   3072 Apr 11 07:01 ..
    -rw-r--r-- 1 root root   9240 Apr 11 07:02 04-11-23-07-02AM-ArmConsolelog.txt.0
    -rw-r--r-- 1 root root    529 Apr 11 07:01 04-11-23-07-02AM-BootTime.log
    -rw-r--r-- 1 root root  13541 Apr 11 07:02 04-11-23-07-02AM-CRlog.txt.0
    -rw-r--r-- 1 root root  63697 Apr 11 07:02 04-11-23-07-02AM-Consolelog.txt.0
    -rw-r--r-- 1 root root  85613 Apr 11 07:01 04-11-23-07-02AM-FirewallDebug.txt
    -rw-r--r-- 1 root root   2659 Apr 11 07:02 04-11-23-07-02AM-LM.txt.0
    -rw-r--r-- 1 root root  17456 Apr 11 07:01 04-11-23-07-02AM-MnetDebug.txt
    -rw-r--r-- 1 root root  89703 Apr 11 07:02 04-11-23-07-02AM-PAMlog.txt.0
    -rw-r--r-- 1 root root   7557 Apr 11 07:02 04-11-23-07-02AM-PARODUSlog.txt.0
    -rw-r--r-- 1 root root 152586 Apr 11 07:02 04-11-23-07-02AM-PSMlog.txt.0
    -rw-r--r-- 1 root root   2967 Apr 11 07:02 04-11-23-07-02AM-TDMlog.txt.0
    -rw-r--r-- 1 root root  10988 Apr 11 07:02 04-11-23-07-02AM-TR69log.txt.0
    -rw-r--r-- 1 root root  67106 Apr 11 07:02 04-11-23-07-02AM-WEBPAlog.txt.0
    -rw-r--r-- 1 root root  36328 Apr 11 07:02 04-11-23-07-02AM-WiFilog.txt.0
    -rw-r--r-- 1 root root    730 Apr 11 07:01 04-11-23-07-02AM-dcmscript.log
    -rw-r--r-- 1 root root   1094 Apr 11 07:01 04-11-23-07-02AM-swupdate.log
    -rw-r--r-- 1 root root    203 Apr 11 07:02 04-11-23-07-02AM-version.txt
    ckp101--------------------------
    ckp101--------------------------
    Image Upgrade During Bootup ..!
    Main APP of devinitFWDNLD---
    2023-04-11 07:03:31 version = rdkb-generic-broadband-image_rdk-next_20230405075111
    2023-04-11 07:03:31 buildtype = dev
    Mac in jsonstr:E4:5F:01:FB:13:4B&model=RPI&capabilities=RCDL&capabilities=supportsFullHttpUrl
    2023-04-11 07:03:31 JSONSTR: E4:5F:01:FB:13:4B&model=RPI&capabilities=RCDL&capabilities=supportsFullHttpUrl
    Trying to communicate with XCONF server
    URL_CMD: curl -w %{http_code} 'https://xconf.rdkcentral.com:19092/xconf/swu/stb?eStbMac=E4:5F:01:FB:13:4B&model=RPI&capabilities=RCDL&capabilities=supportsFullHttpUrl' -o /rdklogs/logs/response.txt >> /rdklogs/logs/xconf_curl_httpcode
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   529    0   529    0     0    344      0 --:--:--  0:00:01 --:--:--   344
    CKP: error from cloud exiting,check in upcoming reboot-------------
    number of proUPdel2:90
    Upload protocol logupload is:HTTPS
    before HTTP log upload
    HTTPLOGUPLOADURL:https://xconf.rdkcentral.com/xconf/logupload.php
    upload log file is:04-11-23-07-01AM.tgz
    ------CURL_CMD2:curl -w '%{http_code}\n' -F filename=@/rdklogs/logs//PreviousLogs/E4:5F:01:FB:13:4B-Logs-04-11-23-07-01AM.tgz 'https://xconf.rdkcentral.com/xconf/logupload.php' --connect-timeout 100 -m 100
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 65042  100    30  100 65012     15  33719  0:00:02  0:00:01  0:00:01 33735
    http_code is :200
    HTTP log upload succeded!!!!!!!!!!!!!!!!!
    number of proUPdel2:90
    Upload protocol logupload is:HTTPS
    before HTTP log upload
    HTTPLOGUPLOADURL:https://xconf.rdkcentral.com/xconf/logupload.php
    upload log file is:04-11-23-07-01AM.tgz
    ------CURL_CMD2:curl -w '%{http_code}\n' -F filename=@/rdklogs/logs//PreviousLogs/E4:5F:01:FB:13:4B-Logs-04-11-23-07-01AM.tgz 'https://xconf.rdkcentral.com/xconf/logupload.php' --connect-timeout 100 -m 100
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 65042  100    30  100 65012     16  36198  0:00:01  0:00:01 --:--:-- 36214
    http_code is :200
    HTTP log upload succeded!!!!!!!!!!!!!!!!!
    230411-07:04:32.736994 Log size max reached
    230411-07:04:32.821587 UPLOAD_LOGS val is false
    230411-07:04:32.829339 Log upload is disabled. Removing indicator in regular upload
    /rdklogger/rdkbLogMonitor.sh: line 884: cd: /tmp/logs/: No such file or directory
    /rdklogger/rdkbLogMonitor.sh: line 894: cd: OLDPWD not set
    230411-07:04:32.932390 Get all parameters to create sysDescr...
    230411-07:04:33.351295 RDKB_SYSDESCR :  Raspberry Pi 3 device  HW_REV: b03115; VENDOR:  Raspberry Pi Foundation ; BOOTR: BootloaderVersion; SW_REV: NotSupported_rdkb-generic-broadband-image_rdk-next_20230405075111; MODEL: RPI
    230411-07:04:33.359898 sync logs to nvram2
    tail: error reading `/rdklogs/logs/PreviousLogs': Is a directory
    tail: error reading `/rdklogs/logs/PreviousLogs_backup': Is a directory
    cat: /sys/class/net/eth0/address: No such file or directory
    230411-07:04:37.763248 [DEBUG] ++IN function backupnvram2logs
    230411-07:04:37.786904 [DEBUG] /rdklogger/rdkbLogMonitor.sh Notify telemetry to execute now before log upload !!!
    inside dca_utility script with 1 as value for arguments
    No dca-utility pid -------
    cp: cannot stat `/nvram/.telemetry/rtl_*': No such file or directory
    230411-07:04:37.947660 dca: Trigger type is :2
    triggertype------------2
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1890    0  1890    0     0   1279      0 --:--:--  0:00:01 --:--:--  1280
    Done Uploading Logs and removing rtl_json.txt file
    sleep for :------------------
    dcaoutputjson----!!!!!!!!!!!!----{"searchResult":[{"<remaining_keys>":"<remaining_values>"}]}
    230411-07:04:44.693759 getAccountId() called from: /lib/rdk/dca_utility.sh -  partner_id retrieved from syscfg.db : RDKM
    230411-07:04:44.814488 getAccountId() called from: /lib/rdk/dca_utility.sh -  account_id is not available from syscfg.db or tr181 param, defaulting to Unknown...
    outputjson---------------{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"null"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:04:44"}
    outputjson1---------------{"searchResult":[{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"null"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:04:44"}]}
    Done Uploading Logs and removing rtl_json.txt file
    mv: cannot stat `*': No such file or directory
    TELEMETRY_JSON_RESPONSE file is -----------/nvram/rtl_json.txt
    tail: Consolelog.txt.0: file truncated
    call uploadLogOnReboot
    Sleeping for seven minutes
    No dca-utility pid -------
    230411-07:05:00.716689 Telemetry Folder does not exist . Creating now
    230411-07:05:00.737089 dca: Trigger type is :1
    triggertype------------1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Done sleeping prev logpath /rdklogs/logs//PreviousLogs
    ckp100-------------prev log path-------------/rdklogs/logs//PreviousLogs
    rm: cannot remove `04-11-23-07-04AM.tgz': No such file or directory
    100  1890    0  1890    0     0ckp101---------------------upload log-----true0
       1323      0 --:--:--  0:00:01 --:--:--  1323
    total 574
    drwxr-xr-x 2 root root   1024 Apr 11 07:05 .
    drwxr-xr-x 4 root root   3072 Apr 11 07:04 ..
    -rw-r--r-- 1 root root   9240 Apr 11 07:04 04-11-23-07-05AM-ArmConsolelog.txt.0
    -rw-r--r-- 1 root root    529 Apr 11 07:04 04-11-23-07-05AM-BootTime.log
    -rw-r--r-- 1 root root      0 Apr 11 07:04 04-11-23-07-05AM-CRlog.txt.0
    -rw-r--r-- 1 root root  74166 Apr 11 07:04 04-11-23-07-05AM-Consolelog.txt.0
    -rw-r--r-- 1 root root  85613 Apr 11 07:04 04-11-23-07-05AM-FirewallDebug.txt
    -rw-r--r-- 1 root root      0 Apr 11 07:04 04-11-23-07-05AM-LM.txt.0
    -rw-r--r-- 1 root root  17456 Apr 11 07:04 04-11-23-07-05AM-MnetDebug.txt
    -rw-r--r-- 1 root root  89703 Apr 11 07:04 04-11-23-07-05AM-PAMlog.txt.0
    -rw-r--r-- 1 root root   9681 Apr 11 07:04 04-11-23-07-05AM-PARODUSlog.txt.0
    -rw-r--r-- 1 root root 152586 Apr 11 07:04 04-11-23-07-05AM-PSMlog.txt.0
    -rw-r--r-- 1 root root   2967 Apr 11 07:04 04-11-23-07-05AM-TDMlog.txt.0
    -rw-r--r-- 1 root root  10988 Apr 11 07:04 04-11-23-07-05AM-TR69log.txt.0
    -rw-r--r-- 1 root root  71226 Apr 11 07:04 04-11-23-07-05AM-WEBPAlog.txt.0
    -rw-r--r-- 1 root root  44372 Apr 11 07:04 04-11-23-07-05AM-WiFilog.txt.0
    -rw-r--r-- 1 root root   4932 Apr 11 07:04 04-11-23-07-05AM-dcmscript.log
    -rw-r--r-- 1 root root   1555 Apr 11 07:04 04-11-23-07-05AM-swupdate.log
    -rw-r--r-- 1 root root    203 Apr 11 07:04 04-11-23-07-05AM-version.txt
    sleep for :------------------
    770
    calling processJsonResponse--------
    after calling processJsonResponse-----------
    after calling clearTelemetryConfig-----------
    after calling generateTelemetryConfig--------
    schedulecronjob!!
    after calling scheduleCron-------------------
    dcaoutputjson----!!!!!!!!!!!!----{"searchResult":[{"<remaining_keys>":"<remaining_values>"}]}
    230411-07:05:08.918136 getAccountId() called from: /lib/rdk/dca_utility.sh -  partner_id retrieved from syscfg.db : RDKM
    230411-07:05:09.025552 getAccountId() called from: /lib/rdk/dca_utility.sh -  account_id is not available from syscfg.db or tr181 param, defaulting to Unknown...
    outputjson---------------{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"<#=#>EROUTER_IPV6<#=#>"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:05:09"}
    outputjson1---------------{"searchResult":[{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"<#=#>EROUTER_IPV6<#=#>"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:05:09"}]}
    TELEMETRY_JSON_RESPONSE file is -----------/nvram/rtl_json.txt
    number of proUPdel:90
    Upload protocol is:HTTPS
    HTTPURL:https://xconf.rdkcentral.com/xconf/logupload.php
    ifconfig: eth0: error fetching interface information: Device not found
    ifconfig: eth0: error fetching interface information: Device not found
    =============Telemetry has file only one upload=======================
    call uploadLogOnReboot
    Sleeping for seven minutes
    230411-07:05:20.709032 dca: Using Direct commnication
    number of proUPdel1:90
    Upload protocol telemetry is:HTTPS
    before HTTP upload
    number of httpdeli:90
    HTTPTELEMETRYURL:https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    ------CURL_CMD:curl --tlsv1.2 -w '%{http_code}\n' -H "Accept: application/json" -H "Content-type: application/json" -X POST -d @/nvram/rtl_json.txt 'https://xconf.rdkcentral.com/xconf/telemetry_upload.php' --connect-timeout 30 -m 30
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   282    0     0  100   282      0    218  0:00:01  0:00:01 --:--:--   218
    http code in telemetry is :200
    HTTP telemetry curl upload succeded!!!!!!!!!!!!!!!!!
    Done sleeping prev logpath /rdklogs/logs//PreviousLogs
    ckp100-------------prev log path-------------/rdklogs/logs//PreviousLogs
    rm: cannot remove `04-11-23-07-05AM.tgz': No such file or directory
    ckp101---------------------upload log-----true
    total 17
    drwxr-xr-x 2 root root 3072 Apr 11 07:05 .
    drwxr-xr-x 4 root root 3072 Apr 11 07:04 ..
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-ArmConsolelog.txt.0
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-BootTime.log
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-CRlog.txt.0
    -rw-r--r-- 1 root root 4176 Apr 11 07:05 04-11-23-07-05AM-Consolelog.txt.0
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-FirewallDebug.txt
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-LM.txt.0
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-MnetDebug.txt
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-PAMlog.txt.0
    -rw-r--r-- 1 root root  121 Apr 11 07:05 04-11-23-07-05AM-PARODUSlog.txt.0
    -rw-r--r-- 1 root root  175 Apr 11 07:05 04-11-23-07-05AM-PSMlog.txt.0
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-TDMlog.txt.0
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-TR69log.txt.0
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-WEBPAlog.txt.0
    -rw-r--r-- 1 root root 1236 Apr 11 07:05 04-11-23-07-05AM-WiFilog.txt.0
    -rw-r--r-- 1 root root  485 Apr 11 07:05 04-11-23-07-05AM-dcmscript.log
    -rw-r--r-- 1 root root    0 Apr 11 07:05 04-11-23-07-05AM-swupdate.log
    -rw-r--r-- 1 root root  203 Apr 11 07:05 04-11-23-07-05AM-version.txt
    ckp101--------------------------
    ckp101--------------------------
    number of proUPdel2:90
    Upload protocol logupload is:HTTPS
    before HTTP log upload
    HTTPLOGUPLOADURL:https://xconf.rdkcentral.com/xconf/logupload.php
    upload log file is:04-11-23-07-04AM.tgz
    ------CURL_CMD2:curl -w '%{http_code}\n' -F filename=@/rdklogs/logs//PreviousLogs/E4:5F:01:FB:13:4B-Logs-04-11-23-07-04AM.tgz 'https://xconf.rdkcentral.com/xconf/logupload.php' --connect-timeout 100 -m 100
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2675  100    30  100  2645     24   2189  0:00:01  0:00:01 --:--:--  2216
    http_code is :200
    HTTP log upload succeded!!!!!!!!!!!!!!!!!
    number of proUPdel2:90
    Upload protocol logupload is:HTTPS
    before HTTP log upload
    HTTPLOGUPLOADURL:https://xconf.rdkcentral.com/xconf/logupload.php
    upload log file is:04-11-23-07-05AM.tgz
    ------CURL_CMD2:curl -w '%{http_code}\n' -F filename=@/rdklogs/logs//PreviousLogs/E4:5F:01:FB:13:4B-Logs-04-11-23-07-05AM.tgz 'https://xconf.rdkcentral.com/xconf/logupload.php' --connect-timeout 100 -m 100
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  5432  100    30  100  5402     25   4554  0:00:01  0:00:01 --:--:--  4583
    http_code is :200
    HTTP log upload succeded!!!!!!!!!!!!!!!!!
    Done Uploading Logs and removing rtl_json.txt file
    Done Uploading Logs and removing rtl_json.txt file
    mv: cannot stat `*': No such file or directory
    230411-07:08:48.518731 RDK_LOGGER: Syncing every 10 minutes for initial 30 minutes
    230411-07:08:48.527724 sync logs to nvram2
    tail: error reading `/rdklogs/logs/PreviousLogs': Is a directory
    tail: error reading `/rdklogs/logs/PreviousLogs_backup': Is a directory
    killall: mldproxy: no process killed
     mldproxy not found
    No dca-utility pid -------
    cp: cannot stat `/nvram/.telemetry/rtl_*': No such file or directory
    230411-07:10:00.749149 dca: Trigger type is :1
    triggertype------------1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1890    0  1890    0     0   1276      0 --:--:--  0:00:01 --:--:--  1275
    sleep for :------------------
    770
    calling processJsonResponse--------
    after calling processJsonResponse-----------
    after calling clearTelemetryConfig-----------
    after calling generateTelemetryConfig--------
    schedulecronjob!!
    after calling scheduleCron-------------------
    dcaoutputjson----!!!!!!!!!!!!----{"searchResult":[{"<remaining_keys>":"<remaining_values>"}]}
    230411-07:10:09.023676 getAccountId() called from: /lib/rdk/dca_utility.sh -  partner_id retrieved from syscfg.db : RDKM
    230411-07:10:09.132621 getAccountId() called from: /lib/rdk/dca_utility.sh -  account_id is not available from syscfg.db or tr181 param, defaulting to Unknown...
    outputjson---------------{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"<#=#>EROUTER_IPV6<#=#>"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:10:09"}
    outputjson1---------------{"searchResult":[{"Profile":"RDKB"},{"mac":"E4:5F:01:FB:13:4B"},{"erouterIpv4":"192.168.225.58"},{"erouterIpv6":"<#=#>EROUTER_IPV6<#=#>"},{"PartnerId":"RDKM"},{"AccountId":"Unknown"},{"Version":"rdkb-generic-broadband-image_rdk-next_20230405075111"},{"Time":"2023-04-11 07:10:09"}]}
    TELEMETRY_JSON_RESPONSE file is -----------/nvram/rtl_json.txt
    number of proUPdel:90
    Upload protocol is:HTTPS
    HTTPURL:https://xconf.rdkcentral.com/xconf/logupload.php
    ifconfig: eth0: error fetching interface information: Device not found
    ifconfig: eth0: error fetching interface information: Device not found
    =============Telemetry has file only one upload=======================
    call uploadLogOnReboot
    Sleeping for seven minutes
    230411-07:10:21.023097 dca: Using Direct commnication
    number of proUPdel1:90
    Upload protocol telemetry is:HTTPS
    before HTTP upload
    number of httpdeli:90
    HTTPTELEMETRYURL:https://xconf.rdkcentral.com/xconf/telemetry_upload.php
    ------CURL_CMD:curl --tlsv1.2 -w '%{http_code}\n' -H "Accept: application/json" -H "Content-type: application/json" -X POST -d @/nvram/rtl_json.txt 'https://xconf.rdkcentral.com/xconf/telemetry_upload.php' --connect-timeout 30 -m 30
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   282    0     0  100   282      0    262  0:00:01  0:00:01 --:--:--   262
    http code in telemetry is :200
    HTTP telemetry curl upload succeded!!!!!!!!!!!!!!!!!
    Done sleeping prev logpath /rdklogs/logs//PreviousLogs
    ckp100-------------prev log path-------------/rdklogs/logs//PreviousLogs
    rm: cannot remove `04-11-23-07-10AM.tgz': No such file or directory
    ckp101---------------------upload log-----true
    total 43
    drwxr-xr-x 2 root root  3072 Apr 11 07:10 .
    drwxr-xr-x 4 root root  3072 Apr 11 07:07 ..
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-ArmConsolelog.txt.0
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-BootTime.log
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-CRlog.txt.0
    -rw-r--r-- 1 root root 11314 Apr 11 07:10 04-11-23-07-10AM-Consolelog.txt.0
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-FirewallDebug.txt
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-LM.txt.0
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-MnetDebug.txt
    -rw-r--r-- 1 root root   433 Apr 11 07:10 04-11-23-07-10AM-PAMlog.txt.0
    -rw-r--r-- 1 root root   981 Apr 11 07:10 04-11-23-07-10AM-PARODUSlog.txt.0
    -rw-r--r-- 1 root root   175 Apr 11 07:10 04-11-23-07-10AM-PSMlog.txt.0
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-TDMlog.txt.0
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-TR69log.txt.0
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-WEBPAlog.txt.0
    -rw-r--r-- 1 root root 15798 Apr 11 07:10 04-11-23-07-10AM-WiFilog.txt.0
    -rw-r--r-- 1 root root  4635 Apr 11 07:10 04-11-23-07-10AM-dcmscript.log
    -rw-r--r-- 1 root root     0 Apr 11 07:10 04-11-23-07-10AM-swupdate.log
    -rw-r--r-- 1 root root   203 Apr 11 07:10 04-11-23-07-10AM-version.txt
    ckp101--------------------------
    number of proUPdel2:90
    Upload protocol logupload is:HTTPS
    before HTTP log upload
    HTTPLOGUPLOADURL:https://xconf.rdkcentral.com/xconf/logupload.php
    upload log file is:04-11-23-07-10AM.tgz
    ------CURL_CMD2:curl -w '%{http_code}\n' -F filename=@/rdklogs/logs//PreviousLogs/E4:5F:01:FB:13:4B-Logs-04-11-23-07-10AM.tgz 'https://xconf.rdkcentral.com/xconf/logupload.php' --connect-timeout 100 -m 100
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  5200  100    30  100  5170     26   4535  0:00:01  0:00:01 --:--:--  4565
    http_code is :200
    HTTP log upload succeded!!!!!!!!!!!!!!!!!
    grep: /etc/syslog.conf: No such file or directory
    grep: /etc/syslog.conf: No such file or directory
    Done Uploading Logs and removing rtl_json.txt file
  • Telemetry Log Markers

           


  • Content of json Response

         



Feature Validation: Telemetry2_0

Pre- requisites for enabling Telemetry2_0

Telemetry Version: 2.0.1 (by default telemetry version as 1)

         


  • Below are the steps for enabling telemetry 2.0.1 in RPI
  1. dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Telemetry.Enable bool true
  2. dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Telemetry.Version string 2.0.1
  3. dmcli eRT setv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.Telemetry.ConfigURL string https://xconf.rdkcentral.com:19092/loguploader/getT2Settings
  4. touch /nvram/enable_t2_debug
  5. reboot the device
  6. pidof "telemetry2_0" - check the running status of telemetry2
  7. T2 DataModel will be loaded
  • Below screenshot for enabling the T2 process of version 2.0.1 in RPI

         


  • After reboot the device

         


  • Telemetry 2.0 Report Profiles
    Telemetry 2 adds support for RDK Components to send their telemetry data to the T2 component for reporting. This allows for moving away from the CPU-intensive process of searching through log files for telemetry strings.
    Telemetry 2.0 allows for an RDK device to be updated with a set of T2 profiles at any time.

          

  • T2 DataModel

          There are 2 parameters under T2 report profiles,


DM

Description

1

Device.X_RDKCENTRAL-COM_T2.ReportProfilesMsgPack

Value must be JSON configuration blob in base 64 encoded msgpack format

2

Device.X_RDKCENTRAL-COM_T2.ReportProfiles 

Value must be JSON configuration blob in string

     

  • DMCLI SET Command for T2 Report Profile
dmcli eRT setv Device.X_RDKCENTRAL-COM_T2.ReportProfiles string '{"profiles":[{"name":"RDKB_CCSPWiFi_Profile","hash":"hash1","value":{"Name":"RDKB_CCSPWifi_Profile","Description":"Report to check WiFi Parameters","Version":"1","Protocol":"HTTP","EncodingType":"JSON","ReportingInterval":180,"TimeReference":"0001-01-01T00:00:00Z","ActivationTimeOut":1800,"Parameter":[{"type":"dataModel","reference":"Profile.Name"},{"type":"dataModel","reference":"Profile.Version"},{"type":"dataModel","reference":"Device.WiFi.Radio.1.Stats.X_COMCAST-COM_NoiseFloor"},{"type":"event","eventName":"2GclientMac_split","component":"wifihealth","use":"absolute"},{"type":"event","eventName":"5GclientMac_split","component":"wifihealth","use":"absolute"},{"type":"event","name":"wifiradio WIFI_COUNT","eventName":"WIFI_MAC_1_TOTAL_COUNT:0","component":"wifiradio","use":"count","reportEmpty":false},{"type":"dataModel","name":"UPTIME","reference":"Device.DeviceInfo.UpTime","use":"absolute"}],"HTTP":{"URL":"http://35.161.239.220/xconf/telemetry_upload.php","Compression":"None","Method":"POST","RequestURIParameter":[{"Name":"deviceId","Reference":"Device.DeviceInfo.X_COMCAST-COM_CM_MAC"},{"Name":"reportName","Reference":"Profile.Name"}]},"JSONEncoding":{"ReportFormat":"NameValuePair","ReportTimestamp":"None"}}},{"name":"RDKB_SelfHeal_Profile","hash":"hash2","value":{"Name":"RDKB_SelfHeal_Profile","Description":"Report to check SelfHeal Parameters","Version":"2","Protocol":"HTTP","EncodingType":"JSON","ReportingInterval":180,"TimeReference":"0001-01-01T00:00:00Z","ActivationTimeOut":1800,"Parameter":[{"type":"dataModel","reference":"Profile.Name"},{"type":"dataModel","reference":"Profile.Version"},{"type":"dataModel","name":"UPTIME","reference":"Device.DeviceInfo.UpTime","use":"absolute"},{"type":"dataModel","reference":"Device.DeviceInfo.UpTime","use":"absolute"},{"type":"event","eventName":"SYS_ERROR_AdvSecurity_NotRunning","component":"SELF_HEAL","use":"absolute"},{"type":"event","eventName":"SYS_SH_lighttpdCrash","component":"test-and-diagnostic","use":"count","reportEmpty":false},{"type":"dataModel","name":"WAN_SSH_STATUS","reference":"Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.WANsideSSH.Enable","use":"absolute"}],"HTTP":{"URL":"http://35.161.239.220/xconf/telemetry_upload.php","Compression":"None","Method":"POST","RequestURIParameter":[{"Name":"deviceId","Reference":"Device.DeviceInfo.X_COMCAST-COM_CM_MAC"},{"Name":"reportName","Reference":"Profile.Name"}]},"JSONEncoding":{"ReportFormat":"NameValuePair","ReportTimestamp":"None"}}}]}'


  • DMCLI GET




  • Telemetry 2.0 Report Profiles Generation in xconf,
    Flow: xconf Server UI -> Telemetry -> Telemetry 2.0 Profiles -> create

           


  • Once you save the Telemetry 2.0 profile, you will get a message overlay ‘Profile added to the pending changes’. Then go to Changes -> select the profile you create -> Click on “Approve selected changes”.

           


  • Create Telemetry 2.0 Targeting Rule
    Flow: Xconf Server -> Telemetry > Telemetry 2.0 Rules > create

           


  • Verification
    Flow: Xconf -Server -> Telemetry > Telemetry 2.0 Test page

         


                   


  • Log Verification in RPI
    Path: rdklogs/logs/
    file: telemetry2_0.txt.0

         


         


           



Note : For T2 the profile validation using dmcli is available at the moment , For Configuring T2 profiles in XCONF UI ,webconfig support is mandatory.


Feature Validation: Remote Feature Control (RFC)

Note : For RFC Validation Webconfig cloud server support is needed ,Below details includes Client and Xconf Server side configurations only.


           


  • Verify the existing(default) value of TR181 parameters

            root@RaspberryPi-Gateway:~# dmcli eRT getv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.TR069support.Enable
            CR component name is: eRT.com.cisco.spvtg.ccsp.CR
            subsystem_prefix eRT.
            getv from/to component(eRT.com.cisco.spvtg.ccsp.pam): Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.TR069support.Enable
            Execution succeed.
            Parameter    1 name: Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.TR069support.Enable
                                type:       bool,    value: true

            root@RaspberryPi-Gateway:~# dmcli eRT getv Device.X_Comcast_com_ParentalControl.ManagedSites.Enable
            CR component name is: eRT.com.cisco.spvtg.ccsp.CR
            subsystem_prefix eRT.
            getv from/to component(eRT.com.cisco.spvtg.ccsp.pam): Device.X_Comcast_com_ParentalControl.ManagedSites.Enable
            Execution succeed.
            Parameter    1 name: Device.X_Comcast_com_ParentalControl.ManagedSites.Enable
                         type:       bool,    value: false

           root@RaspberryPi-Gateway:~#  dmcli eRT getv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.PresenceDetect.Enable
          CR component name is: eRT.com.cisco.spvtg.ccsp.CR
          subsystem_prefix eRT.
          getv from/to component(eRT.com.cisco.spvtg.ccsp.pam): Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.PresenceDetect.Enable
          Execution succeed.
          Parameter    1 name: Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.PresenceDetect.Enable
                     type:       bool,    value: false

            


  • Xconf Server UI Configuration
    Change Application to stb in top right corner of the window.

           


  • Define the Feature
    Flow : Xconf-Server -> RFC -> Feature ->Create
    Feature Instance: <Unique Identifier>
    Name: <Unique Identifier>
    Config Data: < tr181 parameter with its new value>
    Effective immediate: true
    Enable: true

         

         



  • Define the Feature Rule
    Flow: Xconf-server -> RFC -> Feature Rule -> Create
    Name : <Unique Identifier>
    Priority: 1
    Feature : choose your RFC feature ( Previously created)
    Rule : estbMacAddress IS <MAC Address>
    OR
    estbIP IS <IP Address>

         


  • RFC- Test Page
    Flow: Xconf-server -> RFC -> Test Page
    Parameter : estbMacAddress IS <MAC Address>
    OR
    estbIP IS <IP Address>

           


           


  • Once it is successful, rfc-parsed.txt will be created under /tmp directory.
  • Configured data’s that are parsed to the client can be verified at /tmp/rfc_configdata.txt

           


  • Verify with DM

         


  • Verify the logs in /rdklogs/logs/dcmrfc.log file
    Attaching the log file :     dcmrfc_log.txt


Firmware Upgradation for RPI using Xconf Server

  • Introduction
    The Firmware upgrade will upgrade higher or lower version of the current image in RPI target with the help of Xconf server and TFTP/HTTP protocol.


  • TFTP Server Setup
    STEP 1:
    Install xinetd and tftpd-hpa application in your local PC to setup tftp server by using below command
    sudo apt-get install xinetd
    sudo apt-get install tftpd-hpa

          STEP 2:
          Create new folder ,for example "tfphome" in your PC home directory to maintain checksum file and upgrading image file.

         

   

         STEP 3:
         Check tftp file is there or not in /etc/xinetd.d/ directory. if it is not there then create tftp file under this /etc/xinetd.d/ direcotry and add below content.  
         

 vi /etc/xinetd.d/tftp       

service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = -c -v -s /home/xyz/tftphome ( Give upgrading file and checksum file maintained directory )
disable         = no
}


File : /etc/xinetd.d/tftp


  • Verify /etc/default/tftpd-hpa file content

vi /etc/default/tftpd-hpa

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/xyz/tftphome" ( Give upgrading file and checksum file maintained directory )
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure" 

File: /etc/default/tftpd-hpa


STEP 5: Start tftp server and xinetd server using below commands.
sudo service tftpd-hpa restart
sudo /etc/init.d/xinetd restart


  • Procedure for image flashing
    • Have 2 different broadband images and copy to the linux machine
  • Flash a image to the SD card(SD card Minimum size should be 8GB)
    → for Morty version
        sudo dd if=<image> of=/dev/sdb bs=4M
        Example : $ sudo dd if=rdkb-generic-broadband-image_default_20190808132609.rootfs.rpi-sdimg of=/dev/sdb bs=1M
    → For dunfell version
         bzip2 -d <image>
         sudo -E bmaptool copy --nobmap <image> /dev/sdb
         Example:
         $ bzip2 -d rdk-generic-broadband-image-raspberrypi-rdk-broadband.wic.bz2
         $ sudo -E bmaptool copy --nobmap rdk-generic-broadband-image-raspberrypi-rdk-broadband.wic /dev/sd

     


  • With another image
    • Create checksum using the below command
      md5sum "<imagefile_name>" > imagefile_name.txt
    • Copy both (image as well as the checksum) to tftp server
      for Ex:
      md5sum "rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic" >rdkb-generic-broadband-image_rdk-next_20211118174413.txt
      cp -r rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic  rdkb-generic-broadband-image_rdk-next_20211118174413.txt  /home/xyz/tftphome

               


Xconf Server UI Configurations

  • Create Model
    Flow: Xconf-Server ->Common ->Models
    Give ID and Description to setup Model for your device and save that details in xconf server.

         


  • Create MAC List
    Flow: Xconf-Server->Common->MAC Lists
    After entered MAC Lists page press create button to add your device MAC detail and save the details.

         


  • Create Firmware config
    Flow: Xconf-Server->Firmware->Firmware Configs
    After entered Firmware Configs page press create button to add your device firmware configuration detail.
    Give Description, File name, Version and select your model name and save the details in xconf server.
    Description: <unique Identifier>
    File Name :<Upgrading image name>
    Version: <Upgrading image name without .rootfs.rpi.sdimg or .bz2.wic>
    Model: <Model name configured under Common Tab>

         


  • Create Firmware Rule
    Flow: Xconf-Server->Firmware->Firmware Rules
    After entered Firmware Rule page press create button to add your device firmware Rule detail.
    Please Select a Template : <MAC_RULE>
    Name : <Name difined during firmware configs creation>
    Type : <MAC_RULE>
    Build Conditions:eStbMac IN_LIST <List-Id> AND model is <Model_Name>
    Firmware Config:<select the same name defined during configs creation>

         


         


  • Edit Download Location Round Robin Filter
    Flow: Xconf-server -> Firmware -> Download Location Filter -> Edit
    After entered Download Location Filter page press Edit button to add your Download Location detail.
    Location (FQDN) : <xconf.rdkcentral.com>
    Location (full HTTP Location) : <https://xconf.rdkcentral.com/xconf/upload/>
    TFTP :< Tftp server IPv4 and IPv6 Address> 

         


        

  • Add TFTP location
    An HTTP location will be returned by default to all devices. To enable tftp(If you have the download location of the firmware as tftp, then only you need to setup this)as download location for a particular set of devices, we need to override it from firmware rules.
    Flow : Xconf-server -> Firmware ->Firmware Rules -> Define Properties -> Create

         


  • A page will be displayed with options to select the template. Select ‘DOWNLOAD_LOCATION_FILTER’ from the list.

           


  • In this 'firmware rule’ page with type 'DOWNLOAD_LOCATION_FILTER', we need to specify the ‘Build Conditions’ and ‘Action’ , The build condition should be same as that we used to set rule actions(which will set rules for our intended devices). In ‘Properties’ option under ‘Action’, add ‘firmwareDownloadProtocol’ as ‘tftp’, ‘firmwareLocation’ as ‘your tftp location IPV4 address’. This property will override the default value set from ‘Download Round Robin location filter’.

           


  • Note: Setting up IPV4 locations via ‘Download Location Round Robin Filter’ is not supported. This can be set only by the property 'firmwareLocation' from the 'Define Properties' firmware rule page.
    Just like we added tftp location and protocol here, we can also override the default value with http as well. For firmwareDownloadProtocol, add 'http' and for the 'firmwareLocation', add http location.
  • Response example for https://{xconf-ip}:{port}/xconf/swu/stb?eStbMac={mac}. Here the 'firmwareLocation' and 'firmwareDownloadProtocol' are overrided at 'Define Properties' firmware rule.
  • The 'ipv6' addresses will be one of the addresses mentioned in the 'Download Filter' page . If you don't want "ipv6FirmwareLocation", then don't setup it in 'Define Properties' or in the 'Download location filter' pages and you will get only "firmwareLocation" in the response.

           


  • Verification of Firmware test page
    Flow : Xconf-server -> Firmware -> Test Page
    Parameters : eStbMac <MAC-Address>

         


         


         


  • Change the TFTP address in /etc/device.properties

         


  • Check the image version using “cat /version.txt”

           


  • Restart the service using below command
    root@RaspberryPi-Gateway:~#  systemctl restart swupdate.service
    else reboot the board.
    Note: For the 1st time board go for automatic reboot when we give restart of swupdate service and creates 2 more partitions in sd card.
  • Check the response, xconf_curl_httpcode and swupdate log files under /rdklogs/logs/
  • This log file contains the below details
    service status, http code , MAC address , JSONSTR,  cloud prototype (TFTP), cloud version , RPI version ,  Checksum ,Number of partitions Device type, Active and Passive bank partitions ,Upgrade successful message.

         


  • Sample Log
  • root@RaspberryPi-Gateway:/rdklogs/logs#
    root@RaspberryPi-Gateway:/rdklogs/logs# cat swupdate.log
    Started executing swupdate_utility.sh and device type is :broadband
    Main app & Triggering deviceInitiatedFWDnld.sh
    URL_CMD: curl -w %{http_code} 'https://xconf.rdkcentral.com:9092/xconf/swu/stb?eStbMac=B8:27:EB:22:16:36' -o /tmp/cloudurl.txt >> /tmp/cloudhttpresp.txt
    No error in curl command and curl http code is:200
    cloud version is rdkb-generic-broadband-image_rdk-next_20211118174413
    RPI version is rdkb-generic-broadband-image_rdk-next_20211118184509
    Active bank is:2
    rpiimageModel in dev is :rdkb
    cloudimageModel  is :rdkb
    no of parts is :4
    active bank is 0 so fetch info from passive and partition is:2
    rpipassivebankimageModel:
    passivebankVersion:
    since bank1 p3 is broadband and pass bank is rdkv cloud is broadband check broadband version and upgrade if mismatches
    check broadband versions and upgrade if mismatches !!
    Device type is broadband !!
    Image Upgrade During Bootup ..!
    Main APP of devinitFWDNLD---
    2021-11-22 07:15:14 version = rdkb-generic-broadband-image_rdk-next_20211118184509
    2021-11-19 07:15:14 buildtype = dev
    Mac in jsonstr:B8:27:EB:22:16:36&model=RPI&capabilities=RCDL&capabilities=supportsFullHttpUrl
    2021-11-22 07:15:14 JSONSTR: B8:27:EB:22:16:36&model=RPI&capabilities=RCDL&capabilities=supportsFullHttpUrl
    Trying to communicate with XCONF server
    URL_CMD: curl -w %{http_code} 'https://xconf.rdkcentral.com:19092/xconf/swu/stb?eStbMac=B8:27:EB:22:16:36&model=RPI&capabilities=RCDL&capabilities=supportsFullHttpUrl' -o /rdklogs/logs/response.txt >> /rdklogs/logs/xconf_curl_httpcode
    CKP: got no error in curl command!!!!!!!!!!!!!200
    Curl return code : 0
    ret = 0, http_code: 200 for XCONF communication
    2021-11-22 07:15:15 HTTP request success. Processing response..
    OUTPUT1 :
    2021-11-22 07:15:16 cloudFWFile: rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic
    2021-11-22 07:15:16 cloudFWLocation: 192.168.1.4
    2021-11-22 07:15:16 cloudFWVersion: rdkb-generic-broadband-image_rdk-next_20211118174413
    2021-11-22 07:15:16 cloudProto: tftp
    2021-11-22 07:15:16 cloudImmediateRebootFlag: false
    2021-11-22 07:15:16 myFWVersion = rdkb-generic-broadband-image_rdk-next_20211118184509
    2021-11-22 07:15:16 myFWFile =
    2021-11-22 07:15:16 lastDnldFile:
    2021-11-22 07:15:16 cloudFWVersion: rdkb-generic-broadband-image_rdk-next_20211118174413
    2021-11-22 07:15:16 cloudFWFile: rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic
    Xconf image Check
    Firmware versions are different myFWVersion : rdkb-generic-broadband-image_rdk-next_20211118184509 cloudFWVersion : rdkb-generic-broadband-image_rdk-next_20211118174413
    cloudFWLocation192.168.1.4
    cloudfile :rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic
    protocol1
    2021-11-22 07:15:16 Starting Image Flashing ...
    2021-11-22 07:15:16 Upgrade Server = 192.168.1.4
    2021-11-22 07:15:16 Upgrade File = rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic
    2021-11-22 07:15:16 Reboot Flag = 0
    2021-11-22 07:15:16 Upgrade protocol = 1
    2021-11-22 07:15:16 PDRI Upgrade =
    CKP !!!!!!!!! calling rpi_sw_install
    Checking available partition for bank switch and image upgrade...
    Creating additional partition for storage area and box will go for reboot...
    storage partition mmcblk0p4 is available
    file system type check count partition p3 is 0
    Creating ext4 file system for partition mmc0blkp3...
    Discarding device blocks: done
    Creating filesystem with 524288 4k blocks and 131072 inodes
    Filesystem UUID: 2fbcfc3a-6b84-48b0-a171-86dd13cbf82b
    Superblock backups stored on blocks:
            32768, 98304, 163840, 229376, 294912

    Allocating group tables: done
    Writing inode tables: done
    Creating journal (16384 blocks): done
    Writing superblocks and filesystem accounting information: done
    file system type check count partition p4 is 0
    Creating ext4 file system for partition mmc0blkp4...
    Discarding device blocks: done
    Creating filesystem with 524288 4k blocks and 131072 inodes
    Filesystem UUID: 1c2075c1-9de9-4fb0-b9ab-f9ca277f54d7
    Superblock backups stored on blocks:
            32768, 98304, 163840, 229376, 294912

    cloud proto is :1
    set IPtable rules for tftp !!
    cloudfile is:rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic
    cloudlocation is:192.168.1.4
    Downloading already deployed checksum file from server rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic
    tftp download checksum file
    checksum file to download is rdkb-generic-broadband-image_rdk-next_20211118174413.txt
    Downloading rdkb-generic-broadband-image_rdk-next_20211118174413.rootfs.wic ...

  • Verify the tftp download is happening by noticing the change of file size using below command:
    ls /extblock/tftpimage/imagedwnldls -sh  (use this command frequently to verify the file size change)

         


  • Once image download completed, the RPI board will auto reboot and come up with downloaded image.
  • Once the board comes up, check the image loaded in the box using “cat /version.txt” command .It will be upgraded with the image from xconf-server.

         


  • NOTE : Every time need to flash the different images . Because, here they are using the bank switching approach (https://wiki.rdkcentral.com/display/RDK/RDKB+RPI+Firmware+Upgrade+-+Design+-+2019+M7) where the images will be stored in the cloud.
    So for the next time, when you try to flash the same image to SD card , the firmware upgrade will not happen . The reason is, it will check in the bank (cloud – active and passive banks). If the image is already available in any one of the bank, then it will not go for image upgrade. 

    Sample Log:

    After retries...No error in curl command and curl http code is:200
    cloud version is rdkb-generic-broadband-image_rdk-next_20211118174413
    RPI version is rdkb-generic-broadband-image_rdk-next_20211118174413
    Active bank is:2
    rpiimageModel in dev is :rdkb
    cloudimageModel  is :rdkb
    no of parts is :4
    active bank is 0 so fetch info from passive and partition is:2
    rpipassivebankimageModel:rdkb
    passivebankVersion:rdkb-generic-broadband-image_rdk-next_20211118174413
    since both banks has broadband alone and cloud also has broadband-compare versions with cloud
    atleast one bank matches broadband
    root@RaspberryPi-Gateway:/rdklogs/logs# tail -f swupdate.log
    RPI version is rdkb-generic-broadband-image_rdk-next_20211118174413
    Active bank is:2
    rpiimageModel in dev is :rdkb
    cloudimageModel  is :rdkb
    no of parts is :4
    active bank is 0 so fetch info from passive and partition is:2
    rpipassivebankimageModel:rdkb
    passivebankVersion:rdkb-generic-broadband-image_rdk-next_20211118174413
    since both banks has broadband alone and cloud also has broadband-compare versions with cloud
    atleast one bank matches broadband


         

  • No labels

2 Comments

  1. What is 35.161.239.220 in "Feature Validation: LogUpload"? Is it xconf server?