802.15.4 wireless sensor network prototyping

I have been looking into wireless sensor networks for some time, and I definitely need to jump into the wagon and order some development kits to play/experiment and build some prototypes. 802.15.4 is the radio layer used by Zigbee. I am not constrained to using specifically Zigbee and I prefer open-source stacks, but I would like to stay with 802.15.4 as it is more widespread than other technologies like DASH7. My current hardware options are:

  • Libelium. The Squidbee motes provide a prototyping solution based on Arduino, which is designed for teaching and educational purposes, while Waspmote is their commercial platform. They look very efficient and well built , with good documentation and support.
  • Openpicus. These guys provide an interesting platform for prototyping based on open-source software running FreeRTOS.
  • Some of the platforms based on TI’s CC2420 chip.

Wireless sensor networks need to be programmed in an efficient way due to the limited processing, storage and power resources of a typical sensor node, which is difficult to accomplish using high-level languages. Normally C or a specific dialect like e.g. nesC (used on TinyOS) is needed. The operating systems used on the different wireless sensor platforms can be split between free academic implementations, like TinyOs or Contiki, and proprietary OS layers used on Zigbee stacks, like TI´s Z-Stack, Freescale or Ember´s stack. These proprietary implementations don´t provide an unified C API, the only Zigbee compliance requirement being a correct over-the-air behavior. There have been some attempts at building an open-source Zigbee stack, but I am not aware of a successful one.

An interesting project is zigbee-linux, although it has a misleading name as it only covers 802.15.4. Zigbee itself is not compatible with the GPL, but there are efforts underway to bring to the table alternative protocols which are built on top of 802.15.4 and are GPL compatible, like 6lowpan/ROLL. One good option I have found for running an open wireless sensor network stack is SICSLoWPAN, an open-source IPv6 over 802.15.4 stack.

What do you think? Any platform you can recommend?

Posted in Uncategorized | Tagged , , | Leave a comment

Agile methods on embedded software

Lately I keep hearing a lot about software companies moving into agile development processes. Irrespectively of the hype surrounding these news, I think some agile practices are really worth implementing in an embedded software environment: I have had great success e.g. with fast development cycles and continuous integration.

However, we need to be cautious with specific issues surrounding embedded systems, which I think make some of the agile practices less suitable for embedded software development:

  • Pair programming is quite difficult to implement as embedded software is complex, with issues involving hardware interfaces, real-time behavior and multitasking; this complexity means it is not easy to achieve a uniform level of knowledge across different areas for different engineers to contribute effectively through this practice.
  • Continuous customer communication may not be effective as most of the embedded systems software remains hidden from the customer, who usually is not able to grasp the inner workings of complex software.

This is what embedded guru Jack Ganssle thinks about the topic. What do you think? Are agile practices definitely worth using in embedded systems development?

Posted in Uncategorized | Tagged ,

Open source tools in the Spanish embedded systems industry

Although I agree that proprietary software should have their own space within the embedded systems industry, there are some open source tools I consider essential when developing embedded software.

Cenatic is the Spanish national reference center on open source technologies. They have published an interesting report on the usage of open source software on the embedded systems industry in Spain. Especially interesting is the comprehensive list of open source tools covering all phases of the development life-cycle, some of which I intend to incorporate into my toolset.

Posted in embedded | Tagged , | Leave a comment

Mentoring SANS SEC401 in Madrid

I will be mentoring a SANS Security 401 class in Madrid, starting the 6th of October. This class gives an overview of many security topics, and provides a great foundation on which to build your security career. I passed the GSEC certification test last year and preparing for it was quite challenging and interesting, with loads of hands-on exercises and very relevant and up-to-date course material.

Most likely the course will be held at HUB Madrid, hope to see you there!

Posted in Uncategorized | Tagged | Leave a comment

Setting up a NanoBSD router on a Soekris net5501

NanoBSD is a great set of scripts that facilitate the compilation and installation of a custom full FreeBSD system on embedded devices. It is particularly suited for booting from CF cards, as it creates a read-only root file system, with the read-write partitions mounted on RAM (md) so as to reduce wear on the card.

