Designing, Simulating and Testing a Simple Radio Duty-Cycling Protocol for Contiki

A few days ago we featured [Marcus]‘ Contiki port to the TI Launchpad, Contiki being an open source operating system dedicated to the Internet of Things created by [Adam Dunkels] at the SICS in Sweden. Part of [Marcus]‘ work involved designing a simple radio duty-cycling protocol┬áthat achieves 3% idle listening duty cycle while allowing for an average 65ms latency with no prior contact or synchronization.

As a few readers may already know, it takes quite a lot of power for a wireless device to listen/send data. A platform therefore needs to have an algorithm that minimizes power consumption while allowing a (regular) planned data transfer. After creating his protocol named SimpleRDC, [Marcus] first simulated it using the Cooja simulator in order to check that it could perform as desired. He then implemented a real life test and checked the protocol’s performance by sniffing the SPI lines connecting his MSP430 to the wireless module and by monitoring the platform power consumption with his oscilloscope and a shunt resistor.

Porting Contiki to the TI MSP430 Launchpad

For many years Contiki has been one of the main choices when it came to choosing an IPv6 over Low power Wireless Personal Area Networks stack (aka 6LoWPAN). It is developed by a world-wide team of developers with contributions from Atmel, Cisco, ETH, etc… and is open source. As most platforms to which Contiki has been ported are quite expensive, [Marcus] decided to bring the operating system to the TI Launchpad. For our readers that don’t know, the latter is based on a msp430g2452/2553 microcontroller, which only have 256/512 bytes of RAM and 16kB of ROM. As a side note, Contiki typically requires 10k RAM and 30k ROM.

[Marcus] therefore had to remove several features from Contiki: queue-buffering, energy estimation and regrettably uIP. His test setup (shown above) uses the TI CC2500 radio that can be found for less than $2 on Aliexpress, for which he wrote radio drivers from scratch. He also coded his own radio duty-cicling layer, as the one included in Contiki was too big.

IPv6 to 1-wire protocol translator

[Fli] assembled an AVR based system that can assign IPv6 addresses to 1-wire components. An AVR ATmega644 microcontroller is used in conjunction with an ENC28J60 ethernet controller chip. To get up and running with IPv6 on this meek hardware [Fli] ported the uIPv6 stack from the contiki project over to the AVR framework. Although he encountered some hardware snafus along the way, in the end he managed to get five sensors connected to the device, each with their own IP assigned using the stack’s alias capability.

This is great if you’re looking for a low-cost IPv6 solution. We’re not sure if there’s much demand for that, but it’s useful for that 1-wire home automation setup you’re considering.

C64 Twitter client

c64_twitter

The last of the Commodore 64′s shortcomings has been addressed; it finally has a Twitter client. [Johan Van den Brande] wrote BREADBOX64 for use on the C64/128. It’s running on top of the open source Contiki operating system. The hardware is an MMC Replay cartridge with an ethernet adapter. If you don’t have the hardware available, you can run it inside an emulator like VICE. Embedded below is a C128D running the program.

(P.S. all of our posts are on @hackadaydotcom)

Continue reading “C64 Twitter client”