Hi,
I have a Picoscope 2207 and my PC is running Ubuntu 12.04.
To use the Pico, I run Picoscope 6 under Windows XP running itself in Virtual Box (it works fine except some troubles with the channel triggering).
I'd like to develop myself some C applications under Linux for my PicoScope.
I downloaded libps2_3000_R3_6_4_4_1.x86_64.tgz from you website and followed the README and INSTALL instructions.
I can see the PicoScope ok using usbtest but I can't compile the PS2000con.c file.
I got the following messages (I copy/past only the begining since it is several pages long) :
/tmp/ccJzSEHx.o: In function `set_defaults':
PS2000con.c:(.text+0x389): undefined reference to `ps2000_set_ets'
PS2000con.c:(.text+0x3f5): undefined reference to `ps2000_set_channel'
/tmp/ccJzSEHx.o: In function `set_trigger_advanced':
PS2000con.c:(.text+0x55d): undefined reference to `ps2000SetAdvTriggerChannelConditions'
I tried several things (remove all the PREF0 to PREF4 in ps2000.h for exemple), used Code::Blocks to compile (and got the same kind of messages), changed the driver to libps2000_2.0.7.7-2_amd64.deb (found on http://code.google.com/p/qpicoscope/) and read most of your forum concerning Linux.
If I rename differently ps2000.h, then the error is different (PS2000con.c:64:30: erreur fatale: libps2000/ps2000.h : Aucun fichier ou dossier de ce type, compilation terminée.) meaning that the header file is correctly found when it is properly named.
Since many people seem to compile without any trouble (other troubles may come later), I think that I'm probably missing something, may be a very simple one.
So, if anybody has an idea to help me solve this problem, I thank him in advance.
Thank you for your quick repply.
I omitted to indicate that it is what I did first. But it didn't work, so I looked in this forum and understood (wrongly) that the libps2_3000_R3_6_4_4_1.x86_64.tgz could do it.
Actually, when I install the driver proposed for 2207, the installation seem to be done ok but there is no library nor header file in /usr/local (nor anywhere else). The Picoscope is correctly found by "usbtest" but I can't compile "PS2000Acon.c".
Is it because I'm using a 64bits version of Ubuntu?
I have just tried with the attached package and it is working. Please note that you need to follow the instructions in Install and Readme files and test with usbtest to ensure you can open and read the device from the user account
PS2000A driver example program
Version 2.0
Opening the device...
Handle: 1
Device opened successfully, cycle 1
Driver Version: PS2000A Linux Driver, development version
USB Version: 1.1
Hardware Version: 1
Variant Info: 2207
Serial: AS612/044
Readings will be scaled in (mV)
Channel A Voltage Range = 5V
Channel B Voltage Range = 5V
B - Immediate block V - Set voltages
T - Triggered block I - Set timebase
E - Collect a block of data using ETS A - ADC counts/mV
R - Collect set of rapid captures G - Signal generator
S - Immediate streaming
W - Triggered streaming
X - Exit
Operation:
This time, it goes farther and the message is different.
Here are the details of what I did :
- I uninstalled the previous pacakage and installed the one attached to your reply.
Result was (sorry, it's partly in french) : Sélection du paquet ps2000alinux:i386 précédemment désélectionné.
(Lecture de la base de données... 838959 fichiers et répertoires déjà installés.)
Dépaquetage de ps2000alinux:i386 (à partir de ps2000alinux_1.0-1_i386.deb) ...
Paramétrage de ps2000alinux:i386 (1.0-1) ...
Traitement des actions différées (« triggers ») pour « libc-bin »...
ldconfig deferred processing now taking place
- Then I connected the Pico2207 and ran "usbtest" wich replied (among other messages) : Pico USB device found: /dev/bus/usb/001/006
- Then, after having copied "PS2000Acon.c" in /usr/local/src where I usually put my C source files, I copy/past your formula and got : fred@Atoll:/usr/local/src$ gcc PS2000Acon.c -m32 -oPS2000Acon -lps2000a -lusb_pico-1.0
In file included from /usr/include/stdio.h:28:0,
from PS2000Acon.c:43:
/usr/include/features.h:324:26: erreur fatale: bits/predefs.h : Aucun fichier ou dossier de ce type
compilation terminée.
which means that it didn't find "bits/predefs.h".
- I found this file in usr/include/x86_64-linux-gnu so I added "-I/usr/include/x86_64-linux-gnu" to the compilation command.
The result now is : In file included from /usr/include/features.h:389:0,
from /usr/include/stdio.h:28,
from PS2000Acon.c:43:
/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:27: erreur fatale: gnu/stubs-32.h : Aucun fichier ou dossier de ce type
compilation terminée.
- And now I am stuck because I got only "stubs.h" and "stubs-64.h" in the /usr/include/x86_64-linux-gnu/gnu directory and I can't find it anywhere else.
By the way, is it planned to release a 64bits version of the Linux driver for 2207?