Follow

SmartServer IoT Power-Line DCI Console Commands (KB1411)

The SmartServer IoT has a DCI console used for advanced diagnositics of power-line devices.

 

To access  the DCI Console:

Login as root:
su

Enable port 50012/tcp:
ufw allow 50012/tcp

Change directory:
cd /usr/bin/apollo/lte/bin

Launch DCI console:
./echdcish dc -i1

To exit:

shexit

 

DCI Console Commands

The following are the PL repeating console commands for the SmartServer IoT.

dcxProperty

Arguments:        [-c] [-delete] [<resource>,] <property>, [value]

This command gets or sets a DCXP property.  Arguments are delimited by comma “,”.  Specifying a property with a comma but not a value (e.g. “dcxProperty ppp username,”) clears the property. The character “*” denotes all instances (e.g.  “dcxProperty resource.Event.*”). If resource is not specified, then it defaults to the DCX node property.  –c is used to create a resource and –delete is used to delete a resource.  It’s best to illustrate the syntax using the examples below.  For specific information about resources and properties within resources, see Resource Properties.

Getting All DCX Node Properties

To get all configuration and status properties of the DCX, type “dcxp”.  Also use this command to see the property names. 

Getting DCX Node Property

To get the DCX’s modem type, type “dcxProperty modem type”

Setting DCX Node Property

To set the DCX’s modem type to 2, type “dcxProperty modem type, 2”

To clear a property such as agent, type “dcxProperty ppp username,”

Getting Device Property

To get device 2048’s state, type “dcxProperty device.2048, state”

To get the state property of all devices, type “dcxProperty device.*, state”

Setting Device Property

To disable device 2048, type “dcxProperty device.2048, disabled, false”

To clear device 2048’s agent, type “dcxProperty device.2048, agent,”

To set all functions to disabled, type “dcxProperty f.*, disabled, true”

Getting All Device Properties

To get all configuration and status properties of device 2048, type “dcxProperty device.2048”.  Also use this command to see the property names.

To get all configuration and status properties for all devices, type “dcxp device.*,”

Creating a Device

To create a device with handle 33 and device ID 0x112233445566 “dcxp –c device.33, device id, 112233445566”.  Note you can only set one property during a create.  The rest can be set using additional dcxp requests (see above).

Deleting a Device

To delete device 33, “dcxp –delete device.33”. 

To delete all devices, “dcxp –delete device.*”. 

To delete everything, “dcxp –delete *.*”.

Note that deletion does not ask you if you are sure so don’t use the “-delete” option unless you are in fact sure.  Note that delete prints out the items as they are deleted so it is not practical to use this for very large sets of resources unless you have lots of time.

Listing Resource Collections

Type “dcxProperty resource.*”

Counting a Collection

Type the command “dcxProperty resource.*” to obtain a list of Resource.<resource name>.  Then type “dcxProperty resource.<resource name>” to get a count of the resources of a given type.  For example:

               “dcxProperty resource.DeviceConfig.*”    -- returns the number of devices
               “dcxProperty resource.Event.*”                       -- returns the number of events
               “dcxProperty resource.Operation.*”            -- returns the number of operations pending
               “dcxProperty resource.Result.*”                     -- returns the number of operation results
               “dcxProperty resource.Data.*”                          -- returns the number of billing data

Listing Resources in a Collection

Type the command “dcxProperty resource.*” to obtain a list of Resource.<resource name>.  Then type “dcxProperty <resource name>.*” to list all resource instances by key.  For example,

               “dcxProperty device.*”                                             -- lists all device keys
               “dcxProperty event.*”                                                -- lists all events
               “dcxProperty eventConfig.*”                                -- lists all event types

Listing Properties of a Resource

Type the command “dcxProperty resource.*” to obtain a list of Resource.<resource name>.  Then type “dcxProperty <resource name>.*” to list all resource instances by key.  For example,

               “dcxProperty eventConfig.*”                                -- lists all event types

then type:

               “dcxProperty <key>” where <key> is listed in the above command.

dcxShowDevices

