Testing the cape without BBB
Although OpenVLC 1.3 cape is designed to be connected to the BBB, its functionalities can be tried without one. This step is not essential and requires additional devices such as a waveform generator or an oscilloscope. But it can be useful to test its correct functioning before plugging it to the BBB and to avoid possible damages to the board.
TX mode
Set the connections shown in the image below.
Once it’s plugged, connect the 5 V power supply and that’s all.
ATTENTION: Be careful not to bend the components that stand out when you press or pull the cape.
Setting up the VLC link
There are two parts in the TX/RX, the kernel driver and the PRU code. Follow these steps:
cd /usr/share/ti/cgt-pru
sudo mkdir bin
cd bin
sudo ln -s /usr/bin/clpru clpru
sudo ln -s /usr/bin/lnkpru lnkpru
Working with the VLC link
Once you have done the steps above in TX and RX, you can start using VLC as a common network interface.
You could measure the achievable throughput by using the iperf tool. To this end, launch iperf in client mode at the TX (sudo iperf -c 192.168.0.2 -u -b 400k -l 800 -p 10001 -t 100) and in server mode at the RX (sudo iperf -u -l 800 -s -i3 -B 192.168.0.2 -p 10001). Make sure that TX and RX have different IPs and the IP of the RX (iperf server) is 192.168.0.2.
The image below shows the results of an iperf test at 2.5 meters of distance:
Connect a 5 V power supply to the jack port. To emulate a transmission with OpenVLC 1.3 you can produce in the cape pin TX SIGNAL (P8_45 in BBB) a square wave between 0 and 3.3 V at 1 MHz. The LED should light on without any noticeable blinking. Modulated light can be measured with a fast light-sensing device (photodiode) connected to an oscilloscope.
To test constant illumination, connect TX SIGNAL to GND and the pin next to it (P8_46) to 3.3 V. The LED should provide similar illumination level than in the previous case.
RX mode
Set the connections shown in the image below.
Design of OpenVLC
The OpenVLC1.3 takes advantage of the programmable real time units (PRU) included in the BBB. This,and the new receiver design allow us to increase the transmission frequency to 1 MHz and, thus, the communication rate. One cape can work as Transmitter (TX) or Receiver (RX), but not at the same time.
Connect a 5 V power supply to the jack port. Produce a square wave between 0 and 3.3 V at 1 MHz at ADC CS, and a square wave between 0 and 3.3 V at 48 MHz at ADC SCLK. You can read the serial digital output from the ADC in the cape on pin RX SIGNAL.
If you have doubts and questions about these instructions, please leave your message in our Google group: https://groups.google.com/forum/#!forum/openvlc
Code and schematics are available at https://github.com/openvlc/openvlc
(Note: we do have also the new OpenVLC1.4 version available on github. Nevertheless, it is currently in Beta version.) 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.
Experimental Setup
These instructions assume you have two BBBs and two capes. In case you have only one cape, and you want to test its functionalities, check the section "Testing the cape without BBB" at the bottom of this page.
Creating the SD Card
We need to flash the BBB with a Debian image. To do that we need a SD Card with at least 4 GB. Follow these steps:
Flashing the BBB
Now that we have the SD Card ready with the image, we need to flash the BBB. Follow these steps:
Setting up the OS
The firsts steps are to prepare the beaglebone. This must be done in the OpenVLC board operating as TX as well as in the OpenVLC board operating as RX. These are the steps:
Connecting the cape
Connecting the cape to the BBB is quite easy. You just need to plug the cape to the correct pins as shown in the image below: