RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive![]()
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:
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 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
~ # 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.
~ # 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_CISCO_COM_EnableOnline
type: bool, value: false
Parameter 11 name: Device.WiFi.SSID.9.X_CISCO_COM_RouterEnabled
type: bool, value: false
Parameter 12 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResultNumberOfEntries
type: uint, value: 3
Parameter 13 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_Result
type: string, value: Invalid
Parameter 14 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_CreationTime
type: dateTime, value: 0000-00-00 00:00:00
Parameter 15 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOffAvgChannel
type: string, value:
Parameter 16 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOnAvgChannel
type: string, value:
Parameter 17 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOffMaxChannel
type: string, value:
Parameter 18 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_PAOnMaxChannel
type: string, value:
Parameter 19 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.1.X_TCH_COM_ResultsInfo
type: string, value:
Parameter 20 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_Result
type: string, value: Invalid
Parameter 21 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_CreationTime
type: dateTime, value: 0000-00-00 00:00:00
Parameter 22 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOffAvgChannel
type: string, value:
Parameter 23 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOnAvgChannel
type: string, value:
Parameter 24 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOffMaxChannel
type: string, value:
Parameter 25 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_PAOnMaxChannel
type: string, value:
Parameter 26 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.2.X_TCH_COM_ResultsInfo
type: string, value:
Parameter 27 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_Result
type: string, value: Invalid
Parameter 28 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_CreationTime
type: dateTime, value: 0000-00-00 00:00:00
Parameter 29 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOffAvgChannel
type: string, value:
Parameter 30 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOnAvgChannel
type: string, value:
Parameter 31 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOffMaxChannel
type: string, value:
Parameter 32 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_PAOnMaxChannel
type: string, value:
Parameter 33 name: Device.WiFi.SSID.9.X_TCH_COM_11nCalcResult.3.X_TCH_COM_ResultsInfo
type: string, value:
Parameter 34 name: Device.WiFi.SSID.9.Stats.BytesSent
type: uint, value: 0
Parameter 35 name: Device.WiFi.SSID.9.Stats.BytesReceived
type: uint, value: 0
Parameter 36 name: Device.WiFi.SSID.9.Stats.PacketsSent
type: uint, value: 0
Parameter 37 name: Device.WiFi.SSID.9.Stats.PacketsReceived
type: uint, value: 0
Parameter 38 name: Device.WiFi.SSID.9.Stats.ErrorsSent
type: uint, value: 0
Parameter 39 name: Device.WiFi.SSID.9.Stats.ErrorsReceived
type: uint, value: 0
Parameter 40 name: Device.WiFi.SSID.9.Stats.UnicastPacketsSent
type: uint, value: 0
Parameter 41 name: Device.WiFi.SSID.9.Stats.UnicastPacketsReceived
type: uint, value: 0
Parameter 42 name: Device.WiFi.SSID.9.Stats.DiscardPacketsSent
type: uint, value: 0
Parameter 43 name: Device.WiFi.SSID.9.Stats.DiscardPacketsReceived
type: uint, value: 0
Parameter 44 name: Device.WiFi.SSID.9.Stats.MulticastPacketsSent
type: uint, value: 0
Parameter 45 name: Device.WiFi.SSID.9.Stats.MulticastPacketsReceived
type: uint, value: 0
Parameter 46 name: Device.WiFi.SSID.9.Stats.BroadcastPacketsSent
type: uint, value: 0
Parameter 47 name: Device.WiFi.SSID.9.Stats.BroadcastPacketsReceived
type: uint, value: 0
Parameter 48 name: Device.WiFi.SSID.9.Stats.UnknownProtoPacketsReceived
type: uint, value: 0
Parameter 49 name: Device.WiFi.SSID.9.Stats.RetransCount
type: uint, value: 0
Parameter 50 name: Device.WiFi.SSID.9.Stats.FailedRetransCount
type: uint, value: 0
Parameter 51 name: Device.WiFi.SSID.9.Stats.RetryCount
type: uint, value: 0
Parameter 52 name: Device.WiFi.SSID.9.Stats.MultipleRetryCount
type: uint, value: 0
Parameter 53 name: Device.WiFi.SSID.9.Stats.ACKFailureCount
type: uint, value: 0
Parameter 54 name: Device.WiFi.SSID.9.Stats.AggregatedPacketCount
type: uint, value: 0
11 Comments
Unknown User (dibyaranjan.giri)
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.
Unknown User (thiago.navarro)
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!
Narayanaswamy Ramaiyer
Hi Unknown User (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
Unknown User (tony.he)
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
sipra samantray
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
Unknown User (tony.he)
Thanks a lot. Solved my problem.
Z-Pittu Siva Rami Reddy
Hi Unknown User (sipra.s)
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.
Z-haichaos
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)).
Antoine Sébert
Hello
I would like to obtain information on any potential Wifi boosters using `dmcli`, is it possible ?
Z-Mehmet Finci
Let's suppose that I want to add new tr69 object, for example
This is the existing "Device.DeviceInfo." and adding new object like "Device.DeviceInfo.X_Test" along with other objects.
Is it possible via dmcli or I need to add this "Device.DeviceInfo.X_Test" to config file in repo and then build for the whole image or (though not recommended or possible I guess) building only CcspTr069Pa module will suffice?
Thank you in advance
Praveen V P
Hi Unknown User (mehmet.finci),
The steps you need to follow when adding a new data model are explained in the link below.
One Wifi code flow
Thanks,
Praveen