Installing OpenVPN on Ubuntu 12.04

The company I have been working for for a couple of months has an OpenVPN server running. Recently I wanted to install the client software on my Windows 7 desktop and my Linux laptop.

Our IT guy kindly supplied me with a executable to install and configure the client under Windows and a config file and certificates for Linux.

Windows 7 worked immediately but under Linux I had to do some extra steps to get it working properly. I’ll document them here for future reference and maybe other people running in to the same issues.

I had previously installed OpenVPN under linux and hoped the config file would be all I needed. When running

openvpn –config configfile.ovpn

I got the error message:

Options error: Unrecognized option or missing  parameter(s) in configfile.ovpn:11: verify-x509-name (2.2.1)
Use –help for more information.

Some digging around showed the “verify-x509-name” command was implemented starting at OpenVPN version 2.3. Using

apt-get install openvpn

and the default repositories in Ubuntu the installed version was 2.2.1

To get the latest version, I uninstalled the current installed version using

apt-get purge openvpn

then downloaded and untarred the latest version from the community downloads (at this time 2.3.6)


tar -zxvf ./openvpn-2.3.6.tar.gz

Installing should work this way:

cd ./openvpn-2.3.6

./config && sudo make && sudo make install

but I ran into dependency problems. Some error messages came up regarding the LZO package.

configure: error: lzo enabled but missing

I found this page by Droidzone describing the dependencies and some useful information on how to find missing dependencies during future installs. Worth a read.

In short:

sudo apt-get install libssl-dev liblzo2-dev libpam0g-dev

will install the necessary dependencies. After this the installation went fine:

openvpn –version

OpenVPN 2.3.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [eurephia] [MH] [IPv6] built on Dec 24 2014

Wireless Tally for JVC GY-HM790 cameras

I’ve been working on my wireless tally system for a while now. Apart from the connection to the camera (for which I want to use a different connector to alter the appearance of the camera as little as possible) it is finally finished. Looking back, this has taken me much more time than I expected. But as this was the first project that I wanted to do in a more professional way instead of just throwing something together that shouldn’t necessarily be a bad sign. I’ve tried to keep revisions of the schematics, board design and code, as well as a clear BOM that can be used as a guideline in the future, should the need arise.

But first some background as to what the idea behind this project was.

When using different cameras to record any live set (be it show, television, concerts,..) it is important for a cameraman to know when his camera is selected and recorded or shown on screen. He then knows to keep his framing, or do whatever he is supposed to do during the shot. While most systems use an intercom to let the director talk to the crew, it’s not really a good option to have him cue every shot to the camera crew. Also, there might be a talent on stage that needs to know what camera to look into during a presentation.

Enter a tally system. That red light on top of television cameras? That’s a tally. Depending on the configuration it might be a red light in front of the camera, at the back, in the viewfinder or any combination of those. The signal comes from the mixing console and is usually relayed to the cameras by a dedicated connection in a multicable or embedded in a muxed signal on a triax cable.

But what if you can’t or don’t want to use an expensive triax or heavy multi cable? Imagine running the cameras on battery power, sending the video signal wireless, or just prefer to have only one cable running to the camera for the video signal?

On smaller shows, this is often a trade-off: more mobility for the camera people, faster installation, less cables and cheaper (non-studio) cameras can be used.

The wish-list was:

  • Small
  • Portable
  • Easy to install/operate
  • Good reception, preferably with an option to extend the wireless signal if necessary
  • Adaptable in the future for different cameras or mixing desks.


As I have no proper background in RF design I opted to use available modules and early on decided to use Xbee modules from Digi. The Zigbee protocol is used and the modules are running in transparent mode. This has the advantage that the modules themselves take care of the routing and relaying of data, even if one of the modules/camera would be out of reach of the base station.


I decided to use the same microprocessor for both the senders and the receivers. After thinking about possible future additions I ended up picking the PIC16F721. While this chip has more options than strictly needed, I prefer to know a couple of micro controllers pretty well and use those. It has two 8 bit timers, one 16 bit timer, an ADC, SPI, I²C and UART modules as well as an internal oscillator and can operate with a supply between 1.8 Volts and 5.5 Volts. Pretty versatile.


