Overview

DmCli is a CCSP component that provides the Command Line Interface to the device. It helps to  interact with data objects in the RDKB setup and query their values or set/change them.

Dmcli is used to send and receive DBUS messages via CLI (Command Line Interface) over Telnet and SSH protocols.

Its primary role is to allow an individual to perform Data base related operations on the Data Model. 

Some of the primary functionalities supported by it are:

  • Get the value of a parameter
  • Set the value of a parameter
  • Add an entry to the table
  • Delete an entry to the table

One very crucial and important functionality is that it extends the operations of parameters in common library through command line. It is very useful for developing a new component and debugging purpose.

A sample dmcli command looks as follows with the expected output. In the output , the component name will be displayed based on the parameter queried .

root@RaspberryPi-Gateway:~# dmcli eRT getv Device.WiFi.RadioNumberOfEntries
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.RadioNumberOfEntries
Execution succeed.
Parameter    1 name: Device.WiFi.RadioNumberOfEntries
               type:       uint,    value: 2 

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


DmCli usage

  • Invoking Multiple DMs from single dmcli command
~ # dmcli eRT getv Device.WiFi.SSID.1.Status Device.WiFi.SSID.9.Enable
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.SSID.1.Status
Execution succeed.
Parameter    1 name: Device.WiFi.SSID.1.Status
               type:     string,    value: Up
Parameter    2 name: Device.WiFi.SSID.9.Enable
               type:       bool,    value: false


  • getn command to retrieve the access permission of the parameter
~ # dmcli eRT getn Device.WiFi.SSID.1.Status
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getn from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.SSID.1.Status
Execution succeed.
Parameter    1 name: Device.WiFi.SSID.1.Status
        writable:ReadOnly.
~ # dmcli eRT getn Device.WiFi.SSID.1.Enable
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getn from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.SSID.1.Enable
Execution succeed.
Parameter    1 name: Device.WiFi.SSID.1.Enable
        writable:Writable.


  • Command to list all corresponding parameters and the respective values
~ # dmcli eRT getv Device.WiFi.SSID.9.
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.SSID.9.
Execution succeed.
Parameter    1 name: Device.WiFi.SSID.9.Enable
               type:       bool,    value: false
Parameter    2 name: Device.WiFi.SSID.9.Status
               type:     string,    value: Down
Parameter    3 name: Device.WiFi.SSID.9.Alias
               type:     string,    value: ath8
Parameter    4 name: Device.WiFi.SSID.9.Name
               type:     string,    value: ath8
Parameter    5 name: Device.WiFi.SSID.9.LastChange
               type:       uint,    value: 910
Parameter    6 name: Device.WiFi.SSID.9.LowerLayers
               type:     string,    value: Device.WiFi.Radio.1.
Parameter    7 name: Device.WiFi.SSID.9.BSSID
               type:     string,    value:
Parameter    8 name: Device.WiFi.SSID.9.MACAddress
               type:     string,    value:
Parameter    9 name: Device.WiFi.SSID.9.SSID
               type:     string,    value: OutOfService
Parameter   10 name: Device.WiFi.SSID.9.X_COMCAST-COM_DefaultSSID
               type:     string,    value: OutOfService
Parameter   11 name: Device.WiFi.SSID.9.X_CISCO_COM_EnableOnline
               type:       bool,    value: false
Parameter   12 name: Device.WiFi.SSID.9.X_CISCO_COM_RouterEnabled
               type:       bool,    value: false
Parameter   13 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResultNumberOfEntries
               type:       uint,    value: 3
Parameter   14 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_Result
               type:     string,    value: Invalid
Parameter   15 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_CreationTime
               type:   dateTime,    value: 0000-00-00 00:00:00
Parameter   16 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOffAvgChannel
               type:     string,    value:
Parameter   17 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOnAvgChannel
               type:     string,    value:
Parameter   18 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOffMaxChannel
               type:     string,    value:
Parameter   19 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOnMaxChannel
               type:     string,    value:
Parameter   20 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_ResultsInfo
               type:     string,    value:
Parameter   21 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_Result
               type:     string,    value: Invalid
