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:

Detected libraries:

– (REQUIRED) glib-2.0 >= 2.32.0: yes (2.32.4)
– (REQUIRED) libzip >= 0.10: yes (0.10)
– (OPTIONAL) libserialport >= 0.1.0: yes (0.1.0)
– (OPTIONAL) librevisa >= 0.0.20130812: no
– (OPTIONAL) libusb-1.0 >= 1.0.16: no
– (OPTIONAL) libftdi >= 0.16: yes (0.19)
– (OPTIONAL) check >= 0.9.4: yes (0.9.8)

Enabled hardware drivers:

– agilent-dmm………………… yes
– appa-55ii………………….. yes
– asix-sigma…………………. yes
– atten-pps3xxx………………. yes
– brymen-bm86x……………….. no
– brymen-dmm…………………. yes
– cem-dt-885x………………… yes
– center-3xx…………………. yes
– chronovu-la………………… yes
– colead-slm…………………. yes
– conrad-digi-35-cpu………….. yes
– demo………………………. yes
– fluke-dmm………………….. yes
– fx2lafw……………………. no
– gmc-mh-1x-2x……………….. yes
– hameg-hmo………………….. yes
– hantek-dso…………………. no
– ikalogic-scanalogic2………… no
– ikalogic-scanaplus………….. yes
– kecheng-kc-330b…………….. no
– lascar-el-usb………………. no
– mic-985xx………………….. yes
– norma-dmm………………….. yes
– openbench-logic-sniffer……… yes
– rigol-ds…………………… yes
– saleae-logic16……………… no
– serial-dmm…………………. yes
– sysclk-lwla………………… no
– teleinfo…………………… yes
– tondaj-sl-814………………. yes
– uni-t-dmm………………….. no
– uni-t-ut32x………………… no
– victor-dmm…………………. no
– zeroplus-logic-cube…………. no

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:

sigrok-cli –scan
The following devices were found:
demo – Demo device with 12 channels: D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 A3
fx2lafw – Saleae Logic with 8 channels: 0 1 2 3 4 5 6 7

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Comments are closed.