Installing the Basler Pylon SDK 2.1.0 on Ubuntu 9.04

Basler Pilot GigE Vision CameraThis is the install procedure for the Pylon Linux SDK 2.1.0 on Ubuntu Jaunty (9.04). The instructions differ slightly from the previous SDK and Ubuntu versions. For the install procedure of Pylon SDK 2.0.3 on Ubuntu 8.04/8.10 see this post. Because Pylon 2.1.0 is not built for Ubuntu 9.04 some packages from previous Ubuntu versions have to be installed manually as described below. Please report if you encounter problems on newer Linux versions.

1. Download the SDK from Basler’s FTP Server

Use the following link to log on to the Basler FTP server. As of Oct 28, 2009 Basler provides the old stable SDK version 2.0.3 and the newer beta release version 2.1.0  there.

ftp://Pylon4Linux-ro:h50UZgkl@ftp.baslerweb.com

We have mirrored the SDK on our internal server as 32bit version for Ubuntu (24M) and 64bit version for Ubuntu (24M).

2. Install Dependencies

Before you are able to compile and link applications against the SDK you’ll have to install following packages:

apt-get install libqt4-gui libxalan110

The 2.1.0 beta version of the SDK is linked against libxerces27 and liblog4cpp-4 which both have been replaced in Ubuntu 9.04 by newer versions with incompatible ABIs. Hence, you’ll have to download the old deb-packages and install the contained libraries manually. The recommended way to do this is to not use dpkg for installing the archives (because it will replace the current libraries and break other dependencies), but instead copy the libraries from the deb-files to /opt/pylon/lib or /usr/local/lib.

wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/x/xerces27/\
libxerces27_2.7.0-5_i386.deb

wget ftp://Pylon4Linux-ro:h50UZgkl@ftp.baslerweb.com/Pylon%202.0.3%20%28\
first%20release%29/Ubuntu%208.04%20%28Hardy%20Heron%29/Setup/32bit/\
log4cpp_0.3.5rc3-4_i386.deb

# extract libraries to /opt/pylon/lib
ar -x libxerces27_2.7.0-5_i386.deb data.tar.gz && \
tar --wildcards --strip-components 3 --directory /opt/pylon/lib -xzf \
data.tar.gz ./usr/lib/lib* && rm data.tar.gz

ar -x log4cpp_0.3.5rc3-4_i386.deb data.tar.gz && \
tar --wildcards --strip-components 3 --directory /opt/pylon/lib -xzf \
data.tar.gz ./usr/lib/lib* && rm data.tar.gz

3. Install the SDK

Install all .deb files with dpkg. You may have to force ignoring the machine architecture because the SDK was built for i686, but your system may be i386. As long as you use a decent CPU (>= Intel Pentium class) there should be no problem. The default install location for the SDK is /opt/pylon. Remember that this path is hard-coded into the libraries (some functions require to load plugin libraries from there). You need 45MB free disk space in /opt.

dpkg --force-all -i pylon-2.1.0-1747-linux-2.6-i686.deb \
pylonapps-2.1.0-1747-linux-2.6-i686.deb \
pylon-devel-2.1.0-1747-linux-2.6-i686.deb

4. Set up your Shell Environment

Remember to include /opt/pylon/lib in your LD_LIBRARY_PATH and set the required env variables. Otherwise the Pylon libs are not found and the library will not work in your apps. You should also set teh XML cache directory to prevent automatic download of the camera description each time you open a camera connection. For BASH the command is the following:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/pylon/lib
export PYLON_ROOT=/opt/pylon
export GENICAM_ROOT_V1_1=/opt/pylon
export GENICAM_CACHE=/tmp

5. Check your Installation

To check if the SDK is properly installed, try starting some of the contained programs (e.g. /opt/pylon/bin/IpConfigurator). Connect your camera to an ethernet switch first. The camera should either get an IP address from a DHCP server in your subnet or use a self assigned address (169.254.*.*) after a timeout. If set up properly, the IP Configurator should find the camera.

6. Fixing Problems

If the SDK apps or your programs don’t run or don’t seem to find Pylon cameras on the network, see the following check-list

  • Is LD_LIBRARY_PATH correctly set in your current shell?
  • It is likely that some required libraries are missing or libraries are too old or new so that symbols have changed. Call ldd /opt/pylon/bin/IpConfigurator and look for libraries that were ‘not found’. Install the required library versions.
  • Is the camera attached to a local ethernet network segment? Your computer and the camera have to be in the same ethernet collision domain. Communication with the cameras across IP routers is not supported.
  • Check the IP configuration of your local network interface. If you are using DHCP, make sure the camera is also served by the same DHCP server. If you are using a fixed IP, make sure the camera uses an IP in the same subnet (To configure the camera for fixed IP usage, see the manual. You basically have to use DHCP or zeroconf IP adresses once to initially connect to the camera. The IP configurator app should support configuration over ethernet broadcast packets, but it never worked for me.)