SmartMesh IP Embedded Manager CLI Guide - Analog

Transcription

SmartMesh IP EmbeddedManager CLI GuideSmartMesh IP Embedded Manager CLI GuidePage 1 of 77

Table of Contents1 About This Guide 41.1Related Documents 41.2Conventions Used 61.3Revision History 82 Introduction 92.1CLI Access 92.1.1Login/Logout 92.1.2Managing user and viewer Passwords 102.1.3Mote Commands 103 Commands 113.1delete acl 113.2delete mote 123.3exec clearStat 133.4exec exchJoinKey 143.5exec exchNetId 153.6exec restore 163.7exec setAdv 173.8exec setDnFrame 183.9exec sendData 193.10 exec start 203.11 help 213.12 log 223.13 login 233.14 logout 243.15 onechan 253.16 ping 263.17 radiotest 273.17.1 radiotest on/off 273.17.2 radiotest tx 283.17.3 radiotest rx 303.17.4 radiotest stat 313.18 reset 323.19 set acl 333.20 set config 343.21 seti 363.22 show 373.22.1 show acl 393.22.2 show config & show curconfig 403.22.3 show mac 41SmartMesh IP Embedded Manager CLI GuidePage 2 of 77

3.22.4 show mote 423.22.5 show motever 443.22.6 show path 453.22.7 show stat 463.22.8 show status 483.22.9 show time 503.22.10 show trace 513.22.11 show ver 523.23 showi 533.24 sm 543.25 su 553.26 trace 563.26.1 trace bw 583.26.2 trace fa 593.26.3 trace glbcmd 603.26.4 trace io (reserved) 613.26.5 trace iodata (reserved) 623.26.6 trace link 633.26.7 trace loop 643.26.8 trace monitor 653.26.9 trace motest 663.26.10 trace netmode 673.26.11 trace opt 683.26.12 trace power 693.26.13 trace rawio enc (reserved) 703.26.14 trace route 713.26.15 trace spl task & trace spl ack (reserved) 723.26.16 trace stats 733.26.17 trace timeout 743.26.18 trace tplglock (reserved) 75SmartMesh IP Embedded Manager CLI GuidePage 3 of 77

1 About This Guide1.1 Related DocumentsThe following documents are available for the SmartMesh IP network:Getting Started with a Starter KitSmartMesh IP Easy Start Guide - walks you through basic installation and a few tests to make sure your network isworkingSmartMesh IP Tools Guide - the Installation section contains instructions for installing the serial drivers and exampleprograms used in the Easy Start Guide and other tutorials.User's GuideSmartMesh IP User's Guide - describes network concepts, and discusses how to drive mote and manager APIs toperform specific tasks, e.g. to send data or collect statistics. This document provides context for the API guides.Interfaces for Interaction with a DeviceSmartMesh IP Manager CLI Guide - used for human interaction with a Manager (e.g. during development of a client,or for troubleshooting). This document covers connecting to the CLI and its command set.SmartMesh IP Manager API Guide - used for programmatic interaction with a manager. This document coversconnecting to the API and its command set.SmartMesh IP Mote CLI Guide - used for human interaction with a mote (e.g. during development of a sensorapplication, or for troubleshooting). This document covers connecting to the CLI and its command set.SmartMesh IP Mote API Guide - used for programmatic interaction with a mote. This document covers connecting tothe API and its command set.Software Development ToolsSmartMesh IP Tools Guide - describes the various evaluation and development support tools included in theSmartMesh SDK , including tools for exercising mote and manager APIs and visualizing the network.Application NotesSmartMesh IP Application Notes - Cover a wide range of topics specific to SmartMesh IP networks and topics thatapply to SmartMesh networks in general.Documents Useful When Starting a New DesignThe Datasheet for the LTC5800-IPM SoC, or one of the modules based on it.The Datasheet for the LTC5800-IPR SoC, or one of the embedded managers based on it.SmartMesh IP Embedded Manager CLI GuidePage 4 of 77

A Hardware Integration Guide for the mote/manager SoC or module - this discusses best practices for integrating theSoC or module into your design.A Hardware Integration Guide for the embedded manager - this discusses best practices for integrating the embeddedmanager into your design.A Board Specific Integration Guide - For SoC motes and Managers. Discusses how to set default IO configuration andcrystal calibration information via a "fuse table".Hardware Integration Application Notes - contains an SoC design checklist, antenna selection guide, etc.The ESP Programmer Guide - a guide to the DC9010 Programmer Board and ESP software used to load firmware on adevice.ESP software - used to program firmware images onto a mote or module.Fuse Table software - used to construct the fuse table as discussed in the Board Specific Configuration Guide.Other Useful DocumentsA glossary of wireless networking terms used in SmartMesh documentation can be found in the SmartMesh IP User'sGuideA list of Frequently Asked QuestionsSmartMesh IP Embedded Manager CLI GuidePage 5 of 77

