µracoli Manual
Version foo
|
This package contains the uracoli-source code. It consists of the library, various example programms that illustrate the usage of the library functions and some end user applications.
Directory | Content |
---|---|
src/ | source code of the μracoli library . |
inc/ | The library header file. |
wuart/ | The wireless UART application xxx . |
sniffer/ | The source code of the sniffer firmware. |
wibo/ | Wireless bootloader source code, host application and examples. |
xmpl/ | Some example applications, that illustrate how to use the µracoli functions. |
as6/ | Atmel Studio 6 project template. |
In order to use the libraries and applications you need GNU-make and the GNU-AVR toolchain, consisting of compiler, linker, avr-libc and a hardware programming tool.
Under Windows install Atmel Studio 6. For older Atmel MCUs (up to Atmega128RFA1) the last version of WinAVR is fine too.
On Linux install the following packages with the packet manager of the distribution. In Ubuntu or Debian this can be achieved with the following command line:
sudo apt-get install avr-libc binutils-avr gcc-avr avrdude avarice gdb-avr
A detailed installation description is available here.
Python version 2.7.x is required to run the μracoli tools like sterm or the sniffer interface.
Under Windows intstall the MSI package for Python 2.7.9 from http://www.python.org. This package has pip already included, so the installation of further packages is rather simple.
Now run pip install serial
with administrator privilres.
Under Linux install Python and Python-pip with the package manager of your distribution.
Additionally run pip install serial
as super user.
The libraries can be build with make. In order to get an overview, if your board is supported, type
make -C src/ list
The libraries for e.g. the "radiofaro" board, are build with the command:
make -C src radiofaro
This will create the directory +lib+ and the uracoli-library for radiofaro.
$ls lib/ liburacoli_radiofaro.a
This python script +wuart/sterm.py+ is a usefull addon for debugging wireless applications. How to use the script is described in section sterm
With the sniffer firmware the frames exchanged in an IEEE 802.15.4 network can be captured and transmitted over the serial interface to the PC. This firmware is intended for use with a the Python script +sniffer.py+ and http:www.wireshark.org[wireshark]. The script together with the documentation, which explains the sniffer setup, can be found in the package uracoli-sniffer-<version>.zip on http://uracoli.nongnu.org/download.html[].
The sniffer firmware can be compiled with the commands
make -C src mysnifferboard make -C sniffer mysnifferboard
For which boards the sniffer application is available, you can find out with the command: make -C sniffer list
The wireless bootloader (WiBo) is an application that resides in the bootloader section of the AVR and therefore it can erase and rewrite the programm flash memory. In Difference to a regular bootloader, WiBo receives its data over the RF link. WiBo modifies the flash directly, therefore no special backup flash memory, like in other over the air upgrade (OTA) solutions, is required on the transceiver board.
A detailed description how WiBo is used can be found in section wibo.
The example source code can be found in the directory +xmpl/+. This simple example programms are thought as starters for your application.
xmpl_leds.c
Example use of the LED macrosxmpl_key_events.c
Example for key event processing with a single keyxmpl_keys.c
Example use of the KEY macrosxmpl_hif.c
Example for use of the HIF functionsxmpl_hif_echo.c
Example that implements HIF echo, usefull to test the HIF troughputxmpl_timer.c
Example for using the timer macrosxmpl_dbg.c
Example for use of the DBG_XXX macrosxmpl_linbuf_tx.c
Example use of the buffer functionsxmpl_trx_base.c
Example for accessing the transceiverxmpl_trx_echo.c
Example for echoing received framesxmpl_trx_rxaack.c
Example for receiving frames in rx_aack modexmpl_trx_rx.c
Example for receiving framesxmpl_trx_txaret.c
Example for transmitting frames in tx_aret modexmpl_trx_tx.c
Example for transmitting framesxmpl_radio_range.c
Example use of the radio and ioutil functions for a simple range testxmpl_radio_stream.c
Example use of the radio stream functionsThe example firmware can be build with the following commands:
make -C src myboard make -C xmpl -f xmpl_<myexample>.mk myboard
Note: Some of the examples are not available on all boards, due to the lack of some hardware features, e.g. if the LEDs, the KEYs or/and the HIF is absent. A list of supported boards of the example can be obtained by:
make -C xmpl -f xmpl_<myexample>.mk list