Parameter   22 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_CreationTime
               type:   dateTime,    value: 0000-00-00 00:00:00
Parameter   23 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOffAvgChannel
               type:     string,    value:
Parameter   24 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOnAvgChannel
               type:     string,    value:
Parameter   25 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOffMaxChannel
               type:     string,    value:
Parameter   26 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOnMaxChannel
               type:     string,    value:
Parameter   27 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_ResultsInfo
               type:     string,    value:
Parameter   28 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_Result
               type:     string,    value: Invalid
Parameter   29 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_CreationTime
               type:   dateTime,    value: 0000-00-00 00:00:00
Parameter   30 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOffAvgChannel
               type:     string,    value:
Parameter   31 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOnAvgChannel
               type:     string,    value:
Parameter   32 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOffMaxChannel
               type:     string,    value:
Parameter   33 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOnMaxChannel
               type:     string,    value:
Parameter   34 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_ResultsInfo
               type:     string,    value:
Parameter   35 name: Device.WiFi.SSID.9.Stats.BytesSent
               type:       uint,    value: 0
Parameter   36 name: Device.WiFi.SSID.9.Stats.BytesReceived
               type:       uint,    value: 0
Parameter   37 name: Device.WiFi.SSID.9.Stats.PacketsSent
               type:       uint,    value: 0
Parameter   38 name: Device.WiFi.SSID.9.Stats.PacketsReceived
               type:       uint,    value: 0
Parameter   39 name: Device.WiFi.SSID.9.Stats.ErrorsSent
               type:       uint,    value: 0
Parameter   40 name: Device.WiFi.SSID.9.Stats.ErrorsReceived
               type:       uint,    value: 0
Parameter   41 name: Device.WiFi.SSID.9.Stats.UnicastPacketsSent
               type:       uint,    value: 0
Parameter   42 name: Device.WiFi.SSID.9.Stats.UnicastPacketsReceived
               type:       uint,    value: 0
Parameter   43 name: Device.WiFi.SSID.9.Stats.DiscardPacketsSent
               type:       uint,    value: 0
Parameter   44 name: Device.WiFi.SSID.9.Stats.DiscardPacketsReceived
               type:       uint,    value: 0
Parameter   45 name: Device.WiFi.SSID.9.Stats.MulticastPacketsSent
               type:       uint,    value: 0
Parameter   46 name: Device.WiFi.SSID.9.Stats.MulticastPacketsReceived
               type:       uint,    value: 0
Parameter   47 name: Device.WiFi.SSID.9.Stats.BroadcastPacketsSent
               type:       uint,    value: 0
Parameter   48 name: Device.WiFi.SSID.9.Stats.BroadcastPacketsReceived
               type:       uint,    value: 0
Parameter   49 name: Device.WiFi.SSID.9.Stats.UnknownProtoPacketsReceived
               type:       uint,    value: 0
Parameter   50 name: Device.WiFi.SSID.9.Stats.RetransCount
               type:       uint,    value: 0
Parameter   51 name: Device.WiFi.SSID.9.Stats.FailedRetransCount
               type:       uint,    value: 0
Parameter   52 name: Device.WiFi.SSID.9.Stats.RetryCount
               type:       uint,    value: 0
Parameter   53 name: Device.WiFi.SSID.9.Stats.MultipleRetryCount
               type:       uint,    value: 0
Parameter   54 name: Device.WiFi.SSID.9.Stats.ACKFailureCount
               type:       uint,    value: 0
Parameter   55 name: Device.WiFi.SSID.9.Stats.AggregatedPacketCount
               type:       uint,    value: 0



  • No labels

9 Comments

  1. List of additional dmcli usages commands below:
    root@Gateway:~# dmcli
    Usage:
    #dmcli <eRT|eMG|eEP|simu> [config]
    #dmcli <eRT|eMG|eEP|simu> [config] command p1 p2 p3 ....

    Description:
    The first usage provides a interactive interface to run commands.
    The second usage provides one direct one-line method to run commands.
    Config should point to a file including one kinde of daemon address for example:
    tcp:host=10.74.52.92,port=54321
    If have not config, it supposes that a file(msg_daemon.cfg) exists here(/tmp/ccsp_msg.cfg)

    Commands supported:
    setvalues pathname type value [pathname type value] ... [commit]
    setcommit
    getvalues pathname [pathname] ...
    sgetvalues pathname [pathname] ...
    setattributes pathname notify accesslist [pathname notify accesslist ] ...
    getattributes pathname [pathname] ...
    addtable pathname
    deltable pathname
    getnames pathname [nextlevel]
    setsub set subsystem_prefix when call CcspBaseIf_discComponentSupportingNamespace
    psmget pathname
    psmset pathname type value
    psmdel pathname
    help
    exit
    -------------------------------------
    sgetvalues: This cmd is used to calculate GPV time.
    pathname : It's a full name or partial name.
    type : It is one of string/int/uint/bool/datetime/base64/float/double/byte.
    value : It is a string for all types, even for int or enumeration.
    If the string need to contain blank space, pls put value like "aa bb".
    commit : It is true or false. It's true by default.
    notify : It is one of unchange/off/passive/active.
    accesslist: It can be only one of unchange/acs/xmpp/cli/webgui/anybody.
    nextlevel : It is true or false. It's true by default.

  2. Hi, I would like to know if it is possible to do query using something like this: dmcli eRT getv Device.WiFi.SSID.{*}.SSID.

    Thank you in advance! 


    1. Hi Z-Thiago Navarro 

      If you are intending to replace the '*' with actual value, it will definitely work. If not, we would recommend to perform the action via a loop in script(or C code) you are going to use

  3. Hi, would you help to list some set commands? I want to change the password of VAP1 with below command, why doesn't it take effect? Thanks in advance.

    root@RaspberryPi-Gateway:~# dmcli eRT setv Device.WiFi.AccessPoint.1.Security.KeyPassphrase string 123456789
    CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    setv from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.AccessPoint.1.Security.KeyPassphrase
    Execution succeed.


    Getv command still returns original value "12345678" instead of "123456789". And in the GUI, also shows "12345678".

    root@RaspberryPi-Gateway:~# dmcli eRT getv Device.WiFi.AccessPoint.1.Security.KeyPassphrase
    CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    getv from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.AccessPoint.1.Security.KeyPassphrase
    Execution succeed.
    Parameter    1 name: Device.WiFi.AccessPoint.1.Security.KeyPassphrase
                   type:     string,    value: 12345678

  4. For Any wifi setting change that needs to be applied at driver level, we need a radio restart.
    Please use above dmcli set command followed by a ApplySetting set.

    dmcli eRT setv Device.WiFi.AccessPoint.1.Security.KeyPassphrase string 123456789
    dmcli eRT setv Device.WiFi.Radio.1.X_CISCO_COM_ApplySetting bool true

    1. Thanks a lot. Solved my problem.

    2. Hi sipra samantray 

      even after trying above , the set of passphrase is not reflecting.

      FYI .. i loaded image in raspberry pi 3 model

      when i set "dmcli eRT setv Device.WiFi.Radio.1.X_CISCO_COM_ApplySetting bool true ", its showing succeeded but when i get value always showing as false.

      Below steps not helped to me resolve the issue:
      dmcli eRT setv Device.WiFi.AccessPoint.1.Security.KeyPassphrase string 123456789
      dmcli eRT setv Device.WiFi.Radio.1.X_CISCO_COM_ApplySetting bool true

      Build : rdkb-2023q2-dunfell

      Thanks in advance.

  5. hi, would you please help to solve below issue, thanks.

    i want to change below parameter to value empty string, but it report fail always

    root@ipq40xx:/# dmcli eRT setv Device.IP.Diagnostics.IPPing.Interface string ""
    CR component name is: eRT.com.cisco.spvtg.ccsp.CR
    subsystem_prefix eRT.
    setv from/to component(eRT.com.cisco.spvtg.ccsp.tdm): Device.IP.Diagnostics.IPPing.Interface
    Execution fail(error code:CCSP_ERR_INVALID_PARAMETER_VALUE(9007)).

  6. Hello
    I would like to obtain information on any potential Wifi boosters using `dmcli`, is it possible ?