1.2 Conventions UsedThe following conventions are used in this document:Computer type indicates information that you enter, such as specifying a URL.Bold type indicates buttons, fields, menu commands, and device states and modes.Italic type is used to introduce a new term, and to refer to APIs and their parameters.Tips provide useful information about the product.Informational text provides additional information for background and contextNotes provide more detailed information about concepts.Warning! Warnings advise you about actions that may cause loss of data, physical harm to the hardware or yourperson.code blocks display examples of codeThe CLI commands are described using the following notations and terminology: Indicates alternatives for a field. For example, moteId # MAC indicates that you can specify a mote by its mote ID or MAC address. Indicates a required field.{}Indicates a group of fields.[]Indicates an optional field.SmartMesh IP Embedded Manager CLI GuidePage 6 of 77

MACWhen specifying a MAC address, do not use spaces. You may omit leading zeros and hyphens. In cases where theaddress command syntax allows either the MAC address or mote ID to be specified, the MAC address must be precededby the # symbol.The following examples are all martMesh IP Embedded Manager CLI GuidePage 7 of 77

1.3 Revision HistoryRevision DateDescription107/17/2012 Initial Release208/10/2012 Updated radiotest tx command303/18/2013 Numerous small changes410/22/2013 Minor corrections504/04/2014 Updated and clarified radiotest commands;610/28/2014 Clarified show motever command; Other minor changes704/22/2015 Deprecated autostart command; Other minor changes812/03/2015 Deprecated software licencing commands; Added show memory command; Renamed guide tofocus on embedded manager911/07/2016 Updated delete and set config commands; Added show mac and exec start commandsSmartMesh IP Embedded Manager CLI GuidePage 8 of 77

2 IntroductionThis guide describes the commands that you can send to a SmartMesh IP Manager by logging on to its Command LineInterface (CLI). The CLI is available by connecting a serial terminal program to the Manager. The CLI is intended for humaninteraction with a manager, e.g. during development, or for interactive troubleshooting. Most commands are atomic - acommand and its arguments are typed into the CLI, and a response is returned. For example, the help command returns alist of possible commands. Traces are not atomic - once started, they generate output asynchronously until cancelled.For a machine-to-machine communications (e.g. a host program talking to the manager), the Application ProgrammingInterface (API) is used. See the SmartMesh IP Manager API Guide for details on that interface.2.1 CLI AccessThere are two dedicated serial ports on the SmartMesh IP manager: one is for API communication with an externalapplication, and the other is dedicated to this command line interface.You can log on to the CLI from any serial terminal program (such as HyperTerminal or Tera Term):Serial 0 — If connecting to an evaluation board integrated with an FTDI serial-to-usb interface, the CLI will be foundon the 3rd COM port mapped onto your system.The default serial port settings are 9600 baud, 8 data bits, No parity, 1 stop bit, no flow control.2.1.1 Login/LogoutThere are two sets of privileges on this system, namely user and viewer. The user privilege allows for system settings to beset and the viewer privilege only allows the viewing of manager and network information.To login to the manager CLI from the terminal program enter either of the following usernames and passwords:login viewerlogin userTo logout of the Manager CLI:logoutSmartMesh IP Embedded Manager CLI GuidePage 9 of 77

2.1.2 Managing user and viewer PasswordsThe default passwords should be changed with the following commands (after logging in with "user" privileges):set config pwdviewer newpassword set config pwduser newpassword 2.1.3 Mote CommandsCommands beginning with an 'm' such as mtrace or minfo are specific to the Access Point "mote" and are described in theSmartMesh IP Mote CLI Guide documentation.SmartMesh IP Embedded Manager CLI GuidePage 10 of 77

3 CommandsThis manual describes the CLI commands available in the SmartMesh IP manager. The CLI is case-insensitive. In most casesa command will be recognized by the shortest unambiguous string, so the following are all equivalent: trace rawio enc on trace rawio on trace raw on3.1 delete aclDescriptionThe delete acl command removes a mote's entry in the access control list (ACL), clearing the mote's join key and joincounter. Deleting a mote from the ACL prevents the mote from joining the network, or rejoining if the mote is already in thenetwork. It does not force a mote to leave the network. If all motes are deleted from the ACL, the system reverts to using acommon join key. This change is persistent.Syntaxdelete acl macAddress all ParametersParameterDescriptionmacAddress MAC address of the mote or 'all'Exampledelete acl 00-17-0D-00-00-38-00-21delete acl allSmartMesh IP Embedded Manager CLI GuidePage 11 of 77

