Building Osmocom under Mac OS X

I ran into some trouble when I tried to build osmocom under Mac OS X. This is how I made it work. Thanks to the guys at #osmocom.

First: Make sure the complete build environment comes from within one source. For example from MacPorts. You will need following packages:

  • arm-elf-binutils
  • arm-elf-gcc
  • automake
  • autoconf

Second: Make sure your $PATH variable includes the executable of your build environment. For MacPorts this is usually /opt/local/bin. The path for MacPorts executables should be before the path of the native Mac OS X executables to make sure MacPorts executables are used:
mort:osmocon martin$ echo $PATH

Thats it. You now should be ready to compile your osmocom.

Getting Started with Contiki and the AVR Atmel RAVEN

Contiki is a very small operating system for sensor networks which is designed to work on microcontrollers with a very small amount of memory. According to their website Contiki uses 2 kilobytes of RAM and 40 kilobytes of ROM in a typical setup. The OS uses the uIPv6 stack which supports the 6LowPAN standard to be used on IEEE 802.15.4 radio links.

To get started with the RAVEN Kit and Contiki I had to install a new firmware on theRZUSBstick and the AVR Raven. Basically both devices are intended to be programmed using their JTAG interface. But JTAG programmer are rather expensive and I do not own a JTAG programmer, therefore I had to use the devices ISP port. You need an ISP programmer you can hook up your PC – I use the myAVR MK2 programmer, but in general you can use any other JTAG programmer that is compatible with avrdude.

The Raven has soldering points for ISP, unfortunately the RZUSBstick has not. You can find a quite good post by Michal Ossmann that explains how to connect ISP to the RZUSB – you basically have to soldier some wires directly onto the pins of the microcontroller. This is tricky, advanced soldering skills are required.

As soon a you finish soldering you can hook up the wires to your ISP. I downloaded the binary release of Contiki to flash it on the devices. The firmware is in ELF format which contains both, EEPROM and FLASH of the firmware in one file. Avrdude does not support this format, therefore the ELF file must be split into EEPROM part and the FLASH part as explained on For example the ravenlcd firmware:

# export NAME=ravenlcd_3290
# avr-objcopy -R .eeprom -R .fuse -R .signature -O ihex $NAME.elf $NAME.hex
# avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex $NAME.elf $NAME.eep

After that you can use avrdude to flash the FLASH part and the EEPROM part separately:

# avrdude -p m3290p -c avr911 -P /dev/ttyUSB0 -U flash:w:ravenlcd_3290.hex -B10
# avrdude -p m3290p -c avr911 -P /dev/ttyUSB0 -U eeprom:w:ravenlcd_3290.eep -B10

You have to repeat these steps for webserver6.elf and ravenusbstick.elf.

For setting up your IPv6 network interface and radvd on the host the RZUSB is connected you can follow the tutorial on the Contiki Webpage.

If everything works it should look like this: Pinging AVR Raven!! 🙂

Geektoys: ATMEL AVR Raven 2.4 GHz Evaluation Kit

Recently bought the AVR Raven 2.4 GHz Evaluation Kit by Atmel. A development Kit for 802.15.4, Zigbee and 6LoWPAN networks. I contains one USB dongle which is basically meant to hook up your computer to one of the mentioned networked and two AVR Raven boards. They are battery powered have a 2.4 transceiver, display, small joystick, temperature sensor JTAG and ISP for the start. Of course there are also some IOs to connect external sensors. I found this hardware having a look at the IPv6 enabled contiki OS. I think I will spend some time with this hardware exploring sensor network technology 🙂 By the way, I think this development kit is pretty cheap. You can get all the stuff for less than 120 EUR!

Bricked Bluetooth Dongles Everywhere

There have been some comments about bricked Bluetooth dongles after flashing Frontline firmware on it. FTE seems to have modified the firmware layout of the Frontline dongles which will leads to bricked Bluetooth dongles when you try to flash them with this firmware.

Till now I didn’t had the time to take a closer look on this. Anyway for unbricking your dongles have a look at this post. I used the SPI interface and a Bluetooth Casira Development board to unbrick the dongle. Unfortunately you need the quite expense develpment board and the software to fix the dongle, but in theory it should be possible to fix this with homebrew software and hardware.

If a have some free time during the next month I will take a closer look on this topic.