IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Git Source Tree
Root/
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 | |
24 | Before performing any production tests, various pieces of software |
25 | need 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 | |
58 | The binary of the application running on <B>atusb</B> is transferred from |
59 | the PC. To download a pre-compiled version, use this command: |
60 | |
61 | <PRE> |
62 | wget -O atusb.bin \ |
63 | http://downloads.qi-hardware.com/people/werner/wpan/bindist/atusb-de72af351f661b538add81cbc9965278a2f8c40c.bin |
64 | </PRE> |
65 | |
66 | Instructions 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 | |
75 | To simplify accessing the Ben via TCP/IP, its IP address should be |
76 | registered in the hosts file on the PC. If the Ben is running OpenWrt, |
77 | use the following command: |
78 | <PRE> |
79 | echo 192.168.254.101 ben >>/etc/hosts |
80 | </PRE> |
81 | <P> |
82 | If the Ben is running Jlime, the address would be as follows: |
83 | <PRE> |
84 | echo 192.168.1.202 ben >>/etc/hosts |
85 | </PRE> |
86 | <P> |
87 | If using the same PC with Bens running OpenWrt and Jlime, one may choose |
88 | different host names depending on the distribution, and adapt the commands |
89 | used in the production and testing process accordingly. For example, |
90 | <PRE> |
91 | echo 192.168.254.101 ben >>/etc/hosts |
92 | echo 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 | |
117 | To enable password-less remote access from the PC, set up network |
118 | access to the Ben and run the following command: |
119 | <PRE> |
120 | ssh 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 | |
137 | The <B>atusb</B> boot loader is flashed using <B>avrdude</B>. A pre-compiled |
138 | static binary (suitable for OpenWrt and Jlime) can be installed by running |
139 | the following two command on the Ben: |
140 | |
141 | <PRE> |
142 | wget http://downloads.qi-hardware.com/people/werner/wpan/bindist/avrdude-5.10-de72af351f661b538add81cbc9965278a2f8c40c.tar.gz |
143 | tar -xz -C / -f avrdude-5.10-de72af351f661b538add81cbc9965278a2f8c40c.tar.gz |
144 | </PRE> |
145 | |
146 | Instructions 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 | |
157 | The binary of the boot loader running on <B>atusb</B> is transferred from |
158 | the Ben. To download a pre-compiled version, use this command: |
159 | |
160 | <PRE> |
161 | wget -O boot.hex \ |
162 | http://downloads.qi-hardware.com/people/werner/wpan/bindist/boot-de72af351f661b538add81cbc9965278a2f8c40c.hex |
163 | </PRE> |
164 | |
165 | Instructions 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 | |
174 | The configuration setting described in this section are lost on each |
175 | reset or reboot and either need to be entered again. Alternatively, |
176 | a setup script running at boot time can be written. |
177 | |
178 | |
179 | <!-- ---------------------------------------------------------------------- --> |
180 | |
181 | |
182 | <SUBSECTION title="Enable network access"> |
183 | |
184 | Once the Ben has booted and started USB networking, the interface |
185 | on the PC side is configured as follows: |
186 | <PRE> |
187 | ifconfig usb0 192.168.254.100 up |
188 | </PRE> |
189 | <P> |
190 | These are the settings for OpenWrt, assuming the network device is |
191 | called "usb0". If using Jlime, the command would be as follows: |
192 | <PRE> |
193 | ifconfig usb0 192.168.1.200 up |
194 | </PRE> |
195 | |
196 | |
197 | <!-- ---------------------------------------------------------------------- --> |
198 | |
199 | |
200 | <SUBSECTION title="Silence other 8:10 card users"> |
201 | |
202 | Before running any of the ben-wpan utilities, other users of the 8:10 |
203 | card slot have to be disabled. In a Ben running the regular OpenWrt or |
204 | Jlime distribution, the only such user that is automatically started |
205 | is the MMC kernel driver. The following command disables it: |
206 | <PRE> |
207 | echo jz4740-mmc.0 >/sys/bus/platform/drivers/jz4740-mmc/unbind |
208 | </PRE> |
209 | <P> |
210 | If a WPAN-enabled kernel has been installed, the AT86RF230 driver takes |
211 | the place of the MMC driver. To disable it, run |
212 | <PRE> |
213 | echo spi2.0 >/sys/bus/spi/drivers/at86rf230/unbind |
214 | </PRE> |
215 | |
216 | |
217 | <!-- ---------------------------------------------------------------------- --> |
218 | |
219 | |
220 | <SUBSECTION title="Start atrf-proxy"> |
221 | |
222 | On the Ben, launch the proxy daemon. We pass the option -b to background it: |
223 | <PRE> |
224 | atrf-proxy -b |
225 | </PRE> |
226 | |
227 | |
228 | <!-- ====================================================================== --> |
229 | |
230 | |
231 | <SECTION ref="profiles" title="Test profiles"> |
232 | |
233 | Some of the functional tests measure characteristics that are strongly |
234 | influenced by the test setup. It is therefore not possible to provide |
235 | universally applicable reference values, but they have to be measured |
236 | in the actual test environment. |
237 | |
238 | |
239 | <!-- ---------------------------------------------------------------------- --> |
240 | |
241 | |
242 | <SUBSECTION title="Clock count (atben only)"> |
243 | |
244 | Insert a known to be good <B>atben</B> board and run the following |
245 | command directly on the Ben to record the reference value for the |
246 | clock count with an accuracy of about +/−20 ppm: |
247 | <PRE> |
248 | atrf-xtal 1000 >ben.xtal |
249 | </PRE> |
250 | <P> |
251 | This takes about 5 seconds. |
252 | <P> |
253 | Note that the result depends on the tolerance of the crystal in the Ben |
254 | and is also affected by temperature. Good accuracy can therefore |
255 | only be obtained if this measurement is performed individually on each |
256 | Ben, 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> |
269 | Last update: 2011-05-27 <I>Werner Almesberger</I> |
270 | <HR> |
271 | </BODY> |
272 | </HTML> |
273 |