Root/prod/doc/setup.hmac

Source at commit 8a70d4b2f3407fdf35e7e9603fb52281d8aaf535 created 12 years 10 months ago.
By Werner Almesberger, prod/doc/: converted setup.html, flash.html, and test.html to hmac
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<TITLE>Production and testing: Software setup</TITLE>
4<BODY bgcolor="#ffffff" link="#000000" vlink="#404040">
5
6<INCLUDE file="style.inc">
7
8<PAGE_BAR title="Production and testing">
9  <PAGE_CURR href="setup.html">Software setup</PAGE_CURR>
10  <PAGE_ITEM href="flash.html">Flashing</PAGE_ITEM>
11  <PAGE_ITEM href="test.html">Functional test</PAGE_ITEM>
12  <PAGE_ITEM href="analysis.html">Fault analysis</PAGE_ITEM>
13</PAGE_BAR>
14
15<SECTION_BAR>
16  <SECTION_ITEM href="#pcsw">PC software</SECTION_ITEM>
17  <SECTION_ITEM href="#bensw">Ben software</SECTION_ITEM>
18  <SECTION_ITEM href="#bensys">Ben system</SECTION_ITEM>
19  <SECTION_ITEM href="#profiles">Test profiles</SECTION_ITEM>
20</SECTION_BAR>
21
22<P>
23
24Before performing any production tests, various pieces of software
25need to be installed on Ben and PC, and configuration settings
26@@@
27
28
29<!-- ====================================================================== -->
30
31
32<SECTION ref="pcsw" title="PC software installation">
33
34@@@
35
36
37<!-- ---------------------------------------------------------------------- -->
38
39
40<SUBSECTION title="Install ben-wpan tools">
41
42@@@
43
44
45<!-- ---------------------------------------------------------------------- -->
46
47
48<SUBSECTION title="Install test scripts">
49
50@@@
51
52
53<!-- ---------------------------------------------------------------------- -->
54
55
56<SUBSECTION title="Install firmware binary">
57
58The binary of the application running on <B>atusb</B> is transferred from
59the PC. To download a pre-compiled version, use this command:
60
61<PRE>
62wget -O atusb.bin \
63     http://downloads.qi-hardware.com/people/werner/wpan/bindist/atusb-de72af351f661b538add81cbc9965278a2f8c40c.bin
64</PRE>
65
66Instructions for building the binary from sources are
67<A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb/fw/README">here</A>.
68
69
70<!-- ---------------------------------------------------------------------- -->
71
72
73<SUBSECTION title="Register Ben host name">
74
75To simplify accessing the Ben via TCP/IP, its IP address should be
76registered in the hosts file on the PC. If the Ben is running OpenWrt,
77use the following command:
78<PRE>
79echo 192.168.254.101 ben >>/etc/hosts
80</PRE>
81<P>
82If the Ben is running Jlime, the address would be as follows:
83<PRE>
84echo 192.168.1.202 ben >>/etc/hosts
85</PRE>
86<P>
87If using the same PC with Bens running OpenWrt and Jlime, one may choose
88different host names depending on the distribution, and adapt the commands
89used in the production and testing process accordingly. For example,
90<PRE>
91echo 192.168.254.101 ben >>/etc/hosts
92echo 192.168.1.202 jlime >>/etc/hosts
93</PRE>
94
95
96<!-- ---------------------------------------------------------------------- -->
97
98
99<SUBSECTION title="Customize test scripts">
100
101@@@
102
103
104<!-- ====================================================================== -->
105
106
107<SECTION ref="bensw" title="Ben software installation">
108
109@@@
110
111
112<!-- ---------------------------------------------------------------------- -->
113
114
115<SUBSECTION title="Password-less remote access">
116
117To enable password-less remote access from the PC, set up network
118access to the Ben and run the following command:
119<PRE>
120ssh ben 'cat >>/etc/dropbear/authorized_keys' <~/.ssh/id_rsa.pub
121</PRE>
122
123
124<!-- ---------------------------------------------------------------------- -->
125
126
127<SUBSECTION title="Install ben-wpan tools">
128
129@@@
130
131
132<!-- ---------------------------------------------------------------------- -->
133
134
135<SUBSECTION title="Install avrdude">
136
137The <B>atusb</B> boot loader is flashed using <B>avrdude</B>. A pre-compiled
138static binary (suitable for OpenWrt and Jlime) can be installed by running
139the following two command on the Ben:
140
141<PRE>
142wget http://downloads.qi-hardware.com/people/werner/wpan/bindist/avrdude-5.10-de72af351f661b538add81cbc9965278a2f8c40c.tar.gz
143tar -xz -C / -f avrdude-5.10-de72af351f661b538add81cbc9965278a2f8c40c.tar.gz
144</PRE>
145
146Instructions for building <B>avrdude</B> from sources are
147<A href="http://projects.qi-hardware.com/index.php/p/ben-blinkenlights/source/tree/master/avrdude/README
148">here</A>.
149
150
151
152<!-- ---------------------------------------------------------------------- -->
153
154
155<SUBSECTION title="Install boot-loader binary">
156
157The binary of the boot loader running on <B>atusb</B> is transferred from
158the Ben. To download a pre-compiled version, use this command:
159
160<PRE>
161wget -O boot.hex \
162   http://downloads.qi-hardware.com/people/werner/wpan/bindist/boot-de72af351f661b538add81cbc9965278a2f8c40c.hex
163</PRE>
164
165Instructions for building the binary from sources are
166<A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb/fw/README">here</A>.
167
168
169<!-- ====================================================================== -->
170
171
172<SECTION ref="bensys" title="Ben system setup">
173
174The configuration setting described in this section are lost on each
175reset or reboot and either need to be entered again. Alternatively,
176a setup script running at boot time can be written.
177
178
179<!-- ---------------------------------------------------------------------- -->
180
181
182<SUBSECTION title="Enable network access">
183
184Once the Ben has booted and started USB networking, the interface
185on the PC side is configured as follows:
186<PRE>
187ifconfig usb0 192.168.254.100 up
188</PRE>
189<P>
190These are the settings for OpenWrt, assuming the network device is
191called "usb0". If using Jlime, the command would be as follows:
192<PRE>
193ifconfig usb0 192.168.1.200 up
194</PRE>
195
196
197<!-- ---------------------------------------------------------------------- -->
198
199
200<SUBSECTION title="Silence other 8:10 card users">
201
202Before running any of the ben-wpan utilities, other users of the 8:10
203card slot have to be disabled. In a Ben running the regular OpenWrt or
204Jlime distribution, the only such user that is automatically started
205is the MMC kernel driver. The following command disables it:
206<PRE>
207echo jz4740-mmc.0 >/sys/bus/platform/drivers/jz4740-mmc/unbind
208</PRE>
209<P>
210If a WPAN-enabled kernel has been installed, the AT86RF230 driver takes
211the place of the MMC driver. To disable it, run
212<PRE>
213echo spi2.0 >/sys/bus/spi/drivers/at86rf230/unbind
214</PRE>
215
216
217<!-- ---------------------------------------------------------------------- -->
218
219
220<SUBSECTION title="Start atrf-proxy">
221
222On the Ben, launch the proxy daemon. We pass the option -b to background it:
223<PRE>
224atrf-proxy -b
225</PRE>
226
227
228<!-- ====================================================================== -->
229
230
231<SECTION ref="profiles" title="Test profiles">
232
233Some of the functional tests measure characteristics that are strongly
234influenced by the test setup. It is therefore not possible to provide
235universally applicable reference values, but they have to be measured
236in the actual test environment.
237
238
239<!-- ---------------------------------------------------------------------- -->
240
241
242<SUBSECTION title="Clock count (atben only)">
243
244Insert a known to be good <B>atben</B> board and run the following
245command directly on the Ben to record the reference value for the
246clock count with an accuracy of about +/&minus;20 ppm:
247<PRE>
248atrf-xtal 1000 >ben.xtal
249</PRE>
250<P>
251This takes about 5 seconds.
252<P>
253Note that the result depends on the tolerance of the crystal in the Ben
254and is also affected by temperature. Good accuracy can therefore
255only be obtained if this measurement is performed individually on each
256Ben, and if a stable temperature is maintained.
257
258
259<!-- ---------------------------------------------------------------------- -->
260
261
262<SUBSECTION title="Signal strength">
263
264@@@
265
266
267<P>
268<HR>
269Last update: 2011-05-27&nbsp;&nbsp;<I>Werner Almesberger</I>
270<HR>
271</BODY>
272</HTML>
273

Archive Download this file



interactive