Problems installing CyUSB Suite For Linux

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hello, everyone I've got a problem installing CyUSB Suite For Linux. I've installed the libusb-1.0.9 library, as written in the readme, launched "make" command and got the following in the terminal: [oleg@localhost cyusb_linux_1.0.3]$ make g++ -fPIC -o lib/libcyusb.o -c lib/libcyusb.c g++ -shared -Wl,-soname,libcyusb.so -o lib/libcyusb.so.1 lib/libcyusb.o -l usb-1.0 -l rt /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../libusb-1.0.a when searching for -lusb-1.0 /usr/bin/ld: skipping incompatible /lib/libusb-1.0.so when searching for -lusb-1.0 /usr/bin/ld: skipping incompatible /lib/libusb-1.0.a when searching for -lusb-1.0 /usr/bin/ld: skipping incompatible /usr/lib/libusb-1.0.a when searching for -lusb-1.0 /usr/bin/ld: cannot find -lusb-1.0 Could you help me find a problem, please?   
0 Likes
7 Replies
Anonymous
Not applicable

I've solved the problems with the libraries, but now i've got another one:

   

It's written in the readme, that the application binary will be copied to /usr/bin and can be launched using 'cyusb_linux' comand. Using this comand in the terminal gives:

   

cyusb_linux: error while loading shared libraries: libcyusb.so: cannot open shared object file: No such file or directory

   

But i've located this file in /usr/lib

   

Is that ok?

0 Likes
Anonymous
Not applicable

I am facing same problem. Can anyone help on this.

0 Likes
Anonymous
Not applicable

 Hi,

   

( As a prerequisite, ensure that you have qt4, gcc and libusb installed in your linux machine)

   

After downloading the SDK ( use the latest SDK 1.3.1 available here), Go to <your path>/fx3_sdk_v1.3.1_linux/ cyusb_linux_1.0.4/ directory

   

run the make command in  the terminal followed by ./install.sh   (Steps given in the README file in the same directory)

   

Running install.sh script with root privileges should copy the libcyusb.so and libcyusb.so.1 into /usr/local/lib directory

   

Now, you can launch GUI applications using cyusb_linux command. Make sure to run the application as normal user.

   

However, if you get this error cyusb_linux: error while loading shared libraries: libcyusb.so: cannot open shared object file: No such file or directory, You will have to manually export the library by typing the following command

   

export LD_LIBRARY_PATH= /usr/local/lib/

   

Also, Add this above line to end of .bashrc file in home folder so that you dont have to do this for every session. ( .bashrc is a hidden file in home directory and can be made visible by pressing Ctrl+h)

   

After exporting the library, you can now launch GUI applications using cyusb_linux command

   

Regards

   

Mudabir Kabir

0 Likes
Anonymous
Not applicable

Mudabir,

   

Quote

   

Running install.sh script with root privileges should copy the libcyusb.so and libcyusb.so.1 into /usr/local/lib directory

   

Now, you can launch GUI applications using cyusb_linux command. Make sure to run the application as normal user.

   

 

   

I'm working in a rasberry pi device.

   

I ran the install.sh script as root and everything looked good. Then...

   

When I run as normal user (pi) ./cyusb_linux and there is cypress hardware connected I get this:
Error in opening device
Error opening library
If there is no usb cypress hardware connected It opens and give me a message in command line:
No device found.
If I plug the usb cypress hardware, cyusb_linux program closes and gives this messages in command line:
Signal 10 (=SIGUSR1) received !
Error in opening device
Error in opening library
When I run sudo ./cyusb_linux it runs good and normal.

   

Any advice?

0 Likes
Anonymous
Not applicable

I got this response and works like a charm!

   

Hi Gabriel,

Open /etc/udev/rules.d/88-cyusb.rules as sudo and change the included rules to:

KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", GROUP="user_group", MODE="666", TAG="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh A"
KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh R"

where user_group is a group that the user is a member of.

If you want only one specific user to access the device, you can change it to:

KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", OWNER="username", MODE="666", TAG="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh A"
KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh R"


For the second part of question
"Undefined reference to 'cyusb_open()'"
You need to link to cy_lib.
You can add the following line in your make file.
g++ -o 00_fwload          00_fwload.c          -L ../lib -l cyusb

If you have any queries please get back to us.

Thanks & Regards,
krishna GSNS.

0 Likes
Anonymous
Not applicable

I'm working in raspberry pi device. the cyusb_linux application is running with the above mentioned modifications. However, the examples 01_getdesc and other examples  doesn't seem to run! from the terminal.

   

When I run as normal user (pi) ./01_getdesc and there is cypress hardware connected I get this:

   

Error in opening device
Error opening library
If there is no usb cypress hardware connected It opens and give me a message in command line:
No device found.

   

But with root privileges the application is working perfectly fine.

   

Can somebody give me advice on this regard?

0 Likes

Hi 

In install.sh, the command qmake-qt4 results in a failure.

I believe qt commands has changed since this guide was written, how do you get around thaT?
I have qt creator 5 installed on the pi, but still qmake-qt5 is command not found

0 Likes