Arguments:        [+/-commPending] [+/-up] [+/-disabled] [+/-s<states>] [+/-h#\n");

Where:

+ requests that only qualifying devices be displayed

- requests that qualifying devices be excluded

<states> is a list of characters denoting the states to be listed (+) or suppressed (-)

[up], [no] agent, [co]nfirmed down, [na]scent, [wr]ong key, [in]valid neuron state, [un]known

+h# (where # is a decimal number) selects devices with # or more hops

-h# (where # is a decimal number) selects devices with # or less hops

This command displays general state info for all devices device on the DC.

Default is to display all devices except DC NI.

Example:

dcxShowDevices +scono –h3 +h3

Would list Confirmed Down and No Agent devices that use exactly 3 hops.

The following status information is reported for each of the specified devices:

  1. NACK Code – not used.
  2. Status – first 6 bytes of the last status reported by the device (see also Status2).
  3. Current Phase – the value can be Unknown, 0 (Phase R), -120 (Phase S), or +120 (Phase T).
  4. Phase Inversion – a 1 specifies the phase is inverted.
  5. Comm Attempts – the number of attempts to communicate not including the use of a device as a repeater or agent. During commissioning, this value is only incremented after the SmartServer attempts to use a given agent/target pair.  It is not incremented while trying to discover viable agents.  The value for a device is cleared when the device is successfully commissioned.
  6. Comm Failures – the number of communication failures where a failure is a message that could not be delivered through any agent. During commissioning, this value is only incremented after the SmartServer attempts to use a given agent/target pair.  It is not incremented while trying to discover viable agents.  The value for a device is cleared when the device is successfully commissioned.
  7. Comm Agent Switch – the number of times a message was delivered after trying an alternate agent. During commissioning, this value is incremented each time the SmartServer attempts to commission a device with a different agent.  The value for a device is cleared when the device is successfully commissioned.
  8. Comm Skipped – the number of communication attempts that were skipped due to the destination device not being in the up state. During commissioning, this value is incremented each time the SmartServer finds an agent which can communicate with the target but rejects the agent due to invalid phase or insufficient margin.  The value for a device is cleared when the device is successfully commissioned.
  9. Failure History – a bit mask indicating the communication results for the last 24 hours, divided into 32 45-minute intervals. A 1 indicates that either at least one failure occurred during the interval, or that the device was down at the end of the interval.  The LSB has the most recent result. While the SmartServer is online, the bits in the failure history are automatically shifted at the end each 45-minute interval.
  10. Last Reading – not used.
  11. Function Pending – a bit array, one bit per function identifiers (LSB == function 0). For non-continuous functions, a 1 indicates the function is outstanding for this device (either has not run successfully or at all). For continuous functions, a 1 indicates that the device is enabled for the function.
  12. Agent – the handle of the agent for the device.
  13. Agent Primary Frequency – a 1 specifies the agent uses the primary frequency.
  14. State – the device state. The value can be Up, Down (not responding), Confirmed Down (not responding for duration exceeding down limit), Nascent (responds to messages using unique ID addressing but not to messages using subnet/node ID addressing), Wrong Key (could not commission using authentication key, Invalid Neuron, or Unknown (commissioning is scheduled but has not begun on this device).  A typical state transition for commissioning is as follows:  the device is created by the SmartServer in the Up state (because it’s a zero value), then almost immediately changes to the Unknown state since it is scheduled for commissioning.  When the commissioning function runs and the device does not have an assigned agent, the device is initialized into the ConfirmedDown state (if an agent is assigned then it is left in the Unknown state).  When commissioning completes successfully, the state changes to Up and the commissioning pending flag is cleared.  If commissioning fails, the device is placed in ConfirmedDown (indicating no agents found or device is not reachable), Wrong Key, or Invalid Neuron state.  A Down event is generated for the Wrong Key and Invalid Neuron states.
  15. Program ID – the LON program ID.
  16. Time Last Agent – the time an agent last reached this device.
  17. Last Time Delta – a signed value with the last measured amount of clock error.
  18. Last Error – the last non-zero cause code.
  19. Current Agent – the handle for an alternate agent. This agent may require fewer hops than the agent in the Agent   It also may reflect an agent change resulting from a temporary communication failure between the agent in the Agent property and this device.  An asterisk (“*”) is displayed after the current agent handle if the agent property does not match the current agent property or if there is a non-zero recommended agent and it does not match the current agent property.
  20. Current Agent Pri Freq – a 1 specifies the current agent uses the primary frequency.
  21. Inactive Phases – bit field indicating which phases on the device are configured to be inactive. Bit 0 indicates phase A is inactive if set; bit 1 indicates phase B is inactive if set; bit 2 indicates phase C is inactive if set; bit 7 indicates data is valid if set.
  22. Agent Log – a log with 10 entries. Each entry consists of a 16-bit agent handle, 4-bit primary signal margin, 4-bit primary signal strength, 4-bit secondary signal margin, 4-bit secondary signal strength, and a 16-bit failure history.  The 10 entries are followed by a 16-bit value for the next clear time represented as seconds since 00:00:00 1-Jan-2002.  The margin values are encoded as follows: 0: -6dB (worst or failed); 1: -3dB; 2: 0dB; 3: 3dB; 4: 6dB; 5: 9dB (marginal); 6: 12dB; 7: 15dB; 8: 18dB; 9: 21dB; 10: 24dB; 11: 27dB; 12: 30dB; 13: 33dB; 14: 36dB; and 15: 39dB (best).  The signal strength values are encoded as follows: 0: -84dB (worst or failed); 1: -78dB; 2: -72dB; 3: -66dB; 4: -60dB (marginal); 5: -54dB (marginal); 6: -48dB; 7: -42dB; 8: -36dB; 9: -30dB; 10: -24dB; 11: -18dB; 12: -12dB; 13: -6dB; 14: 0dB; and 15: 6dB (best).
  23. Hop Count – the number of hops required to reach the device. A hop represents a leg of transmission.  A device that is directly reachable from the SmartServer has a hop count of 1.  The SmartServer has a hop count of 0; other devices have a zero hop count only if the Agent property is zero.   The maximum value is 8 (6 repeaters and 1 agent).
  24. Reachability Flags – not used.
  25. Time Last Failure –reports the time of the most recent non-response from the device in a function other than the Find Agent or Priority Find Agent functions. Failures from Find Agent and Priority Find Agent are not tracked because they can normally occur while trying bad agents and do not reflect target failures.  The time is logged whenever the device’s Comm Failure count is incremented (but may continue to be logged even if the count has stopped due to reaching the limit).
  26. MEP Occupancy – not used.
  27. Status2 – Last 4 bytes of the last status reported by the device (see also Status).
  28. Auto Test Point – the value can be Not a Test Point, Automatic Test Point, Confirmed Test Point, or Removing.
  29. HW Config – not used.
  30. Phase Accuracy – indicates reliability of the phase measurement. A value of 0 indicates the best accuracy.  The larger the value, the worse the accuracy.
  31. IDI – the current IDI of the device.
  32. Agent Margin Detail – an array with 10 entries reporting the agent margin history for this device covering 12 two hour periods (0:00-2:00, 2:00-4:00, etc). The first byte has the 0:00-2:00 value, the second the 2:00-4:00 value and so on.  Within each byte, the LSN is the primary value and the MSN is the secondary value.  The margin values are encoded as described for the Agent Log. Each entry corresponds to one of the 10 entries in the Agent Log property.  An Agent Log entry may not correspond to the entry in the Agent Margin Detail if you read them at different times.
  33. Failed Function – a bit array, one bit per function identifiers. A 1 indicates that a failure occurred with this on the most recent function execution.
  34. Serial Number – not used.
  35. Local Meter – not used.
  36. Model Number – not used.
  37. Download Status – not used.
  38. Phase Rotation – not used.
  39. TS Handle – not used.
  40. LVGM Status – a bit array reporting the status of the device relative to the currently computer topology.
  41. Continuous Function Pending – a bit array with one bit per function identifiers (LSB == function 0). This property only applies to continuous functions and functions with an ID > 31. A 1 indicates the function is outstanding for this device (either has not run successfully or at all).
  42. Commission Status – a value of 0 indicates commissioning is pending; a value of 1 indicates commissioning failed; and a value of 2 indicates successful commissioning. The value is set to 0 if the device configuration is modified or the commission function is rescheduled.
  43. Commission Timestamp – reports the date and time the commission status was updated to success or failure. The value is set to 0 if the device configuration is modified or the commission function is rescheduled.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk