Close client sockets in case of exceptions
[remote/remote-mci.git] / doc / remote-device-add.7
blob038a14f4e1731a36bbad51da15e819236d5ed3dc
1 .\"     Title: remote-device-add
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4 .\"      Date: 05/18/2008
5 .\"    Manual: Re-Mote Testbed Framework
6 .\"    Source: remote-mci 2.0.git
7 .\"
8 .TH "REMOTE\-DEVICE\-ADD" "7" "05/18/2008" "remote\-mci 2\.0\.git" "Re\-Mote Testbed Framework"
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 remote-device-add - script for adding motes to the Re-Mote device hierarchy
15 .SH "SYNOPSIS"
16 /lib/udev/remote\-device\-add PLATFORM MOTEMAC MOTEPATH PROGRAMMER CONTROLLER
17 .sp
18 .SH "DESCRIPTION"
19 This script is designed to be called via a UDEV rule\'s RUN key\. It sets up extra information for added motes and notifies the motehost about new events\. It assumes that when a device is added the associated TTY has already been created\.
20 .sp
21 .SH "OPTIONS"
22 .PP
23 PLATFORM
24 .RS 4
25 The first argument is the name of the mote platform\.
26 .RE
27 .PP
28 MOTEMAC
29 .RS 4
30 The second argument is the mote MAC, part of which can often be with a well\-known vendor and product ID\.
31 .RE
32 .PP
33 MOTEPATH
34 .RS 4
35 The third is the desired device path, which should be a unique enough to fully describe the bus, where the mote is attached, but should be reproducable in such a way that the same device path should be used when reinserting the same mote into the same port\.
36 .RE
37 .PP
38 PROGRAMMER
39 .RS 4
40 The path to the mote flash programmer\.
41 .RE
42 .PP
43 CONTROLLER
44 .RS 4
45 The path to the external script for controlling the mote\.
46 .RE
47 .SH "ENVIRONMENT VARIABLES"
48 .PP
49 ACTION
50 .RS 4
51 This environment variable is set by UDEV\. Unless the value is "add" the script will exit\.
52 .RE
53 .SH "FILES"
54 .PP
55 /dev/remote/MOTEMAC/path
56 .RS 4
57 The physical UDEV device path (or similar) for the mote device with the given MAC address\. This file is created by this script using the MOTEPATH command line argument\.
58 .RE
59 .PP
60 /dev/remote/MOTEMAC/platform
61 .RS 4
62 This file contains the name of the mote platform and is created by this script using the MOTEPLATFORM command line argument\.
63 .RE
64 .PP
65 /dev/remote/MOTEMAC/programmer
66 .RS 4
67 Symlink to the mote flash programmer as specified via the PROGRAMMER option\. The symlink is created by this script\.
68 .RE
69 .PP
70 /dev/remote/MOTEMAC/controller
71 .RS 4
72 Symlink to the mote controller as specified via the CONTROLLER option\. The symlink is created by this script\. This option is relevant only for motes which need external script for their control\.
73 .RE
74 .PP
75 /dev/remote/MOTEMAC/tty/control, /dev/remote/MOTEMAC/tty/data
76 .RS 4
77 Symlink to the data and control tty devices that can be used for reading console output and controlling the mote with the given MAC address\. This should be set up using a UDEV rule containing the SYMLINK key\. This script assumes that the tty symlink exists when it is called\. If this is not the case it will error out\.
78 .RE
79 .SH "EXAMPLE"
80 As an example, the dig528\-2 and MicaZ UDEV rules use the following arguments:
81 .sp
82 .sp
83 .RS 4
84 .nf
85 /lib/udev/remote\-device\-add dig528\-2 0050C237%s{serial} %E{PHYSDEVPATH} /sbin/hc08sprg
86 /lib/udev/remote\-device\-add MicaZ 04036010%s{serial} %E{PHYSDEVPATH} /sbin/program\-mote\.sh /sbin/control\-mote\.sh
87 .fi
88 .RE
89 .SH "COPYRIGHT"
90 .sp
91 .RS 4
92 .nf
93 Copyright (c) 2007 Jonas Fonseca <fonseca@diku\.dk>
94 Copyright (c) 2008 Rostislav Spinar <rostislav\.spinar@cit\.ie>
95 .fi
96 .RE
97 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\.
98 .sp
99 .SH "SEE ALSO"
100 \fBremote\-device\-remove(7)\fR, \fBremote\-device\-name(7)\fR