Test and Measurement Forum

USB TC-08 Linux installation

Post your Linux discussions here

USB TC-08 Linux installation

Postby tre1121 » Wed Apr 16, 2008 11:12 am

I have now bought 4 USB TC-08, i want to run them under Linux.
I have installed the drivers but i get no connection.

When i run lsusb i get this:
Bus 001 Device 004: ID 0ce9:1000

Is this the device id?

Do i have to load some modules manually or is it enough to plug it in to the USB-port and just run some of the example program if it is build correctly?
/Martin
tre1121
Active User
Active User
 
Posts: 6
Joined: Mon Mar 31, 2008 8:59 am
Location: Sweden

Postby ziko » Fri May 02, 2008 7:15 am

Hi I have spoke to one of the engineers and here is his response

"The device ID is correct. There are no modules to load.

A frequent problem is incorrect access permissions on the device file (in /dev/bus/usb or /proc/bus/usb) - it must have write permission for the user running the program.

I have attached two files which may help - usbtest is a shell script which will report whether the permissions are correct, and the .rules file is an example of how to fix the problem (with comments explaining its use).
"

Hope this helps.

Kind regards
Attachments
usbtc08linux.zip
(2.47 KiB) Downloaded 809 times
Ziko

Technical Specialist
ziko
Zen Master
Zen Master
 
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Postby tre1121 » Fri May 09, 2008 9:31 am

Alright!
Thanks!
It works!
I'm running Ubuntu 8.04 and it worked when i do "sudo" with the drivers.
Thanks!
/Martin
tre1121
Active User
Active User
 
Posts: 6
Joined: Mon Mar 31, 2008 8:59 am
Location: Sweden

Re: USB TC-08 Linux installation

Postby cbey » Fri Dec 04, 2009 12:31 am

Would you care to walk me through the process you used, because I cannot get my drivers to work.

CB

tre1121 wrote:Alright!
Thanks!
It works!
I'm running Ubuntu 8.04 and it worked when i do "sudo" with the drivers.
Thanks!
cbey
Newbie
 
Posts: 0
Joined: Thu Dec 03, 2009 7:12 pm

Re: USB TC-08 Linux installation

Postby Erik » Mon Dec 07, 2009 8:18 am

How far did you get with the installation?

1. What is your output from lsusb with your device plugged in
2. Can you get usbtest to work as root (sudo)
3. Can you get the example program to work as root (sudo)
4. Have you installed the .rules file
5. Have you added your user to the group pico (or the one you choose)
6. Can you get usbtest to work under your account
7. Can you get the example program to work under your account
Erik
PICO STAFF
PICO STAFF
 
Posts: 52
Joined: Mon Oct 23, 2006 8:16 am
Location: Cambridgeshire, UK

Re: USB TC-08 Linux installation

Postby cbey » Thu Jan 14, 2010 6:50 pm

Erik wrote:How far did you get with the installation?

When I run make,I get some error messages:
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I./shared -g -O2 -MT TC08Api.lo -MD -MP -MF .deps/TC08Api.Tpo -c -o TC08Api.lo `test -f 'common/TC08Api.cpp' || echo './'`common/TC08Api.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I./shared -g -O2 -MT TC08Api.lo -MD -MP -MF .deps/TC08Api.Tpo -c common/TC08Api.cpp -fPIC -DPIC -o .libs/TC08Api.o
common/TC08Api.cpp:58: warning: 'typedef' was ignored in this declaration
common/TC08Api.cpp: In function 'short int usb_tc08_open_unit()':
common/TC08Api.cpp:194: error: 'sleep' was not declared in this scope
common/TC08Api.cpp: In function 'short int usb_tc08_get_unit_info(short int, USBTC08_INFO*)':
common/TC08Api.cpp:569: error: 'sprintf' was not declared in this scope
common/TC08Api.cpp:588: error: 'memcpy' was not declared in this scope
common/TC08Api.cpp: In function 'short int usb_tc08_get_unit_info2(short int, char*, short int, short int)':
common/TC08Api.cpp:662: error: 'snprintf' was not declared in this scope
common/TC08Api.cpp: In function 'short int usb_tc08_get_formatted_info(short int, char*, short int)':
common/TC08Api.cpp:772: error: 'snprintf' was not declared in this scope
common/TC08Api.cpp:788: error: 'snprintf' was not declared in this scope
make[2]: *** [TC08Api.lo] Error 1
[b]
If I ignore and make install, then run usbtest, the drivers are not recognized
[/b]
1. What is your output from lsusb with your device plugged in
2. Can you get usbtest to work as root (sudo)
3. Can you get the example program to work as root (sudo)
4. Have you installed the .rules file
5. Have you added your user to the group pico (or the one you choose)
6. Can you get usbtest to work under your account
7. Can you get the example program to work under your account
cbey
Newbie
 
Posts: 0
Joined: Thu Dec 03, 2009 7:12 pm

Re: USB TC-08 Linux installation

Postby Erik » Fri Jan 15, 2010 8:08 am

Did you follow the instructions in INSTALL?
More specifically, did you run ./configure?

Extract from INSTALL
-------------------------------

3. Run the configure script:
./configure
This will check that you have the required prerequisites and set up the
build process for your system. If you intend to use the driver for debugging,
you may want to specify CXXFLAGS like this:
./configure CXXFLAGS="-g -O0"
to enable debug symbols (-g) and turn off optimization (-O0).

4. Build the software:
make

5. Install the software. As root:
make install
The library and header files are installed by default under /usr/local. You
should ensure that /usr/local/lib appears in /etc/ld.so.conf and then run:
ldconfig
to add the new library to the system cache. You are now ready to start using
the library in your programs (or why not start by taking a look at our
example programs?).
Erik
PICO STAFF
PICO STAFF
 