I have had for some time a Soekris net5501 box gathering dust, which I bought to replace the Linksys router I use on my home lan. It is time to roll up my sleeves and get my hands dirty. The Soekris board will be a perfect gateway with around 5W power consumption and no moving parts that allows loads of flexibility to install lan services that are not available (or not so configurable) in a cheap off-the shelf router, like:

  • pf firewall
  • dhcp
  • ntp
  • dns with bind
  • proxy with squid
  • VPN, network monitoring, etc

I have installed a FreeBSD 8.1 system on vmware, to be used for building the NanoBSD images, which together with a null-modem serial cable  for connecting to the net5501 console, and a 4GB Sandisk CF card (yes, I know it is overkill, but it is just 3 euro more than 2GB, the smallest one I can buy) is all I need to give some new life to my Soekris Net5501 box.

Initially I had to update the FlashDevice.sub file with the parameters corresponding to my Sandisk CF card. The quickest way I found of getting the cylinders/heads/sector information for this specific card was to insert it in the Soekris device and boot it up. The BIOS shows the parameters for the inserted card when booting.

These are the different ways to customize a NanoBSD installation:

  • configuration settings that override the default values set within nanobsd.sh, as well as the kernel compilation settings that will be passed to the buildworld stage.
  • configuration files or scripts copied to the Files directory. The file system hierarchy created on the Files directory gets overlaid into the target root file system during the build, by setting customize_cmd cust_install_files. I got some interesting scripts from here.
  • packages for the software not included in the base system have to be copied to the Pkg directory. These packages will be installed into the target image by setting customize_cmd cust_pkg.

Any configuration changes on the live system need to be written into /cfg, as /etc is mounted on the md (malloc) disk and changes are lost on reboot. It is recommended to keep these changes synchronized with the configuration files in our main computer.

I built the image with

nanobsd –c <config_file>

There were some issues with booting the CF card, the most annoying being that the boot menu was missing and always the partition 1 was chosen automatically. This issue seems to be caused by boot/boot0sio, so I went to use boot/boot0 instead:

NANO_BOOTLOADER=”boot/boot0″

Thus we get the corresponding boot menu after BIOS initialization:

1 Seconds to automatic boot. Press Ctrl-P for entering Monitor.

F1 FreeBSD

F2 FreeBSD

F6 PXE

Boot: F1

Furthermore, the TERM environment variable has to match the setting on the terminal program used to connect to the serial console, otherwise there may be issues when displaying programs that use the whole terminal, like vi or sysinstall. I have used vt100 setting on minicom and putty, after updating /etc/ttys accordingly:

ttyu0 “/usr/libexec/getty std.9600” vt100 on secure

Finally, the NanoBSD images can be updated without removing the CF card from the box. In our setup, we have configured two identical partitions to be used alternatively when upgrading the software. When running from partition 1, /root/updatep2 is able to fetch and install remotely a new image on partition 2. Bear in mind there is currently an issue with boot0cfg in these update scripts.

ssh myhost cat _.disk.image.gz | zcat | sh updatep2

And now it is time to bury my head in the pf configuration book and install a bunch of services this box is screaming for.

Posted in Uncategorized | Tagged , , , | Leave a comment

DNIe development workshop in Valladolid

The technical workshop on the Spanish electronic ID card, DNIe, that took place in Valladolid the 1st of June, provided a good introduction into a subject I have just started to look into. The DNIe support website offers loads of resources useful for development of applications built around the usage of a DNIe smartcard.

I am now looking into OpenSC and support for DNIe on Ubuntu Lucid, which seems to be a problem right now as the OpenSC driver supported for usage with the DNIe is provided in compiled form, using a version of OpenSC that lags behind what is available with most modern distributions. I will keep you updated.

Posted in Uncategorized | Tagged , , | Leave a comment

EW2010

Embedded World 2010 in Nuremberg was a great exhibition and conference. The trendy topics this year seemed to be Android and energy-efficient computing, with a myriad of vendors selling low-power embedded solutions. There were as well plenty of ARM related tools and chip vendors, with ARM getting bigger all the time. Also, an example of open source and proprietary software coexisting side by side:

Posted in embedded, Uncategorized | Tagged , , , , , | Leave a comment