Close client sockets in case of exceptions
[remote/remote-mci.git] / doc / remote-mch.1.txt
blob43a8581aea6c72025d52e81a2500c9dcc390bc0b
1 REMOTE-MCH(1)
2 =============
4 NAME
5 ----
6 remote-mch - Re-Mote mote control host
8 SYNOPSIS
9 --------
10 remote-mch [options]
12 DESCRIPTION
13 -----------
14 The mote control host manages mote devices and provides remote access to them
15 through a mote control server. On startup the mote host connects to the server
16 and listens for incoming requests. Requests allows motes to be programmed,
17 started, stopped, and reset. All console output from motes are forwarded to
18 the server.
20 The mote control host may be run both in the foreground and as a daemon.
22 OPTIONS
23 -------
24 The following options are only usable on the command line.
26 --config=<path>::
28         Path to the configuration file. Defaults to "/etc/remote-mch.cfg".
30 --help::
32         Print usage help and exit.
34 --version::
36         Print version info and exit.
38 Configuration options
39 ~~~~~~~~~~~~~~~~~~~~~
40 In addition, to the above options the mote host accepts the following
41 configuration options that can be specified either on the command line or in
42 the configuration file. An option set in the configuration file overrides
43 any option set on the command line.
45 On the command line use: '--' <name> '=' <value>, e.g. '--devicePath=/here'.
46 In the config file use: <name> '=' <value>, e.g. 'devicePath=/here'. For
47 boolean options the '=' and value may be left out to set the value to true.
48 See the example sections for more information.
50 devicePath <string>::
52         Path to the mote device hierarchy.
53         When not specified "/dev/remote/" is used.
55 eventPipe <string>::
57         Path to the fifo notifying the mote host of mote hotplug events.
58         By default the daemon listens on "/var/run/motehost.events".
60 serverHost <string>::
62         DNS or IP address of the mote server.
63         Default is localhost.
65 serverPort <number>::
67         Port number to use for connecting to the mote server.
68         The default port is 10001.
70 retryInterval <number>::
72         Number of seconds to wait between server connection retries.
73         Default is 30 seconds.
75 daemonize <boolean>::
77         Whether or not to run in the background as a daemon.
78         The default is to not run as a daemon.
80 FILES
81 -----
82 The mote host uses the following configurable files.
84 /etc/remote-mch.cfg::
86         Default configuration file read on startup.
88 /var/run/motehost.events::
90         Default file for listening on mote events.
92 Mote device files
93 ~~~~~~~~~~~~~~~~~
95 For each mote managed by the mote host, the following device specific files
96 are used. The device path is configurable (default: "/dev/remote"). MOTEMAC
97 represents the MAC address of a mote.
99 /dev/remote/MOTEMAC/programmer::
101         Symbolic link to the mote programmer. The programmer is called
102         with the TTY as the first argument and path to the image file
103         as the second argument.
105 /dev/remote/MOTEMAC/controller::
107         Symbolic link to the mote control program.
109 /dev/remote/MOTEMAC/tty/control::
111         Symbolic link to the mote control TTY.
113 /dev/remote/MOTEMAC/tty/data::
115         Symbolic link to the mote data TTY.
117 /dev/remote/MOTEMAC/image::
119         Temporary image file used when programming.
121 /dev/remote/MOTEMAC/path::
123         File containing the mote device path in the form of a path specifying
124         the bus ID. E.g. "/devices/pci0000:00/0000:00:10.0/usb2/2-1".
126 /dev/remote/MOTEMAC/platform::
128         File containing the name of the mote platform. E.g. "dig528-2".
130 ENVIRONMENT VARIABLES
131 ---------------------
132 The mote host does not use any externally defined environment variables. When
133 invoking the programmer and controller commands the mote host sets the
134 following environment variables.
136 platform::
138         The mote platform, e.g. "MicaZ".
140 macaddress::
142         The mote MAC address.
144 tosaddress::
146         The mote TOS address.
148 EXAMPLES
149 --------
151 Using configuration options on the command line::
153         If you only need to override the default values for the server host
154         and port and don't want to use a configuration file, specify all
155         option on the command line.
157         $ remote-mch --serverHost=my.server.tld --serverPort=10001 --daemonize
159 A simple configuration file::
161         The following configuration file sets the same values as the above
162         example.
164         # MCS location
165         serverHost=my.server.tld
166         serverPort=10001
167         # Run in the background
168         daemonize
170 COPYRIGHT
171 ---------
172 [verse]
173 Copyright (c) 2005-2006 Esben Zeuthen <zept@diku.dk>
174 Copyright (c) 2006-2008 Jonas Fonseca <fonseca@diku.dk>
175 Copyright (c) 2007-2008 Rosta Spinarr <rostislav.spinar@cit.ie>
177 This program is free software; you can redistribute it and/or modify
178 it under the terms of the GNU General Public License as published by
179 the Free Software Foundation; either version 2 of the License, or
180 (at your option) any later version.
182 SEE ALSO
183 --------
184 remote-mcs(1),
185 remote-device-add(7),
186 remote-device-remove(7),
187 remote-device-name(7)
189 This program is part of http://remote-testbed.googlecode.com/[the Re-Mote Testbed Framework].