Sigrok on Ubuntu 12.04 with USB Logic Analysers

There are instructions on the sigrok website for building sigrok for use on Linux. The build instructions are largely correct for Ubuntu 12.04, but there are a few problems you may encounter along the way.

Libusb

Unless you have done so previously, you will likely have to install a newer version of libusb than is in the Ubuntu 12.04 repositories. I used libusb-1.0.18. Note that you must do this before building libsigrok, otherwise it may not build support for the various USB logic hardware devices.

If you don’t have a newer version of libusb installed before building libsigrok then it won’t build support for some USB-based hardware, and both sigrok-cli and pulseview will fail to find your USB device when scanning.

You can see this when you run the ./configure script for libsigrok which will show that libusb is too old, and that several hardware devices will not be supported:

With a newer version of libusb installed you should see all those ‘no’s turn to ‘yes’.

fx2lafw Firmware

You will also need to install the fx2lafw firmware in order to use Saleae clone hardware. The firmware will be uploaded to the device automatically by sigrok, but you need to make sure the firmware files are present on your Ubuntu filesystem.

The instructions for doing so are available on another page. I downloaded the source for the firmware because it comes with an install script that installs into the correct location (/usr/local/share/sigrok-firmware) whereas the pre-built binary release did not.

You will also need to copy the udev script and restart udev as described on the fx2lafw page.

Release Versions

At this moment the Git repositories for two of the sigrok libraries (sigrok-cli and pulseview) are failing to compile on Ubuntu 12.04. I instead dropped back to the release tarballs from the Download page, which are at this time:

libserialport-0.1.0,

ibsigrok-0.3.0

libsigrok-decode-0.3.0

sigrok-cli-0.5.0

pulseview-0.2.0

Following the apt-get instructions to install the dependencies, and with libusb upgraded as described above, I then used standard “./configure; make; sudo make install” to build and install the first four libraries, and “cmake .; make; sudo make install” for pulseview.

You should now find that your USB device is found by “sigrok-cli –scan” as well as in the pulseview GUI: