Category: code

DES-Chan – Channel assignment framework and algorithms at github

I finally found the time to clean up the code for DES-Chan, the channel assignment framework, and the algorithms based on it. Work on the framework started already 4 years ago and has been grown steadily due to the great work of a changing team of students and co-workers. It is also the foundation for most experiments in my dissertation work. The code for the framework, the distributed channel assignment algorithms, and the ETX daemon for neighbor discovery in a wireless mesh network are now part of the DES-Testbed repositories at github.  Thanks again to everybody who has contributed so

Posted in code Tagged with: , , , , , , , , , , , ,

RYC is back!!!

After a 5-year sabbatical, we finally relaunched reclaimyourcity.net with a brand new website! The relaunch is the result of the last couple of months of setting up and extending Drupal, refining the old content and photo database, and creating lots of exciting photo specials and articles about street art. Hopefully, the site will get its full momentum again soon!    

Posted in code Tagged with: , , , , , , ,

Implementing CSMACA for the SmartPacketRadios

One of the projects during my research visit at the Monash University’s Wireless Sensor and Robot Networks Laboratory was the implementation of CSMACA for the SmartPacketRadios. The SPRs run on an Atmel AT90USB1286 microcontroller and the Hope RFM22B transceiver. It was lots of fun to program and play around with the sensor nodes. So far, they used ALOHA for the MAC layer. A new shipment of nodes was just rolling in to extend the testbed in Clayton. Thus, a more sophisticated MAC protocol was required to minimize message collisions. The CSMACA implementation is pretty straightforward. Before the actual transmission, the node

Posted in code Tagged with: , , , , , , , , , , , , , ,

Colorful mass: LED bar for bikes

While cleaning up my office, i rediscovered our color LED bar that paints colorful images while you ride your bike. The Persistence of Vision (PoV) device is mounted into a bike wheel – it consists of 34 RGB-LEDs and an MSB-A2 wireless sensor node. The sensor node measures the bike speed and adjusts the LED switch time, so that the whole image is displayed in exactly one full rotation of the wheel. This way, the image appears to be in a fixed location for the observer (provided you ride fast enough). We built it initially for the long night of science,

Posted in code Tagged with: , , , , , ,

Drupal: Check and render image fields

At reclaimyourcity, we have picture and artist nodes and relate them via a node reference. Now some of the artists may have a little profile comprising a picture and a description. When viewing the artist profile and there is no profile picture yet, we want to show the latest submitted picture of the particular artist instead. For this, we first need to check the value of the profile picture field and if it is not set, we need to get and render the latest picture of the artist. The first question is where to perform this check. Fortunately, Drupal offers

Posted in code Tagged with: , , , , , , ,

Drupal: Group and sort by taxonomy term

For the reclaimyourcity relaunch, we added different categories (via taxonomy) for our picture specials. Now, a view was needed that displayed all special titles grouped by the particular category. And the categories should be sorted by the term’s weight since the category other should be displayed last. The following steps delivered the desired result: 1. First select the required fields of the picture specials, namely Content: Title and Content: special_type which refers to the terms of the corresponding vocabulary. 2. Exclude the special_type from display and in the grid layout settings, set the grouping field to special_type. Now, the picture specials are already

Posted in code Tagged with: , , , , ,

Measuring throughput in wireless networks: iperf vs nuttcp

As part of my PhD thesis, I investigate the impact of interference on the network performance in large-scale multi-hop wireless mesh networks. Most experiments are based on throughput measurements to determine the maximum capacity of a link in interference-prone scenarios. iperf has almost become the standard traffic generator for this task in wire line and wireless networks alike. However, control packets to signal the start and end of a traffic flow are exchanged between the two endpoints of the measurements on the same channel that is subject to the measurement. In wireless networks with possible high levels of interference, these

Posted in code Tagged with: , , , , , , ,

Drupal: Tweaking block visibility for content types and URLs

For the relaunch of reclaimyourcity.net, I recently developed a custom pager module that provides a block with links to the previous and next picture according to the particular gallery. The visibility settings for the block are restricted to the content type of the street art pictures. However, the pager also tries to show up on the node add/edit pages which is not very useful there. Based on the posts in this thread about block visibility at drupal.org, adding the following PHP validation prevents the block from showing on the node create/edit pages. <?php $show = TRUE; $url = request_uri(); $hide_on_pages

Posted in code Tagged with: , , , , , ,

Jamming WiFi radio channels with Python Twisted

Most of my work aims at reducing interference in WiFi-based multi-hop mesh networks. Since WiFi radios operate in the unlicensed frequency band, external stations and devices might be active there as well, resulting in high interference levels and eventually in a low network performance in terms of throughput. One way to detect such external devices is to measure the channel load (or channel occupany, busy time, ..) based on the carrier sensing statistics of the radio. For testing the efficiency of this method, i implemented a simple traffic generator based on Twisted. The traffic generator’s only function is to create a

Posted in code Tagged with: , , , , ,