After drawing a schematic in Eagle I started with the board design. To keep things somewhat compact I choose to use all SMD components, apart from the Xbee modules. SOIC chips and 0805 components are really not that hard to solder, as long as one has access to a decent soldering station, good lighting and some kind of visual magnification (good loupe, stereoscope,…). Instead of using batteries and having to design a charging circuit as well I wanted to make the system modular. As more and more wireless transmitters for video signals are using regular USB for power, I opted to do the same. Mated with a portable USB charger such as these ones, one has plenty of power available for the tally, transmitters and other possible additions on the camera. When not in use these can be used for plenty of other purposes as well.

JVC 790 Wireless Tally RX Board Tally RX board Ver 0.1

The first revisions had a micro USB connector, but after a while we decided to go for a bit more robustness and just wire a USB cable to the board. The footprint for the connector was kept on the board, so if the need ever arises it will be easy to solder it in.

I also needed a way to interface with the camera. The user manual has the pin-out for the studio connector. The tally input is on pin 2. When pulled to ground this enables the tally lights. After some help on the EEVblog forum I got the datasheet for the connector (site in Korean) used by JVC. After searching for a vendor for these connectors as well as contacting JVC they turned out to be almost impossible to order in reasonable quantities.

I first started trying to mould my own connectors based on the data from the data sheet and the connector in the camera.

Wireless JVC790 Camera studio connector

Wireless Tally Lieven Bitstream 10jan2014 (021)

Wireless Tally Lieven Bitstream 10jan2014 (019)

Wireless Tally Lieven Bitstream 10jan2014 (022)

JVC790 Studio connector

In the end this turned out to be beyond my capabilities :). The self-made connector was always too brittle, had too much friction, didn’t provide a reliable contact, … It was also a hideous contraption.

I ended up opening up the camera and adding a small breakout cable to try the system first.

Wireless Tally Lieven Bitstream_0001

JVC790 Wireless tally adapter cable

Now that the system has been tested and proven to work reliably in the field, I’ve ordered these connectors from Binder to replace the connector in the camera. They should be a nice fit, are sturdy and can be locked when mated. This way I can also make my own mating cables.

Wireless Tally Lieven Bitstream12mrt2014 (014)

Time to assemble the units.

Wireless Tally Lieven Bitstream12mrt2014 (010)

I chose these enclosures as they are rugged enough, easy to open and fit the boards nicely (after some modifications on the board layout).

While assembling I realised I had forgotten to buy the correct spacers. I ended up cutting some small plastic tubing (such as used for aquarium pumps) to length and sliding it over the bolts. Works just as good.

Wireless Tally Lieven Bitstream12mrt2014 (011)Wireless Tally Lieven Bitstream13mrt2014 (017)


Wireless Tally Lieven Bitstream13mrt2014 (019)

Wireless Tally Lieven Bitstream13mrt2014 (018)

If anyone is interested I’ll put the BOM, schematics and board files as well as the hex files for the microprocessor up for download. If I succeeded in documenting things the way I think they should, (most) things should be self-explanatory.


Wireless tally. Nearly finished…

After lots of troubleshooting my wireless tally project/product is nearly finished.

The prototypes have been tested in the field and proven to work as expected.

Next up are the finishing touches: etching the boards with the final adjustments, populating them, programming the microcontrollers and fitting everything in the enclosures.

Some pictures of the prototype boards:

JVC 790 Wireless Tally RX Board

An early version of the transmitter board. As a size reference: the top left pads are for a micro usb connector.

WirelesJVC790 Camera studio connector

This is the connector through which the tally on/off signal had to go. Unfortunately I couldn’t get hold of the proprietary connector (for a reasonable price) so I had to make my own connector, at least for the tests.

JVC790 Studio connector

Halfway casting a test connector.

JVC790 Wireless tally adapter cable

In the end I ended up making a breakout cable for the studio connector.


Xbee part numbers overview

As I am currently working on a project that involves XBee modules for wireless data transmission I had to look for the best type of module. There are a dazzling amount of different versions and plenty of websites that explain the the different lines of modules (Series 1, Series2, Pro vs normal versions,…). It was much harder to match the version and antenna type that I needed with the corresponding part number, and that is what I needed to order the correct one from suppliers such as Element14 and Mouser.

