Welcome to the uracoli Blog

µracoli stands for microcontroller radio communications library and is intended to be a package that demonstrates capabilities and usage of Atmel's IEEE-802.15.4 radio transceivers AT86RF{230,231,212} in combination with AVR 8 bit microcontrollers (e.g. ATmega16, ATmega1281, ATmega128RFA1, ...).

Mittwoch, 5. Januar 2011

uracoli "spotted" in the news


Le Monde, a major newspaper in France, published on December 31th, 2010, an article about a show (Vibrations, by Compagnie 14:20) I worked for, with a large picture of the juggler, Etienne Saglio. The juggle ball on the picture runs uracoli, and is one of 50 nodes used in the show. Happy new year uracoli !

Dienstag, 21. Dezember 2010

Offtopic - Winterfun

The last days was very busy with moving around the white catastrophe powder, so almost no progress with µracoli coding and documenting. Next year there need to be definitely a tool to assist me!! There are various options from the serious but boring snow blower from the local tools shop up to such fancy unmanned vehicles, like ROBOPLOW or  Robo Blower (note the fancy cat/dog/*.life-form protection fence in the front).

Mittwoch, 17. November 2010

From 0.0.11 towards release 0.1.0

In the next weeks it is planned to roll a new release. There are still some things, that have to be changed from odd to even ;-) Because there are so many new features in, I think, that the version jump from 0.0.x to 0.1.x is Ok.

Last week I started with streamlining the documentation, it was in many points nested to deeply. Also I'll plan to give up the approach to have splitted/external documentation parts for usr,app,dev ... I want go back to have a single doxygen project, the only dox subprojects that should go external will be the contribution docs for sniffer / arduino / wibo / ...

The second thing started, is to have a single source distribution package that can be compiled with make. Some criticism in a micro forum gave me the necessarry a** kick ;-) The makefile generator is nearly done. If you type scons install/src then you get a the following tree:

install/src
|-- Makefile .. usage: make all or make [board]
|-- libioutil .. ioutil lib sources
|-- libradio .. radio lib sources
|-- ...XXX... .. wuart etc to be added
`-- obj .. temporary object storage.

With the command "scons puracoli" the next generation uracoli package will be created.

Mittwoch, 28. Juli 2010

Further progress with packaging

The last two hours I did spend with finishing the build rules for the uracoli arduino package.

I abondoned the idea with delivering static libraries and linking them with the arduino core files. This would need a change in Compiler.java which is probably unlikely that it find its way into the arduino mainline (see arduino-0018-uracoli.patch).

Instead of this approach, now a custom hardware folder with all required source and header files is generated. The first initial Radio Sketch is now compiling from inside the arduino GUI.

The next steps will be
  • looking for a BSD licenseable stk500v1 bootloader
  • adding Pierce's Zigduino to the list of supported hardware.
  • writing a simple wireless UART that illustrates the usage

Sonntag, 27. Juni 2010

Packaging with the Build System

Currently the µracoli release packages are generated with a external script (Tools/makerelease.sh). The script is a shell script and is tailored to Linux systems. Nevertheless the SCons build system should be capable to build the ZIP-archives directly on request.

Step 1: Which archive format ?

We started already with the ZIP format, because it is a very common format. Other exotic
formats may achieve a better compression ratio but force the user to find and install the right tool for handling the archive. So we stick in the tradition of the good old PKZIP
(http://en.wikipedia.org/wiki/List_of_archive_formats)

Step 2: Finding the right tool for building Zip Files.

If you google for Scons and Zip, then you are often guided to the distutils.make_zip module.
After some experiments it had shown that this funktion lacks some flexibility.
The Requirments for the uracoli package builder was:

  • Zipping a file located somewhere into a virtual folder in the Zipfile.
  • Renaming files.
  • Adding a path prefix to all files.
  • No need to bulid a seperate tree and zip this tree.

It was found after some experiments, that all this can be achieved with the python ZipFile
module (http://docs.python.org/library/zipfile.html)

Step 3: Integrating it into Scons.

Next a Scons builder had to be written.


import zipfile
##
# This the Zipfile Builder Function for generating
# arbitrary Zipfiles.
#
# The function walk_tree is used to traverse any directory
# given and recursively adding the files therein.
#
# @param target
# Name of the Zipfile
# @param source
# List of the source files packed into the archive
# @param env
# From env the following keys will be used:
# - PREFIX :
# prefix that is prepended to each file packed in the archiv.
# It must not start with "/"
# - RELOCATE :
# Dicitionry that is used for translating file and directory names.
# - COMMENT :
# maximum 65535 byte long string that is added as comment.
#
def create_zip_file(target, source, env):
target = str(target[0])
sources = map(str,source)
prefix = env.get("PREFIX","")
relocate = env.get("RELOCATE",{})
comment = env.get("COMMENT",None)
# generate list of sourcefiles and its name mappings in zipfile
ziplist = []
for src in sources:
for indirname, filelst in walk_tree(src):
# normalize dirname to have / seperator to do dictionary lookup
indn = indirname.replace("\\","/")
outdirname = relocate.get(indn, indn)
for infilename in filelst:
outfilename = relocate.get(infilename,infilename)
infn = os.path.join(indirname,infilename)
outfn = os.path.join(prefix, outdirname, outfilename)
ziplist.append( (infn, outfn) )

# write zipfile
zf = zipfile.ZipFile(target,"w")
for fn_in, fn_out in ziplist:
zf.write(fn_in, fn_out, zipfile.ZIP_DEFLATED)
if comment != None:
zipfile.ZipFile.comment = comment
zf.close()
##
# This function comes from:
# http://code.activestate.com/recipes/200131-recursive-directory-listing-in-html/
def walk_tree(top = ".", depthfirst = True):
# This function recursively traverses a directory tree.
....
## Using the
com['BUILDERS']['ZipFile'] = Builder(action = create_zip_file, suffix = '.zip')

pname = "mypkg"
flist = "install/inc/foo.h install/bin/bar.hex ....".split()
pkg = com.ZipFile("#/install/%s" % pname, flist,
PREFIX = pname,
RELOCATE = {"install/inc":"inc", .... },
COMMENT = "A Pacakge")




Step 4: Defining Packages outside Scons.

The packages should be defined in seperate config file which is not in the SConstruct/SConscript files. Beside the dividing of code and data, this offers, that a user can easily add its own pachkage, A working example can be found in the file packages.cfg in the root directory that contains all package description data.

The File has win.ini Style format and can be from the python module ConfigParser, that comes natively with the python install package.

Voila, and thats in a few words the essence of the new package builder.

There are of course the last 20% to perfection missing, e.g. listing the packages in scons help
or finding a way to build the clean source code archive, frehsly checked out from CVS, but somewhere in a silent minute an idea to that will come.

Mittwoch, 9. Juni 2010

So many things - so little time

It hits me always like a stone, when I see, that there are so many cool options to bring the RF sensors into the daily life at one hand and at the other hand, a day has just 24 hours. Here is a short brain dump of (stupid) ideas that came up in the last time:

- humidity sensor controled ventilation system for the basement
- wearable accelaration sensor
- wireless intercom/door bell
- personal area differential GPS transmitter.
- wireless DMX interface
- wireless POV device
- community presence detector
- use RF231 AES Block with Tiny230

Started things that have to be finish:
- move to a more modern version control system
- make an Arduino software support package
- release of a new sniffer package
- include package generation into scons build
- port AVR2070/RUM
- document/test Wibo, the wireless bootloader

Freitag, 28. Mai 2010

Working with Daniels latest Hardware

Just as a little end of day project, I got xmpl_radio_range.c running on LittleGee and the RFA1-Arduino. The two user LEDs on RFA1-Arduino (PG1, PG2) are really helpful.

I made littleGee to a wearable tag. The initial view did show that the ED value dropped by about 10dB if the board is weared close to the body, completely covering with a hand drops ED by more or less 20dB.

Since both boards are running now, an acceleration application can be done next ;-)