3.2 delete moteDescriptionDelete a mote from the manager. This command will not remove an operational mote from the network. It is merely intendedas a way to remove it from the list of motes known to the manager. Note that you can only delete a mote from the network ifthe mote is in the Lost or Idle state, or was used as a Blink mote. This change is persistent.This command should be used to clear a mote's join counter in the event that it is completely reflashed. Failure to do so willprevent a mote from joining the network until the join counter matches. The same applies to blink packets when using thatmode, none will be delivered until the join counter matches.Syntaxdelete mote moteId mac ParametersParameterDescriptionmoteId mac ID or mac address of the mote to be deleted from the network.Exampledelete mote 2delete mote 00-17-0D-00-00-60-06-11SmartMesh IP Embedded Manager CLI GuidePage 12 of 77

3.3 exec clearStatDescriptionClear all network statistics.Syntaxexec clearStatParametersParameter DescriptionExampleexec clearStatSmartMesh IP Embedded Manager CLI GuidePage 13 of 77

3.4 exec exchJoinKeyDescriptionReplace the join key for a specified mote. The message is sent to the mote and is also changed in the ACL. This change ispersistent.Syntaxexec exchJoinKey address joinKey ParametersParameter DescriptionaddressMote ID or MAC address of mote to be changedjoinKey16-byte join keyExampleexec exchJoinKey 00-17-0D-00-00-38-00-21 000102030405060708090A0B0C0D0E0FSmartMesh IP Embedded Manager CLI GuidePage 14 of 77

3.5 exec exchNetIdDescriptionExchange the Network ID. This command will change the Network ID of the manager and all motes connected to the network.The new Network ID takes effect the next time the network is restarted. Network IDs 0 and 65535 are reserved and should notbe used. This change is persistent.Syntaxexec exchNetId netId ParametersParameter DescriptionnetIdInteger between 1 and 65534Exampleexec exchNetId 100SmartMesh IP Embedded Manager CLI GuidePage 15 of 77

3.6 exec restoreDescriptionRestores all factory default settings. This change is persistent.For Manager versions 1.3.0 that required a license, the license used to enable optional features is preserved during a restore.Syntaxexec restoreParametersParameter DescriptionExampleexec restoreSmartMesh IP Embedded Manager CLI GuidePage 16 of 77

3.7 exec setAdvDescriptionThis command controls advertising in the network. Setting to off turns off all advertisements and saves the most power, butmotes will not be able to hear and join the network in this state. Setting to on turns on advertisements to allow motes to jointhe network.It is dangerous to turn off advertising in the network. When advertising is off, new motes can not join and existingmotes can not rejoin the network after a reset. Turning off advertising may be useful in unusual situations, such asto prevent motes from joining the network or to save power. In most cases, it is best to allow advertising to remainunder the control of the manager.Syntaxexec setAdv on off ParametersParameter Descriptionstateon turn on advertisements, off turn off advertisementsExampleexec setAdv onSmartMesh IP Embedded Manager CLI GuidePage 17 of 77

3.8 exec setDnFrameDescriptionChange the downstream superframe size. This is only valid when running a network with the downstream superframemultiplier configuration parameter (dnfr mult) set to either 2 or 4. This command will turn that multiplier on (normal), or off(fast). Using this command disables the automatic switching of superframe size after the network has formed. As an example,if the starting frame size for the network is 256 slots and dnfr mult is set to 4, then changing to 'normal' multiplies thesupeframe by 4 to a 1024-slot superframe.Syntaxexec setDnFrame mode ParametersParameter Descriptionmode'fast' or 'normal'Exampleexec setDnFrame normalSmartMesh IP Embedded Manager CLI GuidePage 18 of 77

3.9 exec sendDataDescriptionSend packet with specified payload to a mote. This CLI command is equivalent to invoking API command sendData.Syntaxexec sendData destination srcPort destPort priority payload ParametersParameter Descriptiondestination Destination of the packet. Can be specified as either Mote ID or MAC addresssrcPortUDP source port of the packetdestPortUDP destination port of the packetpriorityPriority of the packet. 0(low)-2(high)payloadPayload bytes of the packet, in hex. Maximum size of payload is 40 bytesExampleSend packet to Mote ID 2, source port 20, destination port 20, priority 1, payload bytes "0x11,0x22,0x33,0x44,0x55":exec sendData 2 20 20 1 1122334455SmartMesh IP Embedded Manager CLI GuidePage 19 of 77

3.10 ex

SmartMesh IP Embedded Manager CLI Guide Page 7 of 77 MAC address When specifying a MAC address, do not use spaces. You may omit leading zeros and hyphens. In cases where the command syntax allows either the MAC address or mote ID to be specified, the MAC address must be preceded by the