OpenVLC needs just a few components to work:
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.
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.
Cape plugged into the BBB board
Primitives are implemented to build various PHY and MAC layer protocols in the Linux operating system.
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.
There are two methods to update the BeagleBone Black OS to add Xenomai support (please choose one from them):
(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;
The latest source code of OpenVLC will be updated here: https://github.com/openvlc/openvlc.
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 email@example.com;
Open the file /etc/udhcpd.conf and change all 192.168.7.1 to 192.168.8.1;
Open the file /opt/scripts/boot/am335x_evm.sh, move to line 96, change it from "/ sbin / ifconfig usb0 192.168.7.2 netmask 255.255.255.252" to "/ sbin / ifconfig usb0 192.168.8.2 netmask 255.255.255.252 ";
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 (192.168.7.2 and 192.168.8.2): sshpass -p ‘machinekit’ ssh firstname.lastname@example.org.X.2
Switch to the folder "OpenVLC1.1": cd OpenVLC1.1
**START experiments**: select one node as a server, say, 192.168.7.2, and the other one as a client.
At the Server (192.168.7.2):
run the script “load_driver_server.sh”
run the script “iperf_server.sh”
At the Client (192.168.8.2):
run the script “load_driver_client.sh"
run the script “iperf_client.sh”
You will see the iperf report at the server.
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".