XBee S2 wire antenna

As a reference for future projects I created an overview with the different versions and different antenna options (RP-SMA, wire, PCB, chip and u.FL connector) and their corresponding part numbers. Hope it can help someone decide which one they need.

The sheet can also be downloaded as an odt and XLSX sheet.

XBee Series 1 (802.15.4) Xbee Series 1 (802.15.4) PRO XBee Znet 2.5 (upgradable to Series 2) Xbee Series 2 Xbee Series 2 Pro Xbee Series 2B Pro
WIRE (W) XB24-AWI-001 XBP24-AWI-001 XB24-BWIT-004 XB24-Z7WIT-004 XBP24-Z7WIT-004 XBP24-BZ7WIT-004
PCB (P) XB24-API-001 XBP24-API-001 XB24-BPIT-004 XB24-Z7PIT-004 XBP24-Z7PIT-004 XBP24-BZ7PIT-004
U.FL (U) XB24-AUI-001 XBP24-AUI-001 XB24-BUIT-004 XB24-Z7UIT-004 XBP24-Z7UIT-004 XBP24-BZ7UIT-004
RP-SMA (S) XB24-ASI-001 XBP24-ASI-001 XB24-BSIT-004 XB24-Z7SIT-004 XBP24-Z7SIT-004 XBP24-BZ7SIT-004
CHIP (C) XB24-ACI-001 XBP24-ACI-001 XB24-BCIT-004 XB24-Z7CIT-004 XBP24-Z7CIT-004 N/A
  Int. version: add J
  Xbee Wifi S6B Xbee Wifi Xbee 686 long range pro XBee Programmable Pro
Int. version: add J

As user Bombledmonk pointed out in this forum post on the EEVBlog forum, Digi has a nice comparison sheet on their website comparing the different lines of Xbee products.

Panasonic PT-AE100E lamp power supply repair

I got hold of a “broken” Panasonic LCD projector. The lamp would start up, flicker for a couple of minutes and then shut down. No error messages where displayed.

Light! But only for about a minute or two...

Light! But only for about a minute or two…

The owner had send it to Panasonic to have it repaired but was told that the LPS (lamp power supply) board needed to be replaced, at a cost of €450. As that was too much compared to the price of a similar new projector the owner didn’t want to invest in a repair and decided to give up on the idea of having it repaired.

While browsing around the internet looking for clues I found some similar problems mentioned on forums, but no solution other than to replace the LPS.

I did find some LPS on Ebay for €39 + shipping, but those where second-hand which I didn’t like.

Off to dissecting the board then. When looking at the control signals going to the LPS everything looked fine. The power coming in from the power supply board was stable as well, so I figured the problem probably lay on the LPS board (as was expected).

The circuit boards inside the projector. The LPS is at the bottom left, underneath the lamp.

The circuit boards inside the projector. The LPS is at the bottom left, underneath the lamp.

As the lamp flickered I figured the amount of power going to the lamp wasn’t enough, pointing towards one of the transistors generating the drive current for the lamp, some International rectifier IRG4IBC30FD “insulated gate bipolar transistor with ultrafast soft recovery diodes”.

There are four of them on the board, nicely heatsinked to a common heatsink. The first one I tested showed a short-circuit, the others were fine. When I removed the faulty one, there was no way to start the lamp.


The LPS board, with the four transistors on a common heatsink on the left side of the board.

After replacing the faulty transistor -and the others as well for good measure- the lamp started nicely, and it has been running solidly for a couple of hours now. Temperature of the individual transistors stays nicely within specifications.



At a total material cost of about €27, I consider this a win :).

Wake-on-lan (WOL) bash script on router running dd-wrt

After setting up my router to run dd-wrt I’ve used PuTTy to ssh into the router to start my desktop machine to work on it through a RDP session.

After spending months looking up the correct MAC address in my phone and typing the commands by hand I finally took a bit of time to write a small bash script on the router so that I could simply run the script each time I needed it.

