Software-Defined Solution

Primitives are implemented to build various PHY and MAC layer protocols in the Linux operating system.  

Design of OpenVLC


OpenVLC cape (front-end transceiver) includes three optical components: a low-power LED, a high-power LED, and a photodiode (PD). The low-power LED can be reused for both the transmitting and receiving of light signals. This design has been proved to be resilient to ambient light interference without additional electronic processing. Another advantage of exploiting the low-power LED for reception rather than adding a PD is the lower cost of LEDs Compared to photodiodes.

The software-defined transmitter (TX) selector can choose the TX between the low-power LED and the high-power LED. Similarly, the software-defined receiver (RX) selector can select the RX between the PD and the low-power LED. 

OpenVLC components

OpenVLC needs just a few components to work:

  1. BEAGLEBONE Black (BBB) Board (needs Rev C; to use the high-power LED in the cape, you need to connect an external 5V power supply to the BBB): cost $ 45- $ 60; AM3359 1GHz CPU, 4 timers, 65 GPIOs
  2. OpenVLC1.1 cape:  the VLC front-end
  3. OpenVLC1.1 driver: software defined PHY and MAC layer, implemented as a Linux driver

The software solution is implemented as a Linux driver that can communicate directly with the cape and the Linux networking stack. In OpenVLC, the VLC interface is set up as a new communication interface that can take advantage of the vast range of Linux tools.

Cape plugged into the BBB board

BBB board

OpenVLC1.1 cape

Experimental Setup

The Linux operating system running on the BBB board is the Debian Distribution with Xenomai patch. You need to update the default operation system first. Refer to "Preparation & Install" on how to do this. 

Preparation & Install

  • There are two methods to update the BeagleBone Black OS to add Xenomai support (please choose one from them):

    • Method 1: install Xenomai by yourself and download the OpenVLC source files. Click here to see the manual;

    • Method 2: update the whole OS that contains the Xenomai and OpenVLC source files. Click here to see the manual.

  • (If you use method 1, then assume you create a folder "OpenVLC1.1" on the BBB and copy all the source codes to that folder.) Then under the folder "OpenVLC1.1" of the BeagleBone Black:

    • Source codes of the driver are within the files "openvlc.h" and "openvlc.c";

    • Run the command "make clean; make" to compile the source codes;

    • The generated file "vlc.ko" is the driver;

    • The driver can be inserted by commands similar to "insmod vlc.ko  frq=10 ", where the frequency is the sampling rate of the PHY communication, expressed in KHz (currently, the maximal frequency that OpenVLC can operate stable  is 50 KHz);

    • A new network interface device named "vlc0" is generated after inserting the driver. You can use the command "ifconfig" to configure the IP address of the interface "vlc0";

    • Several scripts are available for running the experiments;

Initial experiments

Here we give an example for testing the throughput performance with two OpenVLC nodes and with a classical iperf tool.

1. For convenience, first change the IP address of one BBB. When it connects to the laptop through the USB:

  • Log into one of the BBB: sshpass -p 'machinekit' ssh machinekit@;

  • Open the file /etc/udhcpd.conf and change all to;

  • Open the file /opt/scripts/boot/, move to line 96, change it from "/ sbin / ifconfig usb0 netmask" to "/ sbin / ifconfig usb0 netmask ";

  • Restart the BBB, at the laptop type the command "ifconfig", and you will see That the default for this BBB has been changed.

2. Test the throughput performance with iperf:

  • Log into the two BBBs using ssh ( and sshpass -p ‘machinekit’ ssh machinekit@192.168.X.2

  • Switch to the folder "OpenVLC1.1": cd OpenVLC1.1

  • **START experiments**:  select one node as a server, say,, and the other one as a client.

    • At the Server (

      • run the script “”

      • run the script “”

    • At the Client (

      • run the script “"

      • run the script “”

              You will see the iperf report at the server.

  • If you want to switch between the LED and PD as a receiver, or switch between the High-power LED and low-power LED as transmitter, you can:
    • remove the module at the nodes using: rmmod  vlc.ko
    • modify the file “” or the file “”:
      • use “echo X > /proc/vlc/tx” to switch the transmitter (‘X’=0: low-power LED; ‘X’=1: high-power LED).

      • use “echo X > /proc/vlc/rx” to switch the receiver (‘X’=0: low-power LED; ‘X’=1: PD);

      • redo the steps from “**START experiments**”.

  • Some output information of the MAC layer can be seen using the command "dmesg -c".