2011-05-27 13:02:41 +03:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2011-05-18 20:25:54 +03:00
|
|
|
<HTML>
|
2011-05-27 13:02:41 +03:00
|
|
|
<TITLE>Production and testing: Software setup</TITLE>
|
|
|
|
<BODY bgcolor="#ffffff" link="#000000" vlink="#404040">
|
|
|
|
|
|
|
|
<INCLUDE file="style.inc">
|
|
|
|
|
|
|
|
<PAGE_BAR title="Production and testing">
|
|
|
|
<PAGE_CURR href="setup.html">Software setup</PAGE_CURR>
|
|
|
|
<PAGE_ITEM href="flash.html">Flashing</PAGE_ITEM>
|
|
|
|
<PAGE_ITEM href="test.html">Functional test</PAGE_ITEM>
|
|
|
|
<PAGE_ITEM href="analysis.html">Fault analysis</PAGE_ITEM>
|
|
|
|
</PAGE_BAR>
|
|
|
|
|
|
|
|
<SECTION_BAR>
|
2011-05-27 16:45:42 +03:00
|
|
|
<SECTION_ITEM href="#intro">Introduction</SECTION_ITEM>
|
2011-05-27 16:40:57 +03:00
|
|
|
<SECTION_ITEM href="#pcsw">PC installation</SECTION_ITEM>
|
|
|
|
<SECTION_ITEM href="#bensw">Ben installation</SECTION_ITEM>
|
|
|
|
<SECTION_ITEM href="#bensys">Ben setup</SECTION_ITEM>
|
2011-05-27 13:02:41 +03:00
|
|
|
<SECTION_ITEM href="#profiles">Test profiles</SECTION_ITEM>
|
|
|
|
</SECTION_BAR>
|
|
|
|
|
2011-05-27 16:45:42 +03:00
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
|
|
|
|
<SECTION ref="intro" title="Introduction">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
Before performing any production tests, various pieces of software
|
|
|
|
need to be installed on Ben and PC, and configuration settings
|
|
|
|
@@@
|
|
|
|
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
<!-- ====================================================================== -->
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SECTION ref="pcsw" title="PC software installation">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
@@@
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Install ben-wpan tools">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
@@@
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Install test scripts">
|
2011-05-20 00:59:29 +03:00
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Install firmware binary">
|
2011-05-23 01:38:26 +03:00
|
|
|
|
|
|
|
The binary of the application running on <B>atusb</B> is transferred from
|
|
|
|
the PC. To download a pre-compiled version, use this command:
|
|
|
|
|
|
|
|
<PRE>
|
|
|
|
wget -O atusb.bin \
|
|
|
|
http://downloads.qi-hardware.com/people/werner/wpan/bindist/atusb-de72af351f661b538add81cbc9965278a2f8c40c.bin
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
Instructions for building the binary from sources are
|
|
|
|
<A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb/fw/README">here</A>.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Register Ben host name">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
To simplify accessing the Ben via TCP/IP, its IP address should be
|
|
|
|
registered in the hosts file on the PC. If the Ben is running OpenWrt,
|
|
|
|
use the following command:
|
|
|
|
<PRE>
|
|
|
|
echo 192.168.254.101 ben >>/etc/hosts
|
|
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
If the Ben is running Jlime, the address would be as follows:
|
|
|
|
<PRE>
|
|
|
|
echo 192.168.1.202 ben >>/etc/hosts
|
|
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
If using the same PC with Bens running OpenWrt and Jlime, one may choose
|
|
|
|
different host names depending on the distribution, and adapt the commands
|
|
|
|
used in the production and testing process accordingly. For example,
|
|
|
|
<PRE>
|
|
|
|
echo 192.168.254.101 ben >>/etc/hosts
|
|
|
|
echo 192.168.1.202 jlime >>/etc/hosts
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
2011-05-20 00:59:29 +03:00
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Customize test scripts">
|
2011-05-20 00:59:29 +03:00
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SECTION ref="bensw" title="Ben software installation">
|
2011-05-20 00:59:29 +03:00
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Password-less remote access">
|
2011-05-20 00:59:29 +03:00
|
|
|
|
|
|
|
To enable password-less remote access from the PC, set up network
|
|
|
|
access to the Ben and run the following command:
|
|
|
|
<PRE>
|
|
|
|
ssh ben 'cat >>/etc/dropbear/authorized_keys' <~/.ssh/id_rsa.pub
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Install ben-wpan tools">
|
2011-05-20 00:59:29 +03:00
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|
|
|
|
2011-05-23 01:38:26 +03:00
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Install avrdude">
|
2011-05-23 01:38:26 +03:00
|
|
|
|
|
|
|
The <B>atusb</B> boot loader is flashed using <B>avrdude</B>. A pre-compiled
|
|
|
|
static binary (suitable for OpenWrt and Jlime) can be installed by running
|
|
|
|
the following two command on the Ben:
|
|
|
|
|
|
|
|
<PRE>
|
|
|
|
wget http://downloads.qi-hardware.com/people/werner/wpan/bindist/avrdude-5.10-de72af351f661b538add81cbc9965278a2f8c40c.tar.gz
|
|
|
|
tar -xz -C / -f avrdude-5.10-de72af351f661b538add81cbc9965278a2f8c40c.tar.gz
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
Instructions for building <B>avrdude</B> from sources are
|
|
|
|
<A href="http://projects.qi-hardware.com/index.php/p/ben-blinkenlights/source/tree/master/avrdude/README
|
|
|
|
">here</A>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Install boot-loader binary">
|
2011-05-23 01:38:26 +03:00
|
|
|
|
|
|
|
The binary of the boot loader running on <B>atusb</B> is transferred from
|
|
|
|
the Ben. To download a pre-compiled version, use this command:
|
|
|
|
|
|
|
|
<PRE>
|
|
|
|
wget -O boot.hex \
|
|
|
|
http://downloads.qi-hardware.com/people/werner/wpan/bindist/boot-de72af351f661b538add81cbc9965278a2f8c40c.hex
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
Instructions for building the binary from sources are
|
|
|
|
<A href="http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb/fw/README">here</A>.
|
|
|
|
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
<!-- ====================================================================== -->
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SECTION ref="bensys" title="Ben system setup">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
The configuration setting described in this section are lost on each
|
2011-05-19 22:56:34 +03:00
|
|
|
reset or reboot and either need to be entered again. Alternatively,
|
|
|
|
a setup script running at boot time can be written.
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Enable network access">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
Once the Ben has booted and started USB networking, the interface
|
|
|
|
on the PC side is configured as follows:
|
|
|
|
<PRE>
|
|
|
|
ifconfig usb0 192.168.254.100 up
|
|
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
These are the settings for OpenWrt, assuming the network device is
|
|
|
|
called "usb0". If using Jlime, the command would be as follows:
|
|
|
|
<PRE>
|
|
|
|
ifconfig usb0 192.168.1.200 up
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Silence other 8:10 card users">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
Before running any of the ben-wpan utilities, other users of the 8:10
|
|
|
|
card slot have to be disabled. In a Ben running the regular OpenWrt or
|
|
|
|
Jlime distribution, the only such user that is automatically started
|
|
|
|
is the MMC kernel driver. The following command disables it:
|
|
|
|
<PRE>
|
|
|
|
echo jz4740-mmc.0 >/sys/bus/platform/drivers/jz4740-mmc/unbind
|
|
|
|
</PRE>
|
|
|
|
<P>
|
|
|
|
If a WPAN-enabled kernel has been installed, the AT86RF230 driver takes
|
|
|
|
the place of the MMC driver. To disable it, run
|
|
|
|
<PRE>
|
|
|
|
echo spi2.0 >/sys/bus/spi/drivers/at86rf230/unbind
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Start atrf-proxy">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
On the Ben, launch the proxy daemon. We pass the option -b to background it:
|
|
|
|
<PRE>
|
|
|
|
atrf-proxy -b
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
2011-05-18 20:43:45 +03:00
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SECTION ref="profiles" title="Test profiles">
|
2011-05-18 20:25:54 +03:00
|
|
|
|
2011-05-19 22:17:34 +03:00
|
|
|
Some of the functional tests measure characteristics that are strongly
|
|
|
|
influenced by the test setup. It is therefore not possible to provide
|
|
|
|
universally applicable reference values, but they have to be measured
|
|
|
|
in the actual test environment.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Clock count (atben only)">
|
2011-05-19 22:17:34 +03:00
|
|
|
|
|
|
|
Insert a known to be good <B>atben</B> board and run the following
|
|
|
|
command directly on the Ben to record the reference value for the
|
|
|
|
clock count with an accuracy of about +/−20 ppm:
|
|
|
|
<PRE>
|
|
|
|
atrf-xtal 1000 >ben.xtal
|
|
|
|
</PRE>
|
|
|
|
<P>
|
2011-05-19 22:56:34 +03:00
|
|
|
This takes about 5 seconds.
|
|
|
|
<P>
|
|
|
|
Note that the result depends on the tolerance of the crystal in the Ben
|
|
|
|
and is also affected by temperature. Good accuracy can therefore
|
2011-05-19 22:17:34 +03:00
|
|
|
only be obtained if this measurement is performed individually on each
|
|
|
|
Ben, and if a stable temperature is maintained.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ---------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
2011-05-27 13:02:41 +03:00
|
|
|
<SUBSECTION title="Signal strength">
|
2011-05-19 22:17:34 +03:00
|
|
|
|
2011-05-20 00:59:29 +03:00
|
|
|
@@@
|
|
|
|
|
2011-05-18 20:25:54 +03:00
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
2011-05-27 13:02:41 +03:00
|
|
|
Last update: 2011-05-27 <I>Werner Almesberger</I>
|
2011-05-18 20:25:54 +03:00
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|