On my router (WRT54GL) there’s a bit of space in the /jffs folder that’s usable for storing scripts.

To write a script named “wol” go to the correct directory and type:

vi wol

VI opens in command mode. To start editing press the INSERT key. At the bottom left of the screen a “I” will be displayed. The editor is now in editing mode. I just wrote:


echo “Waking up 19\” system”

/usr/sbin/wol -i -p 9 xx:xx:xx:xx:xx:xx

echo “Done”

Where xx:xx:xx:xx:xx:xx is the MAC address of my network card.

To get back in command mode press ESCAPE.

Then to save the file and exit type:

:wq and ENTER. (the semicolon starts the command, wq stands for write and quit).

This creates the script, the only thing left is to make is executable:

chmod 700 wol

From now on, the script can be started by going to the correct directory and typing:


The script will be called and run the commands. If there are any error messages they will be displayed.

Ubuntu Server – setting up ZFS (part 1)

For a while I’ve wanted to learn about Linux, the way the OS works, what can be done with it, if it’s reasonable to change to it as my main operating system.

As well as dual booting Windows 7 and Ubuntu 12.04 on my laptop I thought I should try and set up my home server running a Linux distro. This way I’d be forced to learn my way around the command line, setting up a system to run smoothly without the need for much maintenance.

The things I wanted to try to set up were:

  • Some sort of NAS, with the option of mounting it as a samba drive over my internal network and using some sort of FTP that has to be secure when accessing the shares from outside of my home network.
  • I really want to give Owncloud a try. Not just as an alternative to Dropbox, but also as a central calendar and contact database. Over WebDAV that should be possible. I’ll have to get a basic Apache setup running to do this.
  • I’d like to try out the ZFS file system as I have no previous experience with it.
  • To have an openVPN server running at home would be nice when working abroad for longer periods of time (tunneling email, accessing home network, …)
  • Maybe a Socks proxy (?)
  • Keeping it all secure

As I have some experience with Ubuntu desktop I picked Ubuntu Server to start with. As I go along setting up the system I might end up deciding to pick something else and start over, but as I take this as a learning experience that’s fine.

So I started downloading the Ubuntu Server 12.04 AMD64 iso and made a bootable USB stick to install the system.

During the installation I didn’t change much from the standard settings. I partitioned the disk before installing the OS but nothing else. As I knew I was going to need the Apache and MySQL packages for Owncloud I picked the LAMP bundle for installation as well.

After installation one of the first things to do was to get a zfs pool up and running. I had picked two Western Digital RED series 2 TB disks as my data disks as they are made to be running for extended periods of time and one Seagate Spinpoint 320 GB 2.5″ drive for the OS and swap. This should give me a good balance between power and storage. The 2.5″ will be set up to go into idle really quick to save power.

Installing Ubuntu ZFS

To install the ubuntu-zfs package the ppa:zfs-native/stable repository needs tot be added to the system.

Apparently the add-apt-repository command wasn’t installed yet on the 64 bit version on my system. There are two options:

  1. Install the python-software-properties package
  2. manually add the repositories to /etc/apt/sources.list

As I will need to add more ppa’s later on I chose the first option.

A quick sudo apt-get install ubuntu-zfs and some 170 Meg later the package was build and installed.

Creating a ZFS pool

sudo parted followed by print devices displays a list of devices with their storage capacity:

(parted) print devices
/dev/sda (320GB)
/dev/sdb (2000GB)
/dev/sdc (2000GB)

/dev/sdb and /dev/sdc are my two disks that will be used for a mirrored ZFS pool.

sudo zpool create zfs mirror /dev/sdb /dev/sdc creates a mirrored pool named zfs using the two disks in a mirrored configuration. Instead of residing in the /media or /mount directory, it can be found in the root of the file system.

sudo zpool list confirms that the pool exists:

zfs   1.81T   496K  1.81T     0%  1.00x  ONLINE  -

The next step will be to test the pool, writing data to it, unplugging one of the disks, formatting it, adding it to the pool again and check if everything works as fine as it should.

Before doing that I’ll set up a samba share on the zfs directory. This will provide me with a real-world situation where I can access the pool from another computer in my network.