Drivers for BeagleBoneBlack and Raspberry Pi

Discussion forum for the Picoscope 6 Linux software
gcusepico
Newbie
Posts: 0
Joined: Mon Jun 18, 2018 8:56 am

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by gcusepico »

OK, run the usbtest and got below:

...
Please connect your Pico USB device and press enter to continue...

Pico USB device found: /dev/bus/usb/001/004

- It belongs to root (which is not you) who has permissions rw-
- The members of group pico (which you are not in) have permissions rw-
- Everyone else (this is you) has permissions r--
- You CANNOT write to this device and so will NOT be able to use it.
Please see the driver installation instructions for assistance in
resolving this problem


permission r-- not enough to find the pico device?

Just install libusb-dev packet. But found nothing changed.
Could you give me some more hint for libusb command? Thanks!

Regards.

gcusepico
Newbie
Posts: 0
Joined: Mon Jun 18, 2018 8:56 am

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by gcusepico »

OK now!
Just need to add current user to group "pico" which has rw-.
Thanks again!

Hitesh

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by Hitesh »

Hi gcusepico,

Good to hear that you found the issue. I'd just posted to say add your user to the Pico group when I saw your message :lol:

Regards,
Last edited by Hitesh on Mon Jun 25, 2018 8:44 am, edited 1 time in total.
Reason: Update following resolution

bennog
Advanced User
Advanced User
Posts: 206
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by bennog »

you should type ./usbtest when you are in the directory of usbtest itself.

Benno

david.p
Newbie
Posts: 0
Joined: Thu Jul 05, 2018 9:56 am

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by david.p »

Hey,

I got a problem building the C-Example for the 4000a Series. I followed the guide to Page one and also the additional libopencv comment, but still it does not compile on a fresh raspbian on a 3B+. I attached the config.log als .txt for additional resource.

Code: Select all

make[1]: Entering directory '/opt/picoscope/share/doc/libps4000a'
  CC       ps4000acon.o
ps4000acon.c:202:2: error: unknown type name ‘PS4000A_DEVICE_RESOLUTION’
  PS4000A_DEVICE_RESOLUTION resolution;
  ^~~~~~~~~~~~~~~~~~~~~~~~~
ps4000acon.c:209:2: error: unknown type name ‘PS4000A_USER_PROBE_INTERACTIONS’
  PS4000A_USER_PROBE_INTERACTIONS userProbeInteractions[PS4000A_MAX_4_CHANNELS];
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Attachments
config.txt
Config Log
(38.93 KiB) Downloaded 220 times

Hitesh

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by Hitesh »

Hi david.p,

We are waiting for the armhf driver package for the libps4000a library to be updated, although we cannot advise on timescales.

Could you please advise which PicoScope 4000 Series device you are using?

If it is the PicoScope 4824, then you can remove references to device resolution and probe interaction from the example.

Regards,

kutt
Newbie
Posts: 0
Joined: Fri Oct 05, 2018 12:51 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by kutt »

Hello,

after setting this up on a RPI 2 with Debian 9 I run into the same issue
DigitalArcSystems wrote:
Fri Aug 26, 2016 7:15 pm
Here's a couple of them:

1st on attempt to obtain a block of Data:

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
S - Immediate streaming
W - Triggered streaming
X - Exit
Operation:

Collect block immediate...
Press a key to start

Timebase: 2 SampleInterval: 4nS oversample: 1
Waiting for trigger...Press a key to abort
BlockDataHandler:ps3000aGetValues ------ 0x00000046
Status 46: PICO_BUFFERS_NOT_SET
An attempt was made to get data before a data buffer was defined

Here's an attempt to set the Voltages

PS3000A driver example program

Enumerating Units...
Found one device, opening...

Handle: 1
Device opened successfully, cycle 1

Model : 3403D
S/N : DU009/010


Readings will be scaled in (mV)



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
S - Immediate streaming
W - Triggered streaming
X - Exit
Operation:

0 -> 10 mV
Specify voltage range (0..0)
99 - switches channel off

** At least 1 channel must be enabled **

Specify voltage range (0..0)
99 - switches channel off

** At least 1 channel must be enabled **

Specify voltage range (0..0)
99 - switches channel off

[THIS REPEATS]



Thanks,


Noah
you said:
Martyn wrote:
Thu Sep 08, 2016 12:54 pm
I would suggest cutting the code back to basics and add in the calls in sequence, not using the console menu, to make a simple block collection routine.

