Errors on drivers installation on Raspberry Pi

Post your Linux discussions here
Post Reply
csr
Newbie
Posts: 0
Joined: Tue Aug 06, 2019 8:29 am

Errors on drivers installation on Raspberry Pi

Post by csr »

Hi,

I'm new using Pico technologies and I hope you could help me.
I want to collect data from a USBTC08 within Nodered on a Raspberry Pi 3 B+ with Raspbian Stretch.

For the moment I'm just trying to make it working by executing python scripts but I keep getting errors and I am now stuck with this one.

I installed the drivers following this guide : http://hndaheng.net/downloads/linux
Then I downloaded the github repo and followed this guide : http://github.com/picotech/picosdk-python-wrappers

One part is installed under /opt/picoscope : /include /lib and /share folders
another part under usr/local/lib/python2.7/picosdk (same for python 3.5)

When I execute the USBTC08 example I get this error :

Code: Select all

Traceback (most recent call last):
  File "/home/pi/test_picolog_2.py", line 9, in 
    from picosdk.usbtc08 import usbtc08 as tc08
  File "/usr/local/lib/python3.5/dist-packages/picosdk/usbtc08.py", line 19, in 
    usbtc08 = usbtc08lib()
  File "/usr/local/lib/python3.5/dist-packages/picosdk/usbtc08.py", line 16, in __init__
    super(usbtc08lib, self).__init__("usbtc08")
  File "/usr/local/lib/python3.5/dist-packages/picosdk/library.py", line 49, in __init__
    self._clib = self._load()
  File "/usr/local/lib/python3.5/dist-packages/picosdk/library.py", line 71, in _load
    env_var_name = "PATH" if sys.platform == 'win32' else "LD_LIBRARY_PATH"
picosdk.errors.CannotFindPicoSDKError: PicoSDK (usbtc08) not found, check LD_LIBRARY_PATH
I first read that it could be due to restricted access to I gave full access to /opt/picoscope/lib/* and to /usr/local/lib/python2.7/dist-packages/picosdk/* with

Code: Select all

sudo chmod 777 myfolder
But I still have the error.

Then I found it could be due to the library path used by find_library method which I found is the PATH or LD_LIBRARY_PATH environment variables. So I added :/opt/picoscope to this PATH which is now

Code: Select all

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/opt/picoscope
LD_LIBRARY_PATH=/opt/picoscope
But I still have the error.

Do you know how I can fix this ?

Thank you,
Charlotte

csr
Newbie
Posts: 0
Joined: Tue Aug 06, 2019 8:29 am

Re: Errors on drivers installation on Raspberry Pi

Post by csr »

I finally found a solution which might not be the best but I can continue to work on this : I moved the library files (.so) to picosdk folder and renamed the files from libusbtc08.so to usbtc08.so and the example is now working !

megalloid
Newbie
Posts: 0
Joined: Fri Oct 09, 2020 4:19 pm

Re: Errors on drivers installation on Raspberry Pi

Post by megalloid »

Hm, you can use this commands and install requirements from apt repository.

Add repository to the updater

Code: Select all

sudo bash -c 'echo "deb http://labs.hndaheng.net/debian/ picoscope main" >/etc/apt/sources.list.d/picoscope.list' 
Import public key

Code: Select all

wget -O - http://labs.hndaheng.net/debian/dists/picoscope/Release.gpg.key | sudo apt-key add -
Update package manager cache

Code: Select all

sudo apt-get update 
Install PicoScope

Code: Select all

 sudo apt-get install picoscope
And after that please install

Code: Select all

 sudo apt-get install libusbtc08-dev
It helped me solve the same issues on Ubuntu 20.04 LST

Post Reply