tag:blogger.com,1999:blog-82545705064402920572024-03-26T12:16:05.852+01:00The µracoli Bloguracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-8254570506440292057.post-77206221354846725092017-04-18T23:07:00.000+02:002017-04-19T05:32:00.893+02:00Using Docker Containers for Embedded Software Development<h2>
Abstract</h2>
Setting up an embedded tool chain on a local PC or laptop requires very often to spend an enormous amount of time for installation and configuration of the individual software packages. It ends up in a "golden" installation on a single computer that is kept like a treasure. But with each new package installed on this computer, the golden installation is in danger.
<br/>
<a href="http://www.docker.org/" target="_blank">Docker</a> provides a light weight virtualization engine that runs on Linux, Windows or MacOS.
<br/>
Docker containers contain virtual guest OSes and can easily be configured, deployed and executed. The article descibes how to create a suitable container for embedded software development and how to use it.
<br />
<a name='more'></a><br />
<h2>
Installing Docker</h2>
In the first step, install docker on the local PC. We use the Docker Community Edition (Docker CE).
On the <a href="https://docs.docker.com/engine/installation/#platform-support-matrix" target="_blank">docker installation</a><br />
page click on your OS to get the latest installation instructions.<br />
<br />
To run docker on Ubuntu as normal user, do<br />
<ul>
<li>add the user to the "docker" group<br />
<span style="font-family: courier, monospace;">sudo gpasswd -a <username> docker</username></span></li>
<li>log off and log on again</li>
</ul>
Now test the installation with the command<br />
<span style="font-family: courier new , courier , monospace">
$ docker run hello-world</span>
<h2>
Create the first Docker Image</h2>
Create a working directory and add the file <span style="font-family: courier new , courier , monospace;">Dockerfile</span> in it.<br />
Edit the file
<span style="font-family: courier new , courier , monospace;">Dockerfile</span> and add the following content:<br />
<br />
<hr />
<pre>FROM ubuntu
MAINTAINER Main Tainer maintainer@example.org
RUN apt-get update \
# install packages
&& apt-get -y install \
# build system related
scons mercurial \
# Python packages
python python-pip \
# AVR Tools
binutils-avr gcc-avr avr-libc \
# Documentation tools
doxygen
# we skip doxygen-latex here, otherwise the image becomes "huuuuge"
RUN useradd -ms /bin/bash uracoli
USER uracoli
RUN mkdir /home/uracoli/work
WORKDIR /home/uracoli/work
# command is running at start of the container
CMD \
echo == starting uracoli-development environment == \
&& /bin/bash
</pre>
<hr />
<br />
To create the image run the command:<br />
<pre>$ docker build -t my-uracoli-env . </pre>
<br />
The command creates an image named "my-uracoli-env".<br />
It inherits from the latest Ubuntu installation. The "RUN" commands<br />
<ul>
<li>install the standard Linux packages required to compile the µracoli project</li>
<li>create a user <tt>uracoli</tt></li>
<li>create a working directory <tt>/home/uracoli/work</tt></li>
</ul>
The "USER" statement makes the container run as user "uracoli" rather than "root".
<br />
The "CMD" statement at the end of the file is executed at every start of the container. It issues a message and starts bash.<br />
<br />
<h2>
First Run of the Container</h2>
<br />
After successfully creating the container, run the command<br />
<tt>docker run -t -i my-uracoli-env</tt><br />
in a terminal<br />
<hr />
<pre>$ docker run -t -i u5idev
== starting uracoli-development environment ==
uracoli@6f065accfc17:~$ </pre>
<hr />
On this shell prompt type <tt>pwd</tt> to see that you are in the directory <tt>/home/uracoli/work</tt>.<br />
<br />
Your first development session might start with the following commands:
<br />
<hr />
<pre>uracoli@9311c77b2d54:~/work/uracoli$ hg clone http://hg.savannah.nongnu.org/hgweb/uracoli/
destination directory: uracoli
...
uracoli@9311c77b2d54:~/work/uracoli$ cd uracoli
uracoli@9311c77b2d54:~/work/uracoli$ scons radiofaro
scons: Reading SConscript files ...
build 1 of 104 boards
...
</pre>
<hr />
<br />
<h2>
Adding some Comfort</h2>
After ending (Ctrl-D) and restarting the docker session, you will notice that the docker container is suffered from amnesia. That means, after the next restart the directory <tt>/home/uracoli/work</tt> is empty. Also editing source code with terminal tools like "nano" or "vi" might not fit your regular development habits. To circumvent this, we simply map a local directory from the host computer into the docker container. So you can edit the files from the host machine with your favourite IDE or source-code editor.
Mapping a local directory to docker is done by passing the <tt>-v</tt> option to the run command.<br />
<br />
<pre> docker run -v /home/axel/Work/uracoli-aw:/home/uracoli/work -it my-uracoli-env</pre>
<br />
Now you can edit the files on the host compile and compile it in the docker container.<br />
<br />
<h2>
Mapping Serial Devices into Docker</h2>
On Ubuntu it is possible to map serial devices into the docker container with the following command:<br />
<pre>
$ docker run --device=/dev/ttyUSB0 -v .... -it my-uracoli-env
</pre>
<br />
<h2>
System Clean Up</h2>
While experimenting with docker, a lot of logfiles from different sessions and temporary images may waste a enormous amount of disk space. To get rid of this
left overs, you can use the follwing commands on Linux/Ubuntu to clean the system<br />
<br />
<pre>$ docker rm $(docker ps -aq)
$ docker rmi $(docker images -f "dangling=true" -q)
</pre>
<h2>
Summary</h2>
The article shows the first steps using docker containers for embedded software development.
Containers provide an always fresh and clean environment and you can have multiple containers for e.g. different tool chain versions.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com11tag:blogger.com,1999:blog-8254570506440292057.post-77943413557270769602014-12-31T12:34:00.000+01:002014-12-31T12:58:37.251+01:00"Biomeiler" data logging<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKXsHHhOx-oexHwfYYYT6TC1aKCRlgas8cQRA-H0UGgBBjYmZEeM361WPfNc9S5MRo0eS29AfgL9QHcaXigGKQbk9FabCGeoHDIra-RAIn4R1BMStyc6-2_A9_D7cM_WaVUsdoSgV0987A/s1600/biomeiler_measurementbox.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKXsHHhOx-oexHwfYYYT6TC1aKCRlgas8cQRA-H0UGgBBjYmZEeM361WPfNc9S5MRo0eS29AfgL9QHcaXigGKQbk9FabCGeoHDIra-RAIn4R1BMStyc6-2_A9_D7cM_WaVUsdoSgV0987A/s1600/biomeiler_measurementbox.JPG" height="320" width="240" /></a></div>
Since there are a lot of leave trees in my garden, every year in autumn it is a busy time to remove the leaves from the ways and meadows. I was thinking what else can be done with this amount bio mass, then simply let it rot. Depending on the sort leaves it may rot slowly and it can take several years until a leave becomes soil.<br />
Once a day I stumbled across the concepts of <a href="http://en.wikipedia.org/wiki/Jean_Pain" target="_blank">Jean Pain</a>, a french lumberjack and inventor. He did setup huge piles of shreddered branches and observed that inside this piles high temperatures are achieved. Within such a pile water can be heated up to 70°C, this can be read on the internet. The reason is, that the shreddered bio mass rots aerob, e.g. in the presence of oxygen. In the logical consequence Pain added a heat exchanger in the pile and so he could use the energy generated by the bacteria to heat his house and he also could produce methane - natural gas - to drive cooking stoves, cars and agricultural machines. Pain's work is documented in the book <a href="http://www.jean-pain.com/jeanpain.php" target="_blank"><i><i>The methods of Jean Pain or a</i>nother Kind of Garden</i></a> (or as <a href="https://archive.org/details/Another_Kind_of_Garden-The_Methods_of_Jean_Pain" target="_blank">online version</a>). B.t.w. the german word "Biomeiler" can be translated with "heating compost".<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a name='more'></a><h4>
The setup </h4>
I did like the concept and decided to start with an own experiment. The first trial in summer with about 1m³ material ended after about 6 weeks when the pile was getting cold inside. Starting in autumn with about 5m³ shreddered leaves and branches , I did the setup of the experiment a bit more carefully. Underneat the pile a foil is placed, in order to collect the water (with bacterias) from the pile for reuse. The area is 6m² (3m x 2m) and the hight of the material is about 0,75m - 1m.<br />
I have installed two heat exchangers, but during the first time I just want to observe the pile without cooling it, so the exchangers are currently unused.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgntg0O_O4Ieg7dIAZU4U8T5dhINEzxIas-cErRj4EdsV7UmX2AzFIqf58uE9TT9PiUpP6j6yACRCOX_M0znT2eJyieaptA4DL32GC5Y8_Ho2UdEZMSAsZNhVB58YRUStFhDPxY52H9IcWQ/s1600/biomeiler_heatexchanger.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgntg0O_O4Ieg7dIAZU4U8T5dhINEzxIas-cErRj4EdsV7UmX2AzFIqf58uE9TT9PiUpP6j6yACRCOX_M0znT2eJyieaptA4DL32GC5Y8_Ho2UdEZMSAsZNhVB58YRUStFhDPxY52H9IcWQ/s1600/biomeiler_heatexchanger.JPG" height="240" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Installation the premounted Heat Exchanger</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<h4>
Data Logging </h4>
In order to get live data from the pile, I installed a Meshbean with a DS18B20 one wire temperature sensor, that is positioned inside the pile. On the other side there sits a Rasperry-Pi with <a href="http://www.dresden-elektronik.de/funktechnik/solutions/wireless-light-control/raspbee/?L=1&cHash=c9c902ccdb43164696acccf81b62b2bd" target="_blank">RaspBee</a> extension board. On both nodes, the µracoli-firmware "rsensor" is used. The received data are stored with a timestamp in a <a href="http://www.sqlite.org/" target="_blank">sqlite3</a> database. A Python based Web application was implemented with <a href="http://flask.pocoo.org/" target="_blank">Flask</a> and for rendering the data graphs, the Javascript library <a href="http://www.highcharts.com/" target="_blank">Highcharts</a> was used (with Highcharts the burden of rendering pictures has moved from the Raspberry-Pi to the browser of the web-client).<br />
<h4>
First Live Data </h4>
During the experiment it was seen, that right after the installing of
the sensor, the highest temperatures are achieved (about 40°C).
Interesting is, that the outside temperature has nearly no influence on
the temperature inside the pile.<br />
The first position of the DS18B20 sensor was about 40cm under the top of the pile. In the picture you see a slide increase of the inside temperature (blue curve) around thethe 19th December. That was when I punched some air conditioning holes and a placed a horizontal air condition pipe close to the sensor.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUvHbal6Ndip9Zbqtyu7fCI_2QMj1XmlHwQ0SCX4umoVqFLax8nx0vN0wWddulMHAn6BZR3v6nRs26bgTA1faxJqZdMHwIRMahtJ3L38Vb4uqCBgd0LpeEF1s5_vkGswmw3s0jZWbCvbHh/s1600/chart(1).png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUvHbal6Ndip9Zbqtyu7fCI_2QMj1XmlHwQ0SCX4umoVqFLax8nx0vN0wWddulMHAn6BZR3v6nRs26bgTA1faxJqZdMHwIRMahtJ3L38Vb4uqCBgd0LpeEF1s5_vkGswmw3s0jZWbCvbHh/s1600/chart(1).png" height="280" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sensor 40cm under the top.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbRz13xhVSmCYQIIh7kV0dkg3rx3wVFCHPLCQcUk9fPpTpMQyOmIMJmKGcPEvGF7R5eAzuKzvdE0eRP8gddQ-VB0cemn7dVJ-JlAerYwRehhFHDnhujqPEbv-Ha5CVwfknHpRWKdf5sK_p/s1600/chart.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbRz13xhVSmCYQIIh7kV0dkg3rx3wVFCHPLCQcUk9fPpTpMQyOmIMJmKGcPEvGF7R5eAzuKzvdE0eRP8gddQ-VB0cemn7dVJ-JlAerYwRehhFHDnhujqPEbv-Ha5CVwfknHpRWKdf5sK_p/s1600/chart.png" height="280" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sensor installed 70cm under top of pile.</td></tr>
</tbody></table>
<br />
Around the 26th of December the mechanical setup was improved and the sensor repositioned deeper in the pile. It can be seen that after the repositioning of the sensor the temperature increases and even at a cold day with -8°C air temperature, inside of the pile, the temperature of 40°C was reached and did stay at a constant level. After a few days the activity of the bacterias reduces and the temperature drops. The reason maybe the lack of oxygen.<br />
<h4>
Conclusion </h4>
There is much room for improvements, e.g.<br />
<ul>
<li>the choice of the biomaterial (less leaves more branches), </li>
<li>improving the oxygen supply inside the pile - a simple air-pipe or punched holes are not good enough, because they will cool down the system too much.</li>
</ul>
So stay tuned what will come next in the µracoli-monitored "Biomeiler" experiment.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnAAjl16S1QFBEUuBL6E59rdofRGXGG5KtSv3LQ7Z6p0FvikpuG6s-yT9863JBz9w2wH0OsskCFFVYm1NIM83tnJbZvGHMrJYB49Z6VQ7Nw01JvvSoMYfGmkNJ9A-wDpfDNwqVIN9ADAME/s1600/DSCN1549.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnAAjl16S1QFBEUuBL6E59rdofRGXGG5KtSv3LQ7Z6p0FvikpuG6s-yT9863JBz9w2wH0OsskCFFVYm1NIM83tnJbZvGHMrJYB49Z6VQ7Nw01JvvSoMYfGmkNJ9A-wDpfDNwqVIN9ADAME/s1600/DSCN1549.JPG" height="240" width="320" /></a></div>
<br />
<br />uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com3tag:blogger.com,1999:blog-8254570506440292057.post-55447324604378635162014-03-22T07:18:00.000+01:002014-03-22T07:18:28.696+01:00Chemnitz Linux Days 2014With a fine tradition we went on the second march weekend to Chemnitz to join the get-together of the open source community. This years topic was "Confidence is ...?" - so the focus was clearly on computer and internet security, but not only. The <a href="http://chemnitzer.linux-tage.de/2014/en/vortraege/" target="_blank">talks and workshops</a> did cover many different areas, and therefore our presentation of the new <a href="http://uracoli.nongnu.org/clt2014/index.html" target="_blank">Jenkins based test system</a> was not completely off <span id="goog_855012648"></span>topic<span id="goog_855012649"></span>.<br />
<br />
As guests we participated in the <a href="http://chemnitzer.linux-tage.de/2014/en/vortraege/detail/374" target="_blank">Django workshop </a>by Andreas Hug and Markus Zapke-Gründemann. This workshop brought new insights, how easy it is today, to setup a powerfull web application. Three years ago in our presentation we handcrafted a lot, which can be achieved currently much easier and much more secure.<br />
<br />
At the perfectly organized get-together-party on saturday evening we enjoyed to talk face to face with other developpers and the organizers of the event, while having a good beer and a tasty buffet.<br />
<br />
All in all we enjoyed the stay as every year and even if the preparation phase is always a busy time, our oppinion is "See you again next year in Chemnitz".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm3d1myilkrh5EBtf0vqsqw_iI10F1XoR2YIpV14bJepll8CK_1qqJN2wk_zP5cUih9skfcgXqSuGxeZ4zc2y-0kbrUZJ3LUIxM6Qkg0ZMou_586CjuyYeetybBWDAPV0Pj53N1vWvGfVk/s1600/linuxtag2014_entrance.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm3d1myilkrh5EBtf0vqsqw_iI10F1XoR2YIpV14bJepll8CK_1qqJN2wk_zP5cUih9skfcgXqSuGxeZ4zc2y-0kbrUZJ3LUIxM6Qkg0ZMou_586CjuyYeetybBWDAPV0Pj53N1vWvGfVk/s1600/linuxtag2014_entrance.JPG" height="240" width="320" /></a></div>
<br />
<br />uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-22294111339404211982013-07-29T21:29:00.001+02:002013-07-31T05:07:17.977+02:00RaspBee - An IEEE-802.15.4-Module for RasperryPi<h2>
Introduction </h2>
The µracoli team recently got one of the new <a href="http://www.dresden-elektronik.de/funktechnik/products/boards-and-kits/development-boards/raspbee/?L=1" target="_blank">RaspBee</a> modules from <span style="font-family: Verdana,sans-serif;"><i>dresden elektronik</i></span> (DE) for evaluation. The RaspBee is a addon module for the popular Raspberry Pi computer and is equipped with an <a href="http://www.atmel.com/devices/atmega256rfr2.aspx" target="_blank">Atmega256RFR2</a>. Due to its huge amount of RAM and FLASH and the integrated transceiver, this MCU is a smart choice for building ZigBee or IEEE 802.15.4 gateways.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzAqzz08pmh3ZPXN_9TlNI7bG0JJzKp8nlhqSDT2UbKdbBHE6fqeJNMizlJhCYlOgtanzErCUxooQpZUOigEEQrr0KheTKav9bF4v6E8K60SdboVrTpicxxWovskjznGGA8IfMS53jntWf/s1600/raspbee-de.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzAqzz08pmh3ZPXN_9TlNI7bG0JJzKp8nlhqSDT2UbKdbBHE6fqeJNMizlJhCYlOgtanzErCUxooQpZUOigEEQrr0KheTKav9bF4v6E8K60SdboVrTpicxxWovskjznGGA8IfMS53jntWf/s400/raspbee-de.jpg" width="400" /></a></div>
<br />
The very popular <a href="http://www.raspberrypi.org/" target="_blank">Raspberry Pi</a> needs probably no extra introduction. The credit card size ARM computer runs Linux (e.g. <a href="http://www.raspbian.org/" target="_blank">Raspbian</a>) and it has USB and Ethernet interfaces, which makes it perfect for DIY projects.<br />
<br />
Esentially the RaspBee consists of a radio module <a href="https://shop.dresden-elektronik.de/minimodul-23m12.html" target="_blank">deRFmega256-23M12</a>, is equipped with a ceramic chip antenna, the footprint for an U.FL coaxial connector, two LEDs and a (not populated) JTAG connector. The 12 pin header connects the RaspBee with the Raspberry Pi over the expansion connector. This connector provides power supply and serial port as well as one digital GPIO and the Reset pin.<br />
<br />
The RaspBee is preprogrammed with a proprietary serial bootloader. For this bootloader, DE provides the tool <a href="http://www.dresden-elektronik.de/funktechnik/service/download/driver/?L=1" target="_blank">GCFFlasher</a>. It runs on the Raspberry Pi and provides a convenient and safe way to upgrade RaspBees firmware.<br />
<br />
<b>Caution:</b> If you want to programm the RaspBee via the JTAG interface, the original DE bootloader firmware will be destroyed and because the flash protect fuses are set, there is no way to do backup in advance. The bootloader firmware makes the difference between the basic version (capable to handle 5 ZigBee nodes) and premium version (handles up to 200 ZigBee nodes). However upgrading the firmware with GCFFlasher is safe. You can always restore the firmware image from the DE download page.<br />
<h2>
Basic Setup</h2>
Before you can run your own firmware on the Raspberry Pi / RaspBee hardware, some prerequisite steps are required. For detailed information refer to the <a href="http://www.dresden-elektronik.de/fileadmin/Downloads/Dokumente/Produkte/ZLL/RaspBee-BHB-en.pdf" target="_blank">RaspBee User Manual</a>.<br />
<a name='more'></a><ol>
<li>Free the serial Port /dev/ttyAMA0 from the <span style="font-family: "Courier New",Courier,monospace;">getty</span> process.</li>
<li>Install the tool GCFFlasher on the Raspberry Pi</li>
<li>Configure <span style="font-family: "Courier New",Courier,monospace;">ssh</span> access and preferably install your ssh-key. This may ease up the development and test from a regular PC.</li>
</ol>
<br />
<ol>
</ol>
<h2>
Using µracoli Firmware on RaspBee</h2>
On your development PC you will need the latest AVR toolchain that supports Atmega256RFR2. A good choice is either <a href="http://www.atmel.com/tools/ATMELSTUDIO.aspx" target="_blank">Atmel Studio 6.x</a> on Windows or one of the stand-alone Atmel toolchains for <a href="http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx" target="_blank">Linux</a> or <a href="http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx" target="_blank">Windows</a>.<br />
<br />
Download the latest µracoli source code package, e.g <a href="http://uracoli.nongnu.org/download.html" target="_blank">uracoli-src-0.4.1.zip</a> and unzip it. In order to test the basic development flow, we will use the program <span style="font-family: "Courier New",Courier,monospace;">xmpl_hif.c</span> on the RaspBee. The following steps describe the installation from a Linux-PC:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"># unzip uracoli-src-0.4.1.zip</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># cd uracoli-src-0.4.1</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># make -C src raspbee</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># make -C xmpl -f xmpl_hif.mk raspbee</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># avr-objcopy -I ihex -O binary bin/xmpl_hif_raspbee.hex bin/raspbee.bin<br /># scp bin/raspbee.bin pi@172.16.1.121:/tmp<br /># ssh pi@172.16.1.121 sudo ./GCFFlasher /tmp/raspbee.bin</span><br />
<br />
Now open a serial terminal program (e.g. minicom) on the Raspberry Pi and try to communicate with the RaspBee module. The default port settings are <span style="font-family: "Courier New",Courier,monospace;">/dev/ttyAMA0 38400-8N1</span>. You will see the following output after resetting the RaspBee with the command <span style="font-family: "Courier New",Courier,monospace;">GCFFlasher -r</span>:<br />
<br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">RaspBee Bootloader</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">Vers. 1.01</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">build 2013/05/27 </span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">STARTING APP<br />HIF Example : raspbee : 38400 bit/s</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$Revision$</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">File: Src/Xmpl/xmpl_hif.c:71</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">Welcome in the world of µracoli!</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">DUMP : p=0x81d8, size=35</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">0000 : 57 65 6C 63 6F 6D 65 20 : Welcome :</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">0008 : 69 6E 20 74 68 65 20 77 : in the w :</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">0010 : 6F 72 6C 64 20 6F 66 20 : orld of :</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">0018 : B5 72 61 63 6F 6C 69 21 : .racoli! :</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">0020 : 0A 0D 00 : ... :</span></span></span></span><br />
<span style="color: #666666;"><span style="background-color: white;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">uracoli[00]> </span></span></span></span><br />
<br />
<h2>
Outlook</h2>
With the RaspBee module there is usefull addon for the Raspberry-Pi available, which can be used to easily setup wireless sensor network applications. Since there is free open source software for this module available, DIYers have the freedom of creating their own sensor network applications.<br />
<br />uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com2tag:blogger.com,1999:blog-8254570506440292057.post-37345437926319937912013-06-09T18:34:00.001+02:002013-06-09T18:48:22.576+02:00IPSO challenge 2013<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.ipso-alliance.org/wp-content/media/cmd_webpages.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" src="http://www.ipso-alliance.org/wp-content/media/cmd_webpages.png" title="" /></a></div>
The winners of the <a href="http://www.ipso-alliance.org/">IPSO</a> challenge 2013 was announed last week <a href="http://www.ipso-alliance.org/challenge2013/ipso-challenge-2013-interviews">here</a>. <a href="http://www.coloradomicrodevices.com/">Colorado Micro Devices</a>, you may know this guys already from the <a href="http://uracoli.blogspot.de/2012/09/radioblock-interesting-new-module.html">RadioBlock</a> modules, participated in the challenge, came among the top 10 semi finalists and finally made it to the second place. How is that related to µracoli? Simply by the fact that we reused parts of this years <a href="http://uracoli.nongnu.org/clt2013/index.html">Chemnitz Linux Days project</a>. Especially this was <a href="http://icinga.org/">Icinga,</a> that was installed on a Raspberry-Pi and on a Cloud server. In difference to the Linux Days project we used <a href="http://www.mqtt.org/">MQTT</a> instead of SNMP. MQTT makes it easier to operate from behind a firewall, since the local Rasperry-PI needs no official IP address, in order to be reached from the server, instead it publishes the sensor data to the cloud server actively. Thanks to the open source MQTT implementation from the <a href="http://mosquitto.org/">Mosqitto project</a>, we could quickly change from SNMP to the new protocoll, that fits perfectly as transport layer for sensor data.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-4475345878191244912013-06-09T17:45:00.000+02:002013-06-09T17:50:30.586+02:00Another quite wet sunday - after the flood 2013.As you may know from the news, the southern and eastern parts of germany are suffered from a flood, that is comparable to the desaster that happened in 2002. The maximum water level this time was about 10m, the historical old town of Meissen including the theatre was flooded completely. However the water recedes now but very slow. At some places where the water disappeared and the people in my neighborhood started today with cleaning their houses. (I live a few kilometers away from the river and was not suffered).<br />
<br />
So I called somebody and asked if there is some help needed and after clearifying the details I put the Kärcher and the rubber boots in the car and went to his place. We had water from below and above, since it started to rain, so the power cables for the pumps and the pressure washers needed to kept dry and it gets a bit scary when a thunderstorm came up - so we had to interrupt the work for a while - this was a good time for a having a break and talkig about the last days.<br />
<br />
At the end of the day it can be summarized that it is amazing to experience the solidarity among the people. This feeling is somehow comparable to open source development. Everybody pulls trough and it is amazing to see, how step by step the chaos disappears.<br />
<br />
<br />uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-1463097362218973092013-05-23T14:30:00.001+02:002013-05-23T16:40:01.133+02:00Dogorians wireless light fixtures run uracoli<div dir="ltr" style="text-align: left;" trbidi="on">
The show Dogorians (<a href="http://www.dogora.com/Dogorians_UK/Home.html" target="_blank">http://www.dogora.com</a>), a musical now (May 2013) playing at the Theatre du Soleil in France, needed some compact remote wireless light fixtures.<br />
<br />
So, in conjunction with Daniel and Axel, we created some DMX driven remote nodes. This has been made in no time: 3 weeks from first draft to product delivery. We both created the software and hardware, for both the remote nodes and the gateway.<br />
<br />
The on-field setup was easy: set the dip switch addresses, hook the gateway on the DMX light board, over !<br />
<br />
DMX having a rather high transfer rate (250kbps), we had to use some low-level tricks such has writing straight from UART to TRX buffer (call it poor man's DMA :)).<br />
<br />
We have future projects to make a full commercial product out of this first version.<br />
<br />
At the moment, the code is not opened but feel free to ask for advice/snippets !<br />
<br />
<br />
<br />
<div style="text-align: center;">
The boards ready to ship ! </div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-fG_BapH4Kgg/UZ4Jqeqrf_I/AAAAAAAAABM/W1hUgPFrABk/s1600/bats-1.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-fG_BapH4Kgg/UZ4Jqeqrf_I/AAAAAAAAABM/W1hUgPFrABk/s320/bats-1.jpeg" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
The DMX to wireless gateway:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-gQvU0RPKRjE/UZ4Jq7EaqRI/AAAAAAAAABQ/ZdT2icZWR8k/s1600/dracula-2.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-gQvU0RPKRjE/UZ4Jq7EaqRI/AAAAAAAAABQ/ZdT2icZWR8k/s320/dracula-2.jpeg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-eEou64uCfs8/UZ4Jq-vDfUI/AAAAAAAAABU/Taq4TgCFh14/s1600/dracula-3.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-eEou64uCfs8/UZ4Jq-vDfUI/AAAAAAAAABU/Taq4TgCFh14/s320/dracula-3.jpeg" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Enclosures for the lights:</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-KLfmFw77w-4/UZ4Jr_NN-MI/AAAAAAAAABk/sccS-OIRRO4/s1600/fruits-1.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-KLfmFw77w-4/UZ4Jr_NN-MI/AAAAAAAAABk/sccS-OIRRO4/s320/fruits-1.jpeg" width="320" /></a></div>
<br />
<div style="text-align: center;">
Close-up of a board: </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-kooScwTHYB4/UZ4J8B4dJFI/AAAAAAAAAB0/EyXL9vGfwyA/s1600/IMG_2321.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-kooScwTHYB4/UZ4J8B4dJFI/AAAAAAAAAB0/EyXL9vGfwyA/s320/IMG_2321.JPG" width="240" /></a></div>
<br />
<div style="text-align: center;">
Close-up of a boards, with JTAG programming wires: </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-PrkBv7r4tZQ/UZ4J6mRTD-I/AAAAAAAAABs/tbQBwPNcIkM/s1600/IMG_2319.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-PrkBv7r4tZQ/UZ4J6mRTD-I/AAAAAAAAABs/tbQBwPNcIkM/s320/IMG_2319.JPG" width="320" /></a></div>
<br /></div>
Anonymousnoreply@blogger.com2tag:blogger.com,1999:blog-8254570506440292057.post-80325978851851289392013-04-04T21:47:00.000+02:002013-04-05T07:28:20.067+02:00STK500 + Mega16L + RZ600 Radio Board = SnifferRecently on AVR-Freaks there was a discussion how to sniff frames with a RZ600 radio board, that is eventually available. After a look in the data sheets, I figured out that the stone old µracoli-target <b>stkm16</b> can be easily modified to do this job.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJA_xn1H89EPYklwWKYcjnXG9maoFIZmjdus0v4m4kiNOYPs5aFnlg6YFJTDNs9Fe6r5Yawl6lT6MU_kL13LD8AohyfwmMzFu-fDrch0DVt70nD1b-vzzb3lc2vYSFH_LIU6V47pUXPAzP/s1600/stkm16.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJA_xn1H89EPYklwWKYcjnXG9maoFIZmjdus0v4m4kiNOYPs5aFnlg6YFJTDNs9Fe6r5Yawl6lT6MU_kL13LD8AohyfwmMzFu-fDrch0DVt70nD1b-vzzb3lc2vYSFH_LIU6V47pUXPAzP/s320/stkm16.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">STK500 with RZ600 Radio Board - <i>the JTAG-ICE in the background was used for debugging and is normally not needed, a simple 6pin ISP cable would be sufficient to flash the ATmega16L</i></td></tr>
</tbody></table>
<br />
Here is the recipe:<br />
<ul>
<li>take a STK500 </li>
<li>an ATmega16L (because of 3.3V) in DIP (or better a Mega64)</li>
<li>3 x double wires</li>
<li>a RZ600 board (I used the one with AT86RF230)</li>
<li>a power supply</li>
<li>a RS232 cable </li>
</ul>
Assemble the above components: <br />
<ul>
<li>double check if <b>only</b> the mega16L plugs in the STK500</li>
<li>wire PD0/1 to RXD/TXD of RS232 spare</li>
<li>wire PA4 ... PA7 with LED0...3 (if you like blinking LEDs)</li>
<li>plug RZ600 on PORTB</li>
<li>set he STK500 jumpers : </li>
<ul>
<li><span style="font-family: "Courier New",Courier,monospace;">VTARGET, AREF, RESET, XTAL1, BSEL2</span> connected,</li>
<li><span style="font-family: "Courier New",Courier,monospace;">OSCSEL</span> connected 1-2 (SW clock from STK500)</li>
</ul>
</ul>
Next compile the target stkm16 (will come with version 0.4.0 soon, meanwhile<br />
pull the repository and use rel_0.4.0 branch) and configure the STK500.<br />
<ul>
<li>connect the serial interface to RS232-CTRL</li>
<li style="font-family: "Courier New",Courier,monospace;">avrdude -P /dev/ttyS0 -p m16 -c stk500v2 -tF</li>
<li>type <span style="font-family: "Courier New",Courier,monospace;">fosc 3.6864 </span></li>
<li>type <span style="font-family: "Courier New",Courier,monospace;">vtarg 3.4 </span></li>
</ul>
This ensures that RZ600 radio board operates at a valid voltage level<br />
and the SW clock with a baudrate friendly frequency is used <br />
<br />
Now flash the firmware <span style="font-family: "Courier New",Courier,monospace;">sniffer_stkm16.hex</span> and set the fuses to <span style="font-family: "Courier New",Courier,monospace;">lf = 0xfe, hf = 0x91</span>.<br />
<br />
Next run the script sniffer.py from <span style="font-family: "Courier New",Courier,monospace;">uracoli-sniffer-<version>.zip</version></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> python sniffer.py -p /dev/ttyS0:115200 -c 17 | wireshark -ki -</span> <br />
and voila - we can sniff.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkOb61l6a3JV2PjPKd2ux4tNf3iWiLvxy9uUEqfArqMOmzHYMKpi-ZAA7WMPyw8cyO3AVtoDEFRZ_GewCKWqZmDBG-437BZd8tiSS9rXwww0Hx9AgcNXcFnlflsN6pnQpH-zSVKm1eVwyy/s1600/uracoli_sniffer.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkOb61l6a3JV2PjPKd2ux4tNf3iWiLvxy9uUEqfArqMOmzHYMKpi-ZAA7WMPyw8cyO3AVtoDEFRZ_GewCKWqZmDBG-437BZd8tiSS9rXwww0Hx9AgcNXcFnlflsN6pnQpH-zSVKm1eVwyy/s320/uracoli_sniffer.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Wireshark and Sniffer Frontend - <i>for those who look at details they will see it is an older screenshot :-)</i></td></tr>
</tbody></table>
<br />
<br />
However there are some limitations. Because there is just 1K of RAM in the Mega16, you can't buffer much data and so you will loose some frames if a large traffic peak occurs in your network.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-39376892198566124152013-03-17T16:42:00.000+01:002014-03-22T07:18:57.523+01:00Chemnitzer Linuxtage 2013<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnI2vTa4VTksVmz27AcHyyPEgqDlKGCBEaEbJM2mBOuPuwNv_9YEYyeT97IpmrjfA2oJ-6UdvfY1iZ2ULCTluVs9ApLdTeg_4GWgRvXnbNDZ1CTefmZhpY4eCNb0Xv7B5w_4VZ26TLjDzY/s1600/entrance.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnI2vTa4VTksVmz27AcHyyPEgqDlKGCBEaEbJM2mBOuPuwNv_9YEYyeT97IpmrjfA2oJ-6UdvfY1iZ2ULCTluVs9ApLdTeg_4GWgRvXnbNDZ1CTefmZhpY4eCNb0Xv7B5w_4VZ26TLjDzY/s320/entrance.jpg" height="240" width="320" /></a></div>
<br />
As a good tradition, the <a href="http://chemnitzer.linux-tage.de/2013/">Chemnitz Linux Days</a> take place on a sunny march weekend.<br />
<br />
Amazingly there is more embedded stuff from year to year. In 2013 the Raspberry-Pi is the gadget of the year. As a surprise there was Contiki/6LowPan project by the <a href="http://osdomotics.com/">Open Source Domotics Group</a> from Vienna/Austria. At the booth they did show the available hardware, e.g. 220V light switches, power outlets with power metering capabilities included and other gadgets around home automation.<br />
<br />
On the saturday in the evening there is the get-together party of all contributors of the Chemnitz Linux Days, a good place to talk with the "makers" of this event.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjurPQvzOSHGhFy3WsxmbmJia9ZODuKl1-JrC6IEDymd7hrJ03By3p8UF1p1V8p5hiPUSoO5Z3rg7qgtgVC5RwOPkO_8HOFqvZSVqKE0vZmOXJp545bSPXCb43-3Z93O9O_M1ostSRJG_kl/s1600/drummers.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjurPQvzOSHGhFy3WsxmbmJia9ZODuKl1-JrC6IEDymd7hrJ03By3p8UF1p1V8p5hiPUSoO5Z3rg7qgtgVC5RwOPkO_8HOFqvZSVqKE0vZmOXJp545bSPXCb43-3Z93O9O_M1ostSRJG_kl/s320/drummers.jpg" height="240" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">This years cultural act was the percussion group <a href="http://www.youtube.com/watch?v=PG5AHBcXS7I">Drummed Boxes</a> from Chemnitz.</td></tr>
</tbody></table>
Our <a href="http://uracoli.nongnu.org/clt2013/">presentation</a> about how to integrate sensor data via SNMP into large scale IT monitoring systems like Icinga or Nagios had quite a lot of visitors and was well received by the audience. The slides and a µracoli-app-note will be online soon.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzzyxoiser8rZtHPPR_EM8XduolD_-YWTfgpN6CrCR1FmyMu9rhIUTlz-FGXTpIaOomo5Vp9HbLZaAs6h4A9Yg7SkcmXd_uv5fdE6BDLKaweQkKyzrbI995PAsW4ZJIQtK-gTwm_gbUu93/s1600/audience.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzzyxoiser8rZtHPPR_EM8XduolD_-YWTfgpN6CrCR1FmyMu9rhIUTlz-FGXTpIaOomo5Vp9HbLZaAs6h4A9Yg7SkcmXd_uv5fdE6BDLKaweQkKyzrbI995PAsW4ZJIQtK-gTwm_gbUu93/s320/audience.jpg" height="240" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The auditorium for the SNMP presentation.</td></tr>
</tbody></table>
<br />
<br />
However, we want to say a huge thank you for the professional and perfect organisation of the event to all members of the Chemnitz Linux Days Team. Looking forward to see you again next year in march.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRlOGAGoI-XHgSAxmtRhir9LbVKyekGOrXqFr6N-LX12I8bAnkPldcUQRKOEh4_NMwKZh7uKaQHgd4GOnkjO2kmL8Y1hCtGHbgdHM83ehh5JVdQXV_Yx3X5i1IunNFw7ofSivxHJi1eVGl/s1600/tux.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRlOGAGoI-XHgSAxmtRhir9LbVKyekGOrXqFr6N-LX12I8bAnkPldcUQRKOEh4_NMwKZh7uKaQHgd4GOnkjO2kmL8Y1hCtGHbgdHM83ehh5JVdQXV_Yx3X5i1IunNFw7ofSivxHJi1eVGl/s320/tux.jpg" height="320" width="240" /></a></div>
uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-61144836705930162642013-02-03T22:15:00.001+01:002013-02-03T22:15:04.936+01:00Arduino Open Space in DresdenYesterday Daniel and Axel visited the <a href="http://www.agile-hardware.de/02-02-2013-arduino-open-space-in-dresden/">Arduino Open Space in Dresden.</a> We had some of our <a href="http://uracoli.nongnu.org/radiofaro.html">Radiofaro</a> prototypes with us. In our short presentation we did show two demos. <i>Demo #1</i> prepared a <a href="https://cosm.com/feeds/100945">COSM feed</a>, that gathers data from a DF-Robot-Ethernet-Shield + Radiofaro as gateway and a remote Radiofaro board that acts as a temperature and voltage sensor. In <i>Demo #2</i> Daniel did an atoc hack and created a wireless display from a <a href="http://my.agile-hardware.de/de/times-square-shield-fuer-16x32-led-matrizen-3-und-5-mm">Times-Square-Shield</a> and a <a href="http://my.agile-hardware.de/de/led-matrix-rot-gruen-16x32-3mm-leds">LED Matrix</a>, that was provided by <a href="http://www.agile-hardware.de/">Agile Hardware</a>.<br />
<br />
Beside of our presentation we had a lot of interesting discussions, among all of the talks we got a interesting pointer to the <a href="http://codebender.cc/static/about">Codebender Project</a>, which is a web based development platform for Arduino.<br />
<br />
So finally it was an interesting and inspiring saturday afternoon with a nice opportunity to present our project and get into direct contact with the Dresden Arduino community. Many thanks to our hosts Steffen and Sabine and looking forward to meet you again at the next Arduino Open Space.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKOO6pM-p0jEOYvNo3PRSvqtzWUYAmmGyJaUchHNKHRSXOXZiTJSs1pE7i3ZHEsRrJ4oOIWwDezvXymVobynBnvZ9ALUl7iNL6Fs7fE1YmYiTxw1h8WVKVXANC2LJfFEgs3dh75iJuFqro/s1600/daniel_at_arduino_openspace_1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKOO6pM-p0jEOYvNo3PRSvqtzWUYAmmGyJaUchHNKHRSXOXZiTJSs1pE7i3ZHEsRrJ4oOIWwDezvXymVobynBnvZ9ALUl7iNL6Fs7fE1YmYiTxw1h8WVKVXANC2LJfFEgs3dh75iJuFqro/s320/daniel_at_arduino_openspace_1.JPG" width="320" /></a></div>
<br />
<br />
uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-81284116922771024372012-09-30T16:54:00.002+02:002012-09-30T16:54:30.708+02:00Changes in uracoli Version 0.3.0<br />
In order to improve the usage of uracoli, there are some changes that affect the usage.
<br />
<ul>
<li>libradio and libioutil libraries are combined to liburacoli</li>
<li>The HIF baudrate can now be predefined in board.cfg and overwritten
on the command line</li>
<li>A python terminal program with TKinter GUI is available as alpha version</li>
<li>The wireshark interface script <span style="font-family: "Courier New",Courier,monospace;">sniffer.py</span> got a TKinter GUI and a custom wireshark dissector in LUA for the p2p protocoll is added.</li>
</ul>
<a name='more'></a><h3>
Library Handling</h3>
<br />
A remarkable change is, that the libraries <span style="font-family: "Courier New",Courier,monospace;">libradio_<board>.a</span> and <span style="font-family: "Courier New",Courier,monospace;">libioutil_<board>.a</span> are combined to <span style="font-family: "Courier New",Courier,monospace;">liburacoli_<board>.a</span>. This change does not affect the code size of the applications since a library is just a collection of modules. Compared with a <i>real library</i> where you can borrow books, this change means that we moved two smaller libraries into a larger building but the number of books that you can lend stays the same.<br />
<br />
The main advantage of this change is, that it shortens the linker command line:<br />
<div style="font-family: "Courier New",Courier,monospace;">
avr-gcc .... -lradio_<board>.a -lioutil_<board>.a</div>
changes to<br />
<div style="font-family: "Courier New",Courier,monospace;">
avr-gcc .... -luracoli_<board>.a</div>
<h3 style="font-family: Arial,Helvetica,sans-serif;">
Baudrates</h3>
<div style="font-family: Arial,Helvetica,sans-serif;">
In the new uracoli version the handling of the baud rate was mainly realized by hardcoded</div>
<div style="font-family: Arial,Helvetica,sans-serif;">
numbers in the call of the HIF initialization function, e.g. <span style="font-family: "Courier New",Courier,monospace;">hif_init(9600)<span style="font-family: Arial, Helvetica, sans-serif;">. Since the boards have different capabilities regarding its maximum baud rate, this is now (optionally) </span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
reflected in the file <span style="font-family: "Courier New",Courier,monospace;">board.cfg</span><span style="font-family: Arial, Helvetica, sans-serif;">. The entry for an Atmel controller base b</span>ase board looks now so:</div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[cbb230]</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">comment = REB Controller Base Board with REB23x/REB212 attached</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">image =</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">include = boards/board_cbb2xx.h</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">aliases = cbb230b cbb231 cbb212 cbb232 cbb233</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">cpu = atxmega256a3</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">bootoffset = 0x0000</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">ccflags =</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">f_cpu = 2000000UL</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">no_app = diag rdiag wuart2 wibo albo</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">no_xmpl =</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">baudrate = 115200</span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-size: x-small;"></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-size: x-small;"></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-size: x-small;"></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
This baudrate value is now written into the generated file <span style="font-family: "Courier New",Courier,monospace;">board_cfg.h</span> and looks so:</div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace;">
#elif defined(cbb230) || defined(cbb230b) || \</div>
<div style="font-family: "Courier New",Courier,monospace;">
defined(cbb231) || defined(cbb212) || \</div>
<div style="font-family: "Courier New",Courier,monospace;">
defined(cbb232) || defined(cbb233)<br />
# define BOOT_LOADER_ADDRESS (0x0)<br />
# if !defined(HIF_DEFAULT_BAUDRATE)<br />
# define HIF_DEFAULT_BAUDRATE (115200)<br />
# endif<br />
# include "boards/board_cbb2xx.h"</div>
<div style="font-family: "Courier New",Courier,monospace;">
<br /></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
As you see with the <span style="font-family: "Courier New",Courier,monospace;">ifdef</span>,this value can be overwritten from the command line. The hand over of a user specified baudrate is available in the <span style="font-family: "Courier New",Courier,monospace;">Makefiles</span> of the source code package <span style="font-family: "Courier New",Courier,monospace;">uracoli-src-0.3.0.zip</span> as well as in the <span style="font-family: "Courier New",Courier,monospace;">scons build</span> from the repository or <span style="font-family: "Courier New",Courier,monospace;">uracoli-devel-0.3.0.zip<span style="font-family: Arial, Helvetica, sans-serif;">. A user defined baud rate of 1200 bit/s can be specified in the following way:</span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: "Courier New",Courier,monospace;">
make -C wuart baudrate=1200 rdk230 </div>
<div style="font-family: "Courier New",Courier,monospace;">
scons baudrate=1200 rdk230 </div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<br /></div>
<h3 style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;">Python Terminal Programm -</span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;"> sterm.py</span></span></h3>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;">Oh no! Not yet another terminal programm. I had started <span style="font-family: "Courier New",Courier,monospace;">sterm.py</span> several years ago and I did forgot it in the past years. It is a tool that can handle multiple RS232/USB connections in parallel. You can configure as many serial links as the size of your screen allows. Some basic features are a connect button, echo on/off, logfile on/off as well as a set of predefined macros that can be send over the serial line. All features can be configured in "win-ini" style config file. One of the usefull features of this tool that it is scriptable with Python scripts, that </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;">means sending characters to the device and waiting for a response, allow to write smart that can help automate testing.</span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
</div>
<h3 style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;">Wireshark Sniffer</span></span></h3>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;">The sniffer proxy tool got a major change. Its name is now <span style="font-family: "Courier New",Courier,monospace;">sniffer.py</span> rather then <span style="font-family: "Courier New",Courier,monospace;">ieee802154.py</span>. It sends the sniffed data now via <span style="font-family: "Courier New",Courier,monospace;">stdout</span> rather then a named pipe. The tool has now TKinter frontend, that provides GUI control of the channel setting, the data rate and starting and stopping of the sniffing. The command line reads now so:</span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: "Courier New",Courier,monospace;">python sniffer.py -p COM1 | wireshark -ki -</span></span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: "Courier New",Courier,monospace;"><br /></span></span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">Currently <span style="font-family: "Courier New",Courier,monospace;">sniffer.py</span> always opens the GUI. In future releases there might be a headless option, if this is requested by users.</span></span></span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">The scipt <span style="font-family: "Courier New",Courier,monospace;">p2p.lua</span> is an example dissector that decodes the P2P protocol (P2P: peer to peer), that is used by <span style="font-family: "Courier New",Courier,monospace;">wibo</span>, <span style="font-family: "Courier New",Courier,monospace;">wuart</span> and other radio based applications.</span></span></span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: "Courier New",Courier,monospace;"><br /></span></span></span></div>
<div style="font-family: Arial,Helvetica,sans-serif;">
</div>
<h3>
<span style="font-family: "Courier New",Courier,monospace;"></span></h3>
uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-48753930240037764012012-09-08T07:37:00.001+02:002012-09-08T09:25:58.661+02:00RadioBlock - An interesting new module<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmZ3dGPq-r0c4tnqtNS-POMznNwK5NHSLFNghwDLyTOv6ekp7ZUlA24n2DieSk6YTlxBsj7KZHgRS7igKLY0aADgVx9Jea-2krOyOCMPX7mxNHk2G8Gs7BIEy1ECGqLJQEh4EZB9dfnchC/s1600/radio_block.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" border="0" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmZ3dGPq-r0c4tnqtNS-POMznNwK5NHSLFNghwDLyTOv6ekp7ZUlA24n2DieSk6YTlxBsj7KZHgRS7igKLY0aADgVx9Jea-2krOyOCMPX7mxNHk2G8Gs7BIEy1ECGqLJQEh4EZB9dfnchC/s200/radio_block.png" title="RadioBlock-Module" width="200" /></a></div>The RadioBlock module is equipped with an AT86RF231 transceiver and a Cortex-M0 LPC1114 MCU. This module is currently in a funding process on <a href="http://www.kickstarter.com/projects/545073874/radioblock-simple-radio-for-arduino-or-any-embedde">kickstarter.com</a>. It is intended to be a lowcost wirless modem to upgrade existing micro controller projects like Arduino with wireless connectivity. For µracoli this means that the code base has to be ported to 32 bit, to support also MCUs with ARM-cores ... <i>OK, challenge accepted :-)</i>uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-73790381988762229172012-09-01T20:12:00.000+02:002012-09-03T21:46:15.311+02:00Naming boards with udevMost of the transceiver boards come with an USB connector. After connecting the board with the PC, a kernel driver is loaded and a name is assigned, e.g. <span style="font-family: "Courier New",Courier,monospace;">/dev/ttyUSB[0...9]</span> or <span style="font-family: "Courier New",Courier,monospace;">/dev/ttyACM[0...9]. </span>In more complex setups, it is always a bit of pain, keeping track, which board gets which name assigned. The name can be found with disconnecting/reconnecting the board and search in the output of the command dmesg for the name:
<br />
<pre style="font-family: "Courier New",Courier,monospace;">axel@dellbox:~$ dmesg | egrep "ttyUSB|ttyACM"
ftdi_sio ttyUSB1: FTDI USB Serial Device \</pre>
<pre style="font-family: "Courier New",Courier,monospace;"> converter now disconnected from ttyUSB1
usb 1-2.6: FTDI USB Serial Device converter now \</pre>
<pre style="font-family: "Courier New",Courier,monospace;"> attached to ttyUSB1
</pre>
Recently I found, that the <span style="font-family: "Courier New",Courier,monospace;">udev</span> system under Linux povides a much more sophisticated way to assign user specified names to the boards. The <span style="font-family: "Courier New",Courier,monospace;">udev </span>daemon can assign the name according to the serial number, that is stored in the USB chip of the transceiver board or in an EEPROM. Read in the next section how this can be used ... <br />
<h4>
<a name='more'></a>Finding the Serial Numbers</h4>
The serial number of an USB interface can be read with the tool <span style="font-family: "Courier New",Courier,monospace;">lsusb</span>. Connect the board with the PC and enter the command <span style="font-family: "Courier New", Courier, monospace;">lsusb -vv | less</span>, scroll trough the text and search e.g. for a FT232:<br />
<span style="font-family: "Courier New", Courier, monospace;">$sudo lsusb -vv | less</span><br />
<span style="font-family: "Courier New",Courier,monospace;">Bus 001 Device 016: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC</span><br />
<span style="font-family: "Courier New",Courier,monospace;">Device Descriptor:</span><br />
<span style="font-family: "Courier New",Courier,monospace;">...</span><br />
<span style="font-family: "Courier New",Courier,monospace;"></span><span style="font-family: "Courier New",Courier,monospace;">idProduct 0x6001 FT232 USB-Serial (UART) IC</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> bcdDevice 6.00</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> iManufacturer 1 FTDI</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> iProduct 2 FT232R USB UART</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> iSerial 3 A700evIv</span><br />
<u style="color: red;"><b>Note</b></u><span style="color: red;">:</span> The serial number is only displayed, if you are <span style="font-family: "Courier New",Courier,monospace;">root</span>.<br />
<h4>
Writing a udev Rule </h4>
Now create as superuser the file <span style="font-family: "Courier New",Courier,monospace;">41-uracoli-boards.rules</span> in <span style="font-family: "Courier New",Courier,monospace;">/etc/udev/rules.d/ </span>and add the line: <br />
<span style="font-family: "Courier New",Courier,monospace;">KERNEL=="ttyUSB*", ATTRS{serial}=="A700evIv", NAME:="uracoli/rafa1", GROUP="dialout", MODE="0660"</span><br />
<br />
<ul>
<li><span style="font-family: "Courier New",Courier,monospace;">KERNEL=="ttyUSB*" <span style="font-family: Arial,Helvetica,sans-serif;">checks for udev event with /dev/ttyUSBx</span></span></li>
<li><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;"> </span></span><span style="font-family: "Courier New",Courier,monospace;">ATTRS{serial}=="A700evIv"</span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;"></span> <span style="font-family: Arial,Helvetica,sans-serif;">checks the serial number that was found with <span style="font-family: "Courier New",Courier,monospace;">lsusb</span></span></span></li>
<li><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: "Courier New",Courier,monospace;"></span></span></span><span style="font-family: "Courier New",Courier,monospace;">NAME:="uracoli/rafa1"</span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: "Courier New",Courier,monospace;"></span></span> <span style="font-family: Arial,Helvetica,sans-serif;">creates a device node with name </span>/dev/uracoli/rafa1</span></li>
<li><span style="font-family: "Courier New",Courier,monospace;">GROUP="dialout", MODE="0660" <span style="font-family: Arial,Helvetica,sans-serif;">sets the access permissions for all users in group </span>"dialout".</span></li>
</ul>
<br />
Now the new udev-rules needs to be reloaded. This is done with the command<br />
<span style="font-family: "Courier New",Courier,monospace;">service udev restart</span> (under Centos use: <span style="font-family: "Courier New",Courier,monospace;">udevcontrol reload_rules</span> ). After unplugging and replugging the board check the existence of the new devices nodes:<br />
<div style="font-family: "Courier New",Courier,monospace;">
$ls -l /dev/uracoli/</div>
<span style="font-family: "Courier New",Courier,monospace;">crw-rw---- 1 root dialout 188, 0 2012-09-01 18:55 rafa1</span><br />
<br />
For those who need the original names and still want the new names, there is a <span style="font-family: "Courier New",Courier,monospace;">SYMLINK <span style="font-family: Arial,Helvetica,sans-serif;">option available in udev. Change the above rule like that:</span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">KERNEL=="ttyUSB*", ATTRS{serial}=="A700evIv", SYMLINK+="uracoli/rafa1", GROUP="dialout", MODE="0660"</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">and an additional symlink that points to <span style="font-family: "Courier New",Courier,monospace;">/dev/ttyUSBx</span> is created.</span> </span><br />
<br />
If you finally glue some nice labels on the boards, there is no more who-is-who confusion in your setup.<br />
<h4>
Still some troubles</h4>
It was found that the most of the CP21xx driver based boards came with out a serial number, e.g. with the default 0x0001. The only exception was the the Meshnetics Meshbean board. Here I need to check, if the serial number can be assigned under Linux. Most of the vendors ANS or InCirquit do not brand the boards, that means there the only way is to set the chip serial number. For the Raven RZUSB sticks with uracoli Firmware, they do also not have a serial number. Here the situation is a bit easier, since the uracoli vendor and product ID (<span style="font-family: "Courier New",Courier,monospace;">vendor=0x16c0 VOTI, product=0x0887</span>) would allow at least to enumerate the device as (<span style="font-family: "Courier New",Courier,monospace;">rzusb0, rzusb1</span>) according to the sequence of plugging of the sticks.<br />
<br />
Stay tuned for updates of this article with solutions for the above points.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-65424727165199278442012-08-01T21:59:00.002+02:002012-08-02T21:12:41.082+02:00µracoli is going to space<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyp9tqRdeJ0_TAzXIdcP2VJQOCtgxuLiS_JUX8IfupNVUViCrgN4B0W85be2rs57-2-_kzjKbeCuMVDha3UEqHniVq6L5m12LlgaeTYr1VP2Q9e1cBLmPCinoqOTRWi0XL-NtpS0YgJBkj/s1600/launch_small.jpg" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyp9tqRdeJ0_TAzXIdcP2VJQOCtgxuLiS_JUX8IfupNVUViCrgN4B0W85be2rs57-2-_kzjKbeCuMVDha3UEqHniVq6L5m12LlgaeTYr1VP2Q9e1cBLmPCinoqOTRWi0XL-NtpS0YgJBkj/s320/launch_small.jpg" width="160" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Launching Rocket</td></tr>
</tbody></table>
Since the last year Torsten and his son David are engaged hobby rocket scientists. They work with modell rockets, which have usually a lentgh of 15cm to 2m. These models are made of cardboard or glass-fiber plastics and are powered by solid fuel engins or hybrid engins. Modell rockets usually reach heights from 100m up to 1500m over ground, depending on the size of modell and the engine.<br />
<br />
Beside the fun of designing and building the models, they also wanted to measure data during the flight and send them in realtime to a ground station. As ground station a laptop with an <a href="http://www.dresden-elektronik.de/shop/prod75.html">Sensor-Terminal-Board</a> from <b>dresden elektronik</b> was used. This boards have the advantage that they use a parallel to USB converter FT245BM, that allows high data rates between the microcontroller and the PC. The live data was written to logfiles and postprocessed later to get the resulting graphs and diagramms.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOLKY3kvxJkdAAyKJGigMiwEI5tYWwY4j8EpJ-IG3c0ElfCdjrq4LjARXCTvax6PbrWfIdc40nT8WLbZ0upJU4Gu-CtjIfKlw9PhLF8bT53j5P_-GZsi4M1Lv0TvWyDDaZmreYdST7vyKU/s1600/rockettip_small.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOLKY3kvxJkdAAyKJGigMiwEI5tYWwY4j8EpJ-IG3c0ElfCdjrq4LjARXCTvax6PbrWfIdc40nT8WLbZ0upJU4Gu-CtjIfKlw9PhLF8bT53j5P_-GZsi4M1Lv0TvWyDDaZmreYdST7vyKU/s200/rockettip_small.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">ROSE board mouned in rocket tip</td></tr>
</tbody></table>
Daniel build a circular PCB called ROSE (rocket sensor), consisting of an
ATmega, an AT86RF231 transceiver and several sensors to measure physical
parameters like air pressure, acceleration and earth magnetic field.
This parameters are sent wirlessly to the ground station and logged on the Laptop.<br />
<br />
For general information about modell rocket sports , check this page <a href="http://www.ag-modellraketen.de/">http://www.ag-modellraketen.de/</a> (in german).uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-29391362168110519312012-06-22T22:12:00.002+02:002012-08-01T22:05:36.475+02:00Picopter Instructable<a href="http://www.frank-zhao.com/pics/picopter_cutout.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="http://www.frank-zhao.com/pics/picopter_cutout.png" width="200" /></a>Today a friend stumbled across Frank Zhaos <b>Picopter</b> project that is documented at <a href="http://www.instructables.com/id/Picopter/">http://www.instructables.com/id/Picopter/</a>. The project basically consists of two PCBs, one is used as base station, connected with a Wii-Controller and via USB port with the PC. The other one is the flight modell, the "one-hand-sized" tiny little quadcopter. It looks like the ideal toy for kids up to the age of 40++ ;-).<br />
<a name='more'></a>The RF link between the Picopter and the base station is realized using
<a href="http://www.atmel.com/devices/atmega128rfa1.aspx">ATmega128RFA1</a> driven by uracoli-code.
<br />
The <b>Picopter</b> has a lot of advanced technical gimmics like random
RF channel selection and sensor data transmission to the PC, but I don't want to repeat Frank, better watch his video on youtube or here.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/7gpNkCmBlTM" width="420"></iframe>
<br />
I personally like this project very much, and maybe once a day there will be a swarm of <b>Picopters</b> showing interesting flight manoeuvres.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-39072555660697581182011-01-05T13:59:00.005+01:002012-08-01T22:05:57.772+02:00uracoli "spotted" in the news<a href="http://4.bp.blogspot.com/_qqqSPef4E70/TSRstIutBgI/AAAAAAAAAAM/oDAVQuSfKZU/s1600/1420-lemonde-small.jpeg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5558687362775320066" src="http://4.bp.blogspot.com/_qqqSPef4E70/TSRstIutBgI/AAAAAAAAAAM/oDAVQuSfKZU/s320/1420-lemonde-small.jpeg" style="cursor: pointer; float: left; height: 240px; margin: 0pt 10px 10px 0pt; width: 320px;" /></a><br />
<span style="font-style: italic;">Le Monde</span>, a major newspaper in France, published on December 31th, 2010, an article about a show (Vibrations, by <a href="http://1420.fr/">Compagnie 14:20</a>) 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 !Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-12328125327841404022010-12-21T19:38:00.003+01:002010-12-21T19:47:28.732+01:00Offtopic - WinterfunThe 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 <a href="http://www.youtube.com/watch?v=tPg1ZMiC9pA">ROBOPLOW</a> or <a href="http://www.youtube.com/watch?v=S3i_5yue-Qw">Robo Blower</a> (note the fancy cat/dog/*.life-form protection fence in the front).uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-84719082529850412872010-11-17T17:36:00.012+01:002010-11-18T05:33:36.567+01:00From 0.0.11 towards release 0.1.0In 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.<br /><br />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 / ...<br /><br />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:<br /><blockquote style="font-family: courier new;" or="" make="" all=""><br />install/src<br />|-- Makefile .. usage: make all or make [board]<br />|-- libioutil .. ioutil lib sources<br />|-- libradio .. radio lib sources<br />|-- ...XXX... .. wuart etc to be added<br />`-- obj .. temporary object storage.<br /></blockquote><br />With the command "scons puracoli" the next generation uracoli package will be created.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-81924193584292720502010-07-28T23:04:00.002+02:002010-07-28T23:22:14.958+02:00Further progress with packagingThe last two hours I did spend with finishing the build rules for the uracoli arduino package.<br /><br />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 <a href="http://cvs.savannah.gnu.org/viewvc/uracoli/Contrib/Arduino/arduino-0018-uracoli.patch?revision=1.2&root=uracoli&view=markup">arduino-0018-uracoli.patch</a>).<br /><br />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.<br /><br />The next steps will be<br /><ul><li> looking for a BSD licenseable stk500v1 bootloader<br /></li><li>adding Pierce's <a href="http://www.logos-electro.com/blog/2010/5/16/zigduino.html">Zigduino</a> to the list of supported hardware. </li><li>writing a simple wireless UART that illustrates the usage<br /></li></ul>uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-78035466384781176282010-06-27T20:41:00.003+02:002010-06-27T21:25:50.863+02:00Packaging with the Build SystemCurrently 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.<br /><br /><span style="font-weight: bold;">Step 1: Which archive format ?</span><br /><br />We started already with the ZIP format, because it is a very common format. Other exotic<br />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<br />(http://en.wikipedia.org/wiki/List_of_archive_formats)<br /><br /><span style="font-weight: bold;">Step 2: Finding the right tool for building Zip Files.</span><br /><br />If you google for Scons and Zip, then you are often guided to the distutils.make_zip module.<br />After some experiments it had shown that this funktion lacks some flexibility.<br />The Requirments for the uracoli package builder was:<br /><br /><ul><li>Zipping a file located somewhere into a virtual folder in the Zipfile.</li><li>Renaming files.</li><li>Adding a path prefix to all files.</li><li>No need to bulid a seperate tree and zip this tree.<br /></li></ul><br />It was found after some experiments, that all this can be achieved with the python ZipFile<br />module (http://docs.python.org/library/zipfile.html)<br /><br /><span style="font-weight: bold;">Step 3: Integrating it into Scons.</span><br /><br />Next a Scons builder had to be written.<br /><br /><pre><br />import zipfile<br />##<br /># This the Zipfile Builder Function for generating<br /># arbitrary Zipfiles.<br />#<br /># The function walk_tree is used to traverse any directory<br /># given and recursively adding the files therein.<br />#<br /># @param target<br /># Name of the Zipfile<br /># @param source<br /># List of the source files packed into the archive<br /># @param env<br /># From env the following keys will be used:<br /># - PREFIX :<br /># prefix that is prepended to each file packed in the archiv.<br /># It must not start with "/"<br /># - RELOCATE :<br /># Dicitionry that is used for translating file and directory names.<br /># - COMMENT :<br /># maximum 65535 byte long string that is added as comment.<br />#<br />def create_zip_file(target, source, env):<br /> target = str(target[0])<br /> sources = map(str,source)<br /> prefix = env.get("PREFIX","")<br /> relocate = env.get("RELOCATE",{})<br /> comment = env.get("COMMENT",None)<br /> # generate list of sourcefiles and its name mappings in zipfile<br /> ziplist = []<br /> for src in sources:<br /> for indirname, filelst in walk_tree(src):<br /> # normalize dirname to have / seperator to do dictionary lookup<br /> indn = indirname.replace("\\","/")<br /> outdirname = relocate.get(indn, indn)<br /> for infilename in filelst:<br /> outfilename = relocate.get(infilename,infilename)<br /> infn = os.path.join(indirname,infilename)<br /> outfn = os.path.join(prefix, outdirname, outfilename)<br /> ziplist.append( (infn, outfn) )<br /><br /> # write zipfile<br /> zf = zipfile.ZipFile(target,"w")<br /> for fn_in, fn_out in ziplist:<br /> zf.write(fn_in, fn_out, zipfile.ZIP_DEFLATED)<br /> if comment != None:<br /> zipfile.ZipFile.comment = comment<br /> zf.close()<br />##<br /># This function comes from:<br /># http://code.activestate.com/recipes/200131-recursive-directory-listing-in-html/<br />def walk_tree(top = ".", depthfirst = True):<br /> # This function recursively traverses a directory tree.<br />....<br />## Using the<br />com['BUILDERS']['ZipFile'] = Builder(action = create_zip_file, suffix = '.zip')<br /><br />pname = "mypkg"<br />flist = "install/inc/foo.h install/bin/bar.hex ....".split()<br />pkg = com.ZipFile("#/install/%s" % pname, flist,<br /> PREFIX = pname,<br /> RELOCATE = {"install/inc":"inc", .... },<br /> COMMENT = "A Pacakge")<br /><br /></pre><br /><br /><br /><span style="font-weight: bold;">Step 4: Defining Packages outside Scons.</span><br /><br />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 <a href="http://cvs.savannah.gnu.org/viewvc/uracoli/packages.cfg?revision=1.2&root=uracoli&view=markup">packages.cfg</a> in the root directory that contains all package description data.<br /><br />The File has <span style="font-style: italic;">win.ini</span> Style format and can be from the python module ConfigParser, that comes natively with the python install package.<br /><br />Voila, and thats in a few words the essence of the new package builder.<br /><br />There are of course the last 20% to perfection missing, e.g. listing the packages in scons help<br />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.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-1272609426204349392010-06-09T21:42:00.003+02:002010-06-09T22:01:23.619+02:00So many things - so little timeIt 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:<br /><br /> - humidity sensor controled ventilation system for the basement<br /> - wearable accelaration sensor<br /> - wireless intercom/door bell<br /> - personal area differential GPS transmitter.<br /> - wireless DMX interface<br /> - wireless POV device<br /> - community presence detector<br /> - use RF231 AES Block with Tiny230<br /><br />Started things that have to be finish:<br /> - move to a more modern version control system<br /> - make an Arduino software support package<br /> - release of a new sniffer package<br /> - include package generation into scons build<br /> - port AVR2070/RUM<br /> - document/test Wibo, the wireless bootloaderuracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com1tag:blogger.com,1999:blog-8254570506440292057.post-87050349267230648402010-05-28T22:40:00.004+02:002010-05-28T22:50:33.572+02:00Working with Daniels latest HardwareJust 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.<br /><br />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.<br /><br />Since both boards are running now, an acceleration application can be done next ;-)uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-84134894330511334062010-05-24T18:57:00.022+02:002010-12-21T19:49:08.086+01:00Understanding ED/LQI valuesI decided this rainy monday afternoon to have a closer look into the relation between LQI and ED values delivered from the radio transceivers.<br />
<a name='more'></a>The test setup consists of one of Daniels brand new Arduino compatible boards with the DE RFA1 module and an ordinary RCB230. The output of the range test application <a href="http://cvs.savannah.gnu.org/viewvc/uracoli/Src/Xmpl/xmpl_radio_range.c?revision=1.4&root=uracoli&view=markup">xmpl_radio_range.c</a> was recorded to a logfile. Daniels board was used for recording and did not move. The RCB230 was moved around during test in house and garden. 657 records of this type was logged:<br />
---<br />
:sta 0x0010 seq 230 key 1 lqi 192 ed 0 rxd 585 lost 397<br />
:sta 0x0010 seq 231 key 1 lqi 92 ed 0 rxd 586 lost 397<br />
:sta 0x0010 seq 232 key 1 lqi 172 ed 0 rxd 587 lost 397<br />
:sta 0x0010 seq 233 key 1 lqi 255 ed 0 rxd 588 lost 397<br />
---<br />
Interesting are the columns 8 and 10, which show the values of LQI and ED. With a small python script a dictionary was created, that counts all occuring combinations of LQI and ED values.<br />
<br />
{(60, 0): 1, (76, 0): 1, (88, 0): 1, ... }<br />
<br />
In total 75 different ED/LQI combinations was observed. The data was fed into matplotlib and the resulting picture looks so:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS7COf4nuBENMjEvTn36lKw2jvqq5AboFDfFuoT5Osz9dlbvi0fx9FycAhMKGqDFm5HY7gI5e1Inh2kN8z4hyphenhyphenLWv5PgvZqkB7w0bOhlb1jthA5INw89XBAT0DhNQ-G7TehK9mbczDdK8d2/s1600/ed_lqi.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5474902000151237410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS7COf4nuBENMjEvTn36lKw2jvqq5AboFDfFuoT5Osz9dlbvi0fx9FycAhMKGqDFm5HY7gI5e1Inh2kN8z4hyphenhyphenLWv5PgvZqkB7w0bOhlb1jthA5INw89XBAT0DhNQ-G7TehK9mbczDdK8d2/s400/ed_lqi.png" style="cursor: pointer; display: block; height: 300px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
<br />
Now the conclusion of this initial look is, that<br />
a) if the LQI value drops below 255, the ED value is 0<br />
b) for all ED values > 0, the LQI is almost always 255.<br />
<br />
Since all ED/LQI pairs came from frames received with valid CRC, the next step in this experiment is to show the dependency of ED/LQI in relation to the packet error rate. ... <i>to be continued</i><br />
<br />
<b>PS:</b> Here is the script, that was used for generating the image:<br />
<pre>import sys
from matplotlib import pyplot as pl
f = open(sys.argv[1])
hist = {}
for l in f.readlines():
x = l.split()
lqi = eval(x[7])
ed = eval(x[9])
key=(lqi,ed)
try:
hist[key] += 1
except:
hist[key] = 1
lqi_ed = hist.keys()
lqi_ed.sort()
pl.plot(lqi_ed)
pl.grid(1)
pl.legend("LQI ED".split())
pl.xlabel("LQI/ED pair")
pl.ylabel("LQI/ED value")
pl.show()
</pre>uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com0tag:blogger.com,1999:blog-8254570506440292057.post-35562362493902604722010-05-06T23:30:00.001+02:002010-05-08T12:54:38.634+02:00Welcome to the µracoli BlogIn this blog the details of the µracoli development will be documented, applications described, user projects introduced and last but not least the further directions of the development discussed.uracolixhttp://www.blogger.com/profile/08934402975098917685noreply@blogger.com1