1 -----------------------------------------------------------------------------
3 -----------------------------------------------------------------------------
5 ReĀ·Mote Command Line Tools
7 The tools can be used for testing both an installed webapp, but also for
8 testing whether the client bindings work properly.
10 To use the tools first run <<<<mvn package>>> after which the tools jar
11 archive can be found in <<<target/remote-cli.jar>>>. To run a command
14 +----------------------------------------------------------------------------+
15 $ java -jar target/remote-cli.jar ls-motes
16 +----------------------------------------------------------------------------+
18 Below a list of the tools provided by this project is given.
20 %{toc|section=1|fromDepth=1|toDepth=2}
22 Examples assume that you have set up an alias named <<<remote-cli>>> for
23 the command <<<java -jar target/remote-cli.jar>>>. For bash this can be
24 done by adding the following line to your <<<~/.bashrc>>> file:
26 +----------------------------------------------------------------------------+
27 alias remote-cli='java -jar target/remote-cli.jar'
28 +----------------------------------------------------------------------------+
30 For other shells, see their respective documentation.
32 All commands can be configured via a Java properties file. By default the
33 file is loaded from the <<<.remote-cli/default.properties>>> file in the
34 users home directory (as configured via the Java system property value
35 "<<<user.home>>>"). Another configuration file can be give using the
36 <<<-f>>> or <<<-config>>> option. Instead of a file, it is also possible to
37 give a configuration name which will be resolved to the "<name>.properties"
38 file in the above <<<.remote-cli>>> directory, or if not found to a remote
39 URL. Some sample properties:
41 +----------------------------------------------------------------------------+
42 # Mote control client server host.
43 mcs.host=testbed.ekstranet.diku.dk
44 # Mote control client server port.
46 # Location of the Axis web services.
47 axis.location=http://testbed.ekstranet.diku.dk:8080/axis/services/
48 # Credentials for authentication (use the ls-auth tool to get type and name)
49 authentication.0.type=name
50 authentication.0.name=Project
51 authentication.0.value=admin
52 authentication.1.type=name
53 authentication.1.name=User
54 authentication.1.value=admin
55 authentication.2.type=password
56 authentication.2.name=Password
57 authentication.2.value=secret
58 +----------------------------------------------------------------------------+
62 <<Synopsis:>> remote-cli [--help]
64 List the available subcommands with both a usage synopsis and a small
67 * {Show mote data for a testbed server}
69 <<Synopsis:>> remote-cli ls-motes [options]
71 Lists the information from the mote data webservice by dumping
72 both the data description header and the mote data to stdout.
76 +----------------------------------------------------------------------------+
78 +----------------------------------------------------------------------------+
80 * {Show authentication entries for a testbed server}
82 <<Synopsis:>> remote-cli ls-auth [options]
84 The command lists the authentication callback information from the
85 authentication service by dumping the callback label and help message
90 +----------------------------------------------------------------------------+
92 +----------------------------------------------------------------------------+
94 * {Log into a testbed}
96 <<Synopsis:>> remote-cli login [options]
98 Perform the login procedure for the testbed server. Credentials will be
99 queried on the console.
103 +----------------------------------------------------------------------------+
104 $ remote-cli login [options]
105 +----------------------------------------------------------------------------+
107 * {Get mote privileges}
109 <<Synopsis:>> remote-cli mote-priv [options] moteid
111 Request privileges for a mote on a testbed server. Before requesting
112 privileges the login procedure will be performed.
114 Example, where 9 is the mote ID:
116 +----------------------------------------------------------------------------+
117 $ remote-cli mote-priv 9
118 +----------------------------------------------------------------------------+
120 * {Load and execute mote program}
122 <<Synopsis:>> remote-cli mote-exec [options] moteid program
124 Programs a mote using path to local binary and starts the mote afterwards
125 to execute the program.
129 +----------------------------------------------------------------------------+
130 $ remote-cli mote-exec 9 /path/to/program/binary.s19
131 +----------------------------------------------------------------------------+
135 <<Synopsis:>> remote-cli run-script [options] script [arguments]
137 Runs a script in a file passing any additional arguments to the script via
138 a global <<<args>>> variable. The command can be accessed as the variable
139 <<<command>>>. The extension of the script determines what scripting engine
140 is used. By default, only the javascript language is supported.
144 +----------------------------------------------------------------------------+
145 $ remote-cli run-script mote-exec.js 9 /path/to/program/binary.s19
146 +----------------------------------------------------------------------------+