Posts: 52
Joined: Mon Oct 23, 2006 8:16 am
Location: Cambridgeshire, UK

Re: USB TC-08 Linux installation

Postby luca72 » Thu Mar 04, 2010 10:53 am

try to install it on kubuntu 9.10 the configure is ok but when i run make i get this output.
There are some problem with new kernel?
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I./shared -g -O2 -MT TC08Api.lo -MD -MP -MF .deps/TC08Api.Tpo -c -o TC08Api.lo `test -f 'common/TC08Api.cpp' || echo './'`common/TC08Api.cpp
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I.. -I./shared -g -O2 -MT TC08Api.lo -MD -MP -MF .deps/TC08Api.Tpo -c common/TC08Api.cpp -fPIC -DPIC -o .libs/TC08Api.o
common/TC08Api.cpp:58: warning: 'typedef' was ignored in this declaration
common/TC08Api.cpp: In function 'short int usb_tc08_open_unit()':
common/TC08Api.cpp:194: error: 'sleep' was not declared in this scope
common/TC08Api.cpp: In function 'short int usb_tc08_get_unit_info(short int, USBTC08_INFO*)':
common/TC08Api.cpp:569: error: 'sprintf' was not declared in this scope
common/TC08Api.cpp:588: error: 'memcpy' was not declared in this scope
common/TC08Api.cpp: In function 'short int usb_tc08_get_unit_info2(short int, char*, short int, short int)':
common/TC08Api.cpp:662: error: 'snprintf' was not declared in this scope
common/TC08Api.cpp: In function 'short int usb_tc08_get_formatted_info(short int, char*, short int)':
common/TC08Api.cpp:772: error: 'snprintf' was not declared in this scope
common/TC08Api.cpp:788: error: 'snprintf' was not declared in this scope
make[2]: *** [TC08Api.lo] Errore 1
make[2]: uscita dalla directory «/home/lucak904/Scrivania/Luca/progetti_c++/pico/libusbtc08-1.7.2/src»
make[1]: *** [all-recursive] Errore 1
make[1]: uscita dalla directory «/home/lucak904/Scrivania/Luca/progetti_c++/pico/libusbtc08-1.7.2»
make: *** [all] Errore 2
luca72
Newbie
 
Posts: 0
Joined: Mon Apr 27, 2009 2:05 pm

Re: USB TC-08 Linux installation

Postby picomp314 » Mon Jul 12, 2010 2:31 pm

I am having the same exact problem as the luca72. The code will not compile on Linux Kernel 2.6.33.6-147 (Fedora 13) with GCC version 4.4.4. Can we please get some help on this issue?
picomp314
Newbie
 
Posts: 0
Joined: Mon Jul 12, 2010 2:28 pm

Re: USB TC-08 Linux installation

Postby luca72 » Tue Nov 30, 2010 3:31 pm

i have compile it with some more include in the attached files, but when i run usbtest also as root i get:
Pico USB device found: /dev/bus/usb/007/003

- It belongs to root (which is you) who has permissions rw-
- The members of group root (which you are in) have permissions rw-
- Everyone else has permissions r--
- You can write to this device and so will be able to use it.

Pico USB device not found. Please try again

the lsusb is:
Bus 007 Device 003: ID 0ce9:1000 pico Technology

But sample program works

Luca
Attachments
TC08Api.cpp
(39.25 KiB) Downloaded 418 times
PicoUsbDevice_Linux.h
(4.82 KiB) Downloaded 397 times
PicoUsbDevice_Linux.cpp
(32.47 KiB) Downloaded 410 times
luca72
Newbie
 
Posts: 0
Joined: Mon Apr 27, 2009 2:05 pm

Re: USB TC-08 Linux installation

Postby aspex_mrp » Fri Jul 08, 2011 2:27 pm

I had the same build problems (sleep not declared, etc) when building libusbtc08-1.7.2.
These were fixed by the following modifications.

Code: Select all
Index: src/shared/PicoUsbDevice_Linux.h
===================================================================
@@ -44,7 +44,7 @@
#ifndef PICOUSBDEVICE_LINUX_H
#define PICOUSBDEVICE_LINUX_H

-#include <vector.h>
+#include <vector>

// Format of USB Descriptors is defined in USB2.0 spec, section 9.6
#pragma pack (1)


Index: src/common/tctables.cpp
===================================================================
@@ -41,6 +41,7 @@

#include <math.h>
#include <assert.h>
+#include <ctype.h>

#include "tctables.h"


Index: src/common/TC08Api.cpp
===================================================================
@@ -39,6 +39,9 @@

#include <vector>
#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <cstring>
#include "TC08Device.h"
#include "TC08Enumerator.h"
aspex_mrp
 

Re: USB TC-08 Linux installation

Postby mythsmith » Wed Oct 08, 2014 2:44 pm

The same for me, on ubuntu 12.04.
mythsmith
Newbie
 
Posts: 0
Joined: Wed Oct 08, 2014 2:42 pm

Re: USB TC-08 Linux installation

Postby Hitesh » Mon Oct 13, 2014 9:23 am

Hi mythsmith,

If you haven't already done so, try downloading the new libusbtc08 package - follow the instructions as per the Linux Software & Drivers for Oscilloscopes and Data Loggers page on our website http://www.picotech.com/linux.html to configure your package manager, then call the command

Code: Select all
sudo apt-get install libusbtc08


This should install the shared library into the /opt/picoscope/lib directory. The header file will be located in the /opt/picoscope/include/libusbtc08-1.8 directory.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2009
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to Linux

Who is online

Users browsing this forum: No registered users and 0 guests