Actually I did not change any code, just compiled:
Martyn wrote:
Fri Jul 22, 2016 6:28 am
They are not in the latest release, not sure why, attached is the example code from the previous release, try using these files

Can you elaborate what you mean by "cutting the code back to basics"? I just used your example and did not make any changes.

Actually I just need the Picoscope to pipe some amount of samples by an external trigger.

kutt
Newbie
Posts: 0
Joined: Fri Oct 05, 2018 12:51 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by kutt »

Hello,

me again ;)

after some diggin I may have found a possible issue. The example seems to miss my Picoscope due to it's newer production date.

It's a 3203D, however in the file: PS3000Acon.c starting at line 1495:

Code: Select all

switch (variant)
        {
I found a lot of models, eg.

Code: Select all

case MODEL_PS 3204A:
but not the 3203D

So my guess is I have to adjust the sample to support it. Can you give me a hint about all the places I need to change?

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by Martyn »

Have you tried looking at the latest C example on GitHub which support the D variants.
Martyn
Technical Support Manager

SantaAri
Newbie
Posts: 0
Joined: Mon Oct 08, 2018 12:01 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by SantaAri »

I could not get past part 3 with the wget. I know pretty much nothing about terminal codes. If some one could lend a hand. This is now a few days ago but I remember it saying something about not finding anything.

kutt
Newbie
Posts: 0
Joined: Fri Oct 05, 2018 12:51 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by kutt »

Hello Martyn,

I added the ID of the 3203D to the other example and it works. I was able to read a nice since wave from a function generator.

Now I try ti figure out the correct setting for this thing. Sadly, in the link to GitHub you provided is no such section.

At line 1519 it starts

Code: Select all

	switch (variant)
	{
	case MODEL_PS3204A:
		unit->model			= MODEL_PS3204A;
		unit->sigGen		= SIGGEN_FUNCTGEN;
		unit->firstRange	= PS3000A_50MV;
		unit->lastRange		= PS3000A_20V;
		unit->channelCount	= DUAL_SCOPE;
		unit->ETS			= FALSE;
		unit->AWGFileSize	= MIN_SIG_GEN_BUFFER_SIZE;
		unit->digitalPorts	= 0;
		break;
there I added a case for the 3203D, but I am not sure what the correct settings are...

This is how I did it right now:

Code: Select all

	switch (variant)
	{
	case MODEL_PS3203D:
		unit->model			= MODEL_PS3203D;
		unit->sigGen		= SIGGEN_FUNCTGEN;
		unit->firstRange	= PS3000A_20MV;
		unit->lastRange		= PS3000A_20V;
		unit->channelCount	= DUAL_SCOPE;
		unit->ETS			= FALSE;
		unit->AWGFileSize	= MAX_SIG_GEN_BUFFER_SIZE;
		unit->digitalPorts	= 0;
		break;
	case MODEL_PS3204A:
		
Is this correct?

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by Martyn »

Just two changes

Code: Select all

unit->sigGen		= SIGGEN_AWG;

Code: Select all

unit->ETS			= TRUE;
The new code works the settings out in a different manner, and will work with the 3203D as supplied.
Martyn
Technical Support Manager

kutt
Newbie
Posts: 0
Joined: Fri Oct 05, 2018 12:51 pm

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by kutt »

Hello Martyn,

this seems to work like a charm!

I added the picoscope to my existing PI code and it works!

I still have 3 Questions (sorry).

1:
In the Header file is "BUFFER_SIZE" definded as 1024. Since I just want to read one Block (we are doing a triggered Single shot), can I just increase the BUFFER_SIZE? I guess this is in bytes and the 3203D has 64MS memory. So a value of lets say 32535 would be possible? (I guess the limit is what can be allocated via malloc/memset?)

2:
Can you tell me what I have to change in the trigger settings to use the external trigger input?
I think this is the right section:

Code: Select all

	struct tPS3000ATriggerChannelProperties sourceDetails = {	triggerVoltage,
			256 * 10,
			triggerVoltage,
			256 * 10,
			PS3000A_CHANNEL_A,
			PS3000A_LEVEL};

	struct tPS3000ATriggerConditionsV2 conditions = {	PS3000A_CONDITION_TRUE,
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE};

	struct tPwq pulseWidth;

	struct tTriggerDirections directions = {	PS3000A_RISING,
			PS3000A_NONE,
			PS3000A_NONE,
			PS3000A_NONE,
			PS3000A_NONE,
			PS3000A_NONE };
I tried this:

Code: Select all

	struct tPS3000ATriggerChannelProperties sourceDetails = {	triggerVoltage,
			256 * 10,
			triggerVoltage,
			256 * 10,
			PS3000A_CHANNEL_EXTERNAL,
			PS3000A_LEVEL};

	struct tPS3000ATriggerConditionsV2 conditions = {	
			PS3000A_CONDITION_DONT_CARE,   //Ch0
			PS3000A_CONDITION_DONT_CARE,   //Ch1
			PS3000A_CONDITION_DONT_CARE,   //Ch2
			PS3000A_CONDITION_DONT_CARE,   //Ch3
			PS3000A_CONDITION_TRUE,             //Ch EXT
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE,
			PS3000A_CONDITION_DONT_CARE};

	struct tPwq pulseWidth;

	struct tTriggerDirections directions = {	
			PS3000A_NONE,
			PS3000A_NONE,
			PS3000A_NONE,
			PS3000A_NONE,
			PS3000A_RISING,
			PS3000A_NONE };
But for some reason it seems not to work...

3:
I piped a 1kHz triangle waveform into the Picoscope (5Vpp) and got this:
tri.png
It looks not bad, but at around 3,4ms there is a wrong datapoint. If i repeat this I get almost everytime a wrong reading somewhere.
Do you have any idea what the reason for this could be?
The Picoscope it USB powered by the Raspberry and does not show any sign of low voltage. The cable between our Rothe&Schwarz fuction generator is a shielded BNC. So I don't think it's because of EMV...

angelo_villasanta
Newbie
Posts: 0
Joined: Tue Sep 24, 2019 8:21 am

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by angelo_villasanta »

I'm getting an invalid key when running

Code: Select all

sudo apt-get update
I was following the guide on the first post of this thread, I've added the deb line in my sources.list file. However, after getting the key and then running the update code, this is what I get:

Code: Select all

pi@raspberrypi:~ $ wget -O - http://labs.picotech.com/debian/dists/picoscope/Release.gpg.key | sudo apt-key add -
--2019-09-24 17:57:02--  http://labs.picotech.com/debian/dists/picoscope/Release.gpg.key
Resolving labs.picotech.com (labs.picotech.com)... 104.20.65.236, 104.20.64.236
Connecting to labs.picotech.com (labs.picotech.com)|104.20.65.236|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://labs.picotech.com/debian/dists/picoscope/Release.gpg.key [following]
--2019-09-24 17:57:02--  https://labs.picotech.com/debian/dists/picoscope/Release.gpg.key
Connecting to labs.picotech.com (labs.picotech.com)|104.20.65.236|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 959 [application/pgp-keys]
Saving to: ‘STDOUT’

-                                         100%[===================================================================================>]     959  --.-KB/s    in 0s      

2019-09-24 17:57:02 (5.01 MB/s) - written to stdout [959/959]

OK
pi@raspberrypi:~ $ sudo apt-get update
Hit:2 http://archive.raspberrypi.org/debian buster InRelease                                                                        
Hit:3 https://labs.picotech.com/debian picoscope InRelease                                             
Hit:4 http://raspbian.raspberrypi.org/raspbian buster InRelease                  
Get:1 https://labs.picotech.com/raspbian picoscope InRelease [1,518 B]
Err:1 https://labs.picotech.com/raspbian picoscope InRelease
  The following signatures were invalid: 790128FE0D37172A2C56ACB16964D13AA2A43CCE
Reading package lists... Done
W: GPG error: https://labs.picotech.com/raspbian picoscope InRelease: The following signatures were invalid: 790128FE0D37172A2C56ACB16964D13AA2A43CCE
E: The repository 'http://labs.picotech.com/raspbian picoscope InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
And I'm not sure how to proceed with this one.

ZhangXuan
Newbie
Posts: 0
Joined: Tue Oct 29, 2019 9:46 am

Re: Drivers for BeagleBoneBlack and Raspberry Pi

Post by ZhangXuan »

Hi
I have question like this :
checking libps2000a-1.1/ps2000aApi.h usability... no
checking libps2000a-1.1/ps2000aApi.h presence... no
checking for libps2000a-1.1/ps2000aApi.h... no
checking libps2000a-1.1/PicoStatus.h usability... no
checking libps2000a-1.1/PicoStatus.h presence... no
checking for libps2000a-1.1/PicoStatus.h... no
configure: error: libps2000a-1.1/ps2000aApi.h missing!

How can I do next ? Thanks

Post Reply