In order to test CSMA/ECA in real hardware, we have successfully replaced the firmware running in Broadcom BCM4318 wireless network interfaces (WNICs) with a modified OpenFWWF firmware, as we commented before.
The figure above shows the result of a throughput evaluation derived from those tests. The Bd = 7 means that CSMA/ECA’s deterministic backoff waits for slot 7 (8 slots, counting the slot 0) before attempting transmission.
The problem with this setup is the lack of mobility or reconfiguration. STA1 and STA2 are two PCs and are very cumbersome to move and test different scenarios. Furthermore, to accurately appreciate the gains of CSMA/ECA the experiment should be composed of more contenders.
To that end we have purchased two PC Engines Alix 2d2. This mini computers can be thought at Raspberry Pi on steroids.
The image above shows one of our two Alix 2d2 computers with a 4 GB Compact Flash (upper right corner) and a Broadcom BCM 4318 WNIC (at the center) which we (very roughly) connected a pigtail cable to an antenna adapter. This is to be fixed soon when new pigtail cables arrive.
With this type of device we are able to create new testing scenarios for CSMA/ECA, although at the moment we started the tests with only two to replicate the results obtained with the PCs.
It was recommend to use OpenWRT instead of Ubuntu for the following reasons:
- Really compact image.
- It is fairly easy to add new software with the built-in toolchain.
- Everything is kept at the RAM flash.
- Underlying Linux-esque filesystem.
You can build the OpenWRT on a recent Ubuntu PC. For instance, this process was all executed in an Ubuntu 13.04 computer with 4 cores. The following packages are needed:
All can be acquired by issuing the following command from the Terminal: $: apt-get install <the packages you need>.
The configuration and compilation:
Now that you have all the packages you need, let’s start the process.
- Create a directory anywhere you want and name it codebase, issuing: mkdir codebase
- Download OpenWRT into this directory (using version 33669):
- Add Iperf by exploding this package into the codebase directory.
- $: cd backfire
- $: tar zxf iperf-openwrt.tar.gz
- Inside the backfire directory, you now must have the following subfolders and files:
- Configure OpenWRT issuing the following commands:
- $: cd backfire
- $: make menuconfig
- The last command will take you to a graphical menu, where you may select the configuration options by navigating with the keyboard arrows. Here is where you add b43 and other packages like Iperf. Now, let’s configure the installation by enabling/disabling the following packages.
- Select Target System x86
- Select Subtarget Generic
- Select Target Profile PCEngines Alix
- Check that: Base system > busybox > Configuration > Login/Password Management Utilities > login, is enabled.
- Check: Network > IP, is enabled.
- Check: Network > iperf, is enabled.
- Check: Kernel modules > Filesystems > kmod-fs-ext4, is enabled.
- Check: Kernel modules > Wireless Drivers > kmod-b43, is enabled.
- Check: Kernel modules > Wireless Drivers > kmod-b43 > Configuration > Enable debug, is enabled.
- Check: Kernel modules > Wireless Drivers > kmod-mac80211 > Configuration > Export mac80211…DebugFS, is enabled.
- Check: Kernel modules > Wireless Drivers > kmod-b43legacy, is enabled.
- Save the configuration, exit, determine the number of cores of your system and build.
- For determining the cores of your system: $: nproc
- The output of the command above represents the number of cores in your system, and the argument for the make command: $ make -j <number of cores>.
- Apply the dma patch and recompile everything:
- $: cd backfire/build_dir/linux-
- $: patch -p0 < /path/to/b43-dma.patch
- $: cd ../../../ (going back to backfire directory).
- $: make -j <number of cores>.
- $: cd backfire/build_dir/linux-
- After the compilation, you will end up with bin/x86/openwrt-x86-generic-
combined-ext2.img.gz. Unzip it to get the .img file.
- $: gunzip /path/to/openwrt-x86-generic-combined-ext2.img.gz
Uploading the image to the Alix’s CompactFlash:
To write to this kind of memory cards you will need a CompactFlash reader. It is like a SD or Memory Stick reader. Connect it to the computer, format it (FAT32 suffices) and copy the image, bit-by-bit by issuing the following:
- $: dmesg (check the /dev/sdg port mapped to the just connected CompactFlash reader. It should be some of the bottom messages if you just connected the reader.)
- $: dd if=/path/to/openwrt-x86-
Regarding the dmesg command: I have tried to configure the of (output file) as /dev/sdgXX, where XX is a number assigned to a specific USB port. Nevertheless, it did not work. Therefore, I recommend disconnecting other USB devices except the reader and use /dev/sdg (or other dmesg derived location like /dev/disk) as of.
You’re done. Now, connect the CompactFlash to the Alix, power it on and connect to it through one of the Ethernet interfaces (the one having 192.168.1.1 as the default IP address) via Telnet (e.g.: $: telnet 192.168.1.1).
It is recommended to set a SSH password for the root user. Read a little by about it before connecting for the first time.
Thanks to Francesco Gringoli, involved in the OpenFWWF project for such detailed set of instructions.