The instructions below assume that a complete development environment
is already present on the PC, including SDL and SDL_gfx.
If any prerequisites are not met,
compilation will fail, and you'll have to install the corresponding
package and try again.
A different directory prefix can be chosen by overriding the
INSTALL_PREFIX variable, e.g.,
Note that the test scripts expect ${INSTALL_PREFIX}/bin
to be in PATH.
If the Ben is running Jlime, the address would be as follows:
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,
The instructions below apply for OpenWrt and Jlime. For building
things from source, a cross-compilation toolchain has to be installed
on the PC.
These are the settings for OpenWrt, assuming the network device is
called "usb0". If using Jlime, the command would be as follows:
If a WPAN-enabled kernel has been installed, the AT86RF230 driver takes
the place of the MMC driver. To disable it, run
This takes about 5 seconds.
Note that the result depends on the tolerance of the crystal in the Ben
and is also affected by temperature. Good accuracy can therefore
only be obtained if this measurement is performed individually on each
Ben, and if a stable temperature is maintained.
git clone git://projects.qi-hardware.com/ben-wpan.git
git clone git://projects.qi-hardware.com/f32xbase.git
cd ben-wpan/tools
make
make install
make INSTALL_PREFIX=/usr install
git clone git://git.openezx.org/dfu-util.git
cd dfu-util
./autogen.sh
./configure
make
make install
Note that some Linux distributions already provide a pre-compiled
version of dfu-util, which could be used instead of building
it from source.
wget -O atusb.bin \
http://downloads.qi-hardware.com/people/werner/wpan/bindist/atusb-de72af351f661b538add81cbc9965278a2f8c40c.bin
Instructions for building the binary from sources are
here.
echo 192.168.254.101 ben >>/etc/hosts
echo 192.168.1.202 ben >>/etc/hosts
echo 192.168.254.101 ben >>/etc/hosts
echo 192.168.1.202 jlime >>/etc/hosts
ssh ben 'cat >>/etc/dropbear/authorized_keys' <~/.ssh/id_rsa.pub
git clone git://projects.qi-hardware.com/ben-wpan.git
git clone git://projects.qi-hardware.com/f32xbase.git
cd ben-wpan/tools
If you have already checked out the repository, cd to
ben-wpan/tools/ and run
make clean
Next, if on OpenWrt, compile the tools with
make TARGET=ben_openwrt
If on Jlime, use
make TARGET=ben_jlime
Finally, upload the tools to the Ben and install them under
/usr/bin/ with
make HOST=ben install
Where ben is the host name or IP address assigned to the Ben.
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
Instructions for building avrdude from sources are
here.
wget -O boot.hex \
http://downloads.qi-hardware.com/people/werner/wpan/bindist/boot-de72af351f661b538add81cbc9965278a2f8c40c.hex
Instructions for building the binary from sources are
here.
ifconfig usb0 192.168.254.100 up
ifconfig usb0 192.168.1.200 up
echo jz4740-mmc.0 >/sys/bus/platform/drivers/jz4740-mmc/unbind
echo spi2.0 >/sys/bus/spi/drivers/at86rf230/unbind
atrf-proxy -b
atrf-xtal 1000 >ben.xtal