FrontPanel on recently upgraded Raspberry Pi 2\

I am using a fresh install of Raspbian on a Raspberry Pi 2. I cannot get the Python API to work, even if I’m quite sure the device is correctly recognised.
If I run dmesg, I get among other lines the following:

[    3.639480] usb 1-1.2: New USB device found, idVendor=151f, idProduct=0022
[    3.653533] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.666612] usb 1-1.2: Product: Opal Kelly XEM3010
[    3.678064] usb 1-1.2: Manufacturer: Opal Kelly
[    3.688296] usb 1-1.2: SerialNumber: 11440002AD

The OS version is Raspbian Wheezy (release date 2015-05-05):

> uname -a
Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux

GCC version:

> gcc --version
gcc (Debian 4.6.3-14+rpi1) 4.6.3

My Python version is:

> python -V
Python 2.7.3

The python script is as follows:

>>> import ok
>>> xem = ok.okCFrontPanel()
>>> xem.OpenBySerial('')
-1

When I call xem.OpenBySerial(’’), it returns -1, i.e., device not found.

What am I doing wrong?

I think I’ve got the problem, the FrontPanel library that I’ve downloaded is for the first Raspberry version (which is ARMv6) not for Raspberry 2.
I’ve tried to use the other two available libraries for the Mango Board and nVidia Jetson TK1, but they don’t work either.

Can we expect to see an updated version for Raspbian 2015-05-05 on a Raspberry 2 anytime soon?

– EDIT –

I’ve just tried to install Ubuntu 14.04 to the Raspberry Pi 2 and used the FrontPanel-Ubuntu14.04LTS-armv7l-4.5.0.tgz library. If I compile the PipeTest sample I get always the same error:

---- Opal Kelly ---- PipeTest Application v2.0 ----
FrontPanel DLL loaded.  Built: Jan  7 2016  17:46:17
Device could not be opened.  Is one connected?
FPGA could not be initialized.

– EDIT 2 –

IT WORKS!

Thanks to the prompt reply from Opal Kelly Support, I first tried by sudoing the command:

> sudo ./PipeTest
---- Opal Kelly ---- PipeTest Application v2.0 ----
FrontPanel DLL loaded.  Built: Sep 24 2014  21:24:43
Found a device: XEM3010
Device firmware version: 3.1
Device serial number: 11440002AD
Device device ID: 3
FrontPanel support is enabled.

Good. The next thing was copying the udev rule provided with the Desktop Linux version of FrontPanel (which was left out from the ARM version…!!)

> sudo cp 60-opalkelly.rules /etc/udev/rules.d/
> /sbin/udevadm control --reload-rules
> ./PipeTest
---- Opal Kelly ---- PipeTest Application v2.0 ----
FrontPanel DLL loaded.  Built: Sep 24 2014  21:24:43
Device could not be opened.  Is one connected?
FPGA could not be initialized.

So bad. There are two problems here to solve:

  1. the 60-opalkelly.rules as it is will not work with the Raspberry. It must be changed as below:

    udev rules file for all Opal Kelly VID matches.

    This file allows udev to change the mode to 666 (all read/write)

    for any Opal Kelly VID.

    For FedoraCore 5 and similar:

    SUBSYSTEM==“usb_device”, SYSFS{idVendor}==“151f”, MODE=“0666”

    For FedoraCore 7 and similar:

    SUBSYSTEM==“usb”, ATTRS{idVendor}==“151f”, GROUP=“users”, MODE=“0666”

Note that you have to comment the first rule and add GROUP=“users” to the second rule.

  1. The command /sbin/udevadm control --reload-rules won’t do any good, in order to reload the rules you have to run sudo udevadm trigger.

And that’s it!

> ./PipeTest
---- Opal Kelly ---- PipeTest Application v2.0 ----
FrontPanel DLL loaded.  Built: Sep 24 2014  21:24:43
Found a device: XEM3010
Device firmware version: 3.1
Device serial number: 11440002AD
Device device ID: 3
FrontPanel support is enabled.