Test and Measurement Forum

PS2000con Unable to open device

Post your Linux discussions here

PS2000con Unable to open device

Postby jeffsadowski » Tue Jun 30, 2009 1:44 am

usbtest seems to work there is an error in the script's logic it will always print "Pico USB device not found. Please try again" at the end.
The relevant output of usbtest is
Code: Select all
Pico USB device found: /dev/bus/usb/001/009

- 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.

I compiled PS2000con as described in the readme and it compiled with no issues.
When I run ./PS2000con it outputs
Code: Select all
PS2000 driver example program
Version 1.0



Opening the device...
Handle: 0
Unable to open device
Unit Not Opened
Error Code: 3

then sits there till I hit Ctrl+c

I'd like to get this working so that I can write an app for linux to use my oscilloscope.

If I can get the test app working I can make my own stuff.
jeffsadowski
User
User
 
Posts: 3
Joined: Fri Apr 24, 2009 2:12 am

Postby ziko » Wed Jul 01, 2009 7:47 am

Hi I had a word with one of the engineers and here is what he had to say:

"We are aware of the problem with usbtest and it will be fixed in the next release. The rest of the output of the script should be correct, however.

The usbtest output you have posted shows that this device is only writeable by root, meaning that only the root user will be able to access the oscilloscope. So the first question is: are you running the ps2000con example program as root? If not, try doing so and see if you can access the oscilloscope. If it now works, you need to set up the file permissions for USB devices on your system so other users can access the oscilloscope: this is system-specific, but there's some guidance in the file INSTALL in the tar distribution.

If the example program still doesn't work when run as root we will need a bit more information: which Pico oscilloscope do you have (e.g. PicoScope 2203), which Linux distribution and version are you using? Have you successfully used this oscilloscope with a Windows PC? You could also send the output of "ls -lR /dev/bus/usb", and "cat /proc/bus/usb/devices" or "cat /dev/bus/usb/devices" (only one, or neither, of these files may exist depending on distribution).

(Aside: after the example program has displayed the error code, it is in fact waiting for you to press a key and will terminate gracefully if you do so. We ought to add a "Press any key to continue..." message to the program.)
"

Hope this helps.
Ziko

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

Postby jeffsadowski » Wed Jul 01, 2009 1:07 pm

ziko wrote:Hi I had a word with one of the engineers and here is what he had to say:

"We are aware of the problem with usbtest and it will be fixed in the next release. The rest of the output of the script should be correct, however.

The usbtest output you have posted shows that this device is only writeable by root, meaning that only the root user will be able to access the oscilloscope. So the first question is: are you running the ps2000con example program as root? If not, try doing so and see if you can access the oscilloscope. If it now works, you need to set up the file permissions for USB devices on your system so other users can access the oscilloscope: this is system-specific, but there's some guidance in the file INSTALL in the tar distribution.

I was using the example program as root.
I installed the udev device file afterwards and added the proper pico group
and users to the group
ziko wrote:If the example program still doesn't work when run as root we will need a bit more information: which Pico oscilloscope do you have (e.g. PicoScope 2203), which Linux distribution and version are you using? Have you successfully used this oscilloscope with a Windows PC? You could also send the output of "ls -lR /dev/bus/usb", and "cat /proc/bus/usb/devices" or "cat /dev/bus/usb/devices" (only one, or neither, of these files may exist depending on distribution).

(Aside: after the example program has displayed the error code, it is in fact waiting for you to press a key and will terminate gracefully if you do so. We ought to add a "Press any key to continue..." message to the program.)
"

Hope this helps.

I am using the picoscope 2203
I am using kubuntu 9.04
Yes, the picoscope works in windows on the same machine.
Code: Select all
ls -lR /dev/bus/usb/001/003
crw-rw-r-- 1 root pico 189, 2 2009-07-01 07:00 /dev/bus/usb/001/003

Is there a list of required libs that are needed by libps2000 library?
jeffsadowski
User
User
 
Posts: 3
Joined: Fri Apr 24, 2009 2:12 am

Postby ziko » Fri Jul 03, 2009 8:19 am

If anyone else is having a problem with the 2203 and linux, please email us at support@picotech.com

Kind regards
Ziko

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

Re:

Postby cherno » Fri Dec 11, 2009 7:50 pm

ziko wrote:If anyone else is having a problem with the 2203 and linux, please email us at support@picotech.com

Kind regards


Same problem here.
I'm running ubuntu karmic on a dell inspirion 6400 and can not connect to the device.

Output of usbtest:
Code: Select all
Pico USB device found: /dev/bus/usb/001/006

- It belongs to root (which is not you) who has permissions rw-
- The members of group pico (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


Runnig ps2000con:
Code: Select all
PS2000 driver example program
Version 1.0



Opening the device...
Handle: 0
Unable to open device
Unit Not Opened
Error Code: 3


I did all in INSTALL and README.

What else can I do? I bought the pico 2203 to run in under linux.

cherno
cherno
Newbie
 
Posts: 0
Joined: Fri Dec 11, 2009 7:41 pm

Re: PS2000con Unable to open device

Postby PeterF » Wed Dec 23, 2009 11:00 am

Hi,
Please can you try using the attached (zip) file to cure the problem.
PeterF.
Attachments
libps2000.so.2.0.zip
Unzip and add to library files.
(280.36 KiB) Downloaded 499 times
PeterF
Zen Master
Zen Master
 
Posts: 435
Joined: Thu Jun 07, 2007 10:53 am
Location: Cambridgeshire

Re: PS2000con Unable to open device

Postby arturormk » Wed Mar 17, 2010 10:55 pm

I had the same problem under Ubuntu Karmic and the new lib file did the trick! Thank you for supporting Linux.
arturormk
Newbie
 
Posts: 0
Joined: Wed Mar 17, 2010 10:35 pm

Re: PS2000con Unable to open device

Postby gstanghe001 » Wed Apr 14, 2010 11:21 am

Same issue here, but I'm using a 64bit linux, is it possible to have the patched library for 64bit architectures also ?

Thanks in advance for your efforts to maintain linux drivers.

Best regards
Giuseppe Stanghellini
gstanghe001
Newbie
 
Posts: 0
Joined: Wed Apr 14, 2010 10:07 am

Re: PS2000con Unable to open device

Postby cajordan » Wed Mar 20, 2013 1:28 pm

This thread is pretty old now, but I have exactly the same problem on a 64bit linux with a 2203. Has there been any progress?
cajordan
Newbie
 
Posts: 0
Joined: Wed Mar 20, 2013 1:22 pm

Re: PS2000con Unable to open device

Postby mechanix » Wed Mar 20, 2013 7:42 pm

I had the same problem in Gentoo Linux. Few post earlier attached libps2000.so.2.0.zip helped with my older 32bit Gentoo installation and I get it work with my other 64bit installation when I use 32bit version of drivers in /usr/lib32 folder and compiled PS2000con.c with -m32 option.
Last edited by mechanix on Thu Mar 21, 2013 6:25 am, edited 1 time in total.
- "Linux... because rebooting is for adding new hardware!"
mechanix
Newbie
 
Posts: 0
Joined: Wed Mar 20, 2013 7:33 pm
Location: Veikkola /Finland

Re: PS2000con Unable to open device

Postby Martyn » Wed Mar 20, 2013 8:12 pm

Try downloading the drivers and example for the 3204 (not 3204A/B), yes 3000 series, from here http://www.picotech.com/linux.html which also include 2000 version as well. These are the later version libps2_3000_R3_6_4_4_1, not sure why they have never made it under the 2000 series devices software downloads.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2287
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: PS2000con Unable to open device

Postby mechanix » Tue Mar 26, 2013 9:38 am

Still no success with 64-bit drivers. One thing I noticed, that if I open the device once with working 32-bit drivers, after that the 64-bit drivers/software works as long as I dont unplug the usb cable. When opening device for the first time with working drivers, dmesg shows usb-disconnect-connect (same if I unplug/plug the usb cable) messages and after that only reset port each time it is opened.

I'm developing gtk based software to my needs now, and have to compile it in 32-bit mode it to work properly. It would be nice, if there is a day in the future when I can remove gcc -m32 option :mrgreen:
- "Linux... because rebooting is for adding new hardware!"
mechanix
Newbie
 
Posts: 0
Joined: Wed Mar 20, 2013 7:33 pm
Location: Veikkola /Finland

Re: PS2000con Unable to open device

Postby Martyn » Wed Mar 27, 2013 7:00 am

I will add the 64 bit drivers request to the list of Linux drivers that we would like to build in the coming months.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2287
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: PS2000con Unable to open device

Postby gloriaz » Thu Mar 28, 2013 7:14 pm

I tried the libps2000.so.2.0.7, but still not work

Here's the problem


PS2000 driver example program
Version 1.0



Opening the device...
Handle: -1
Unable to open device
Drive version: 3.6.2.0 Linux
USB version:0.0
Hardware version:0
Variant Info:
Serial:



When runs to Serial, it hanging for long time.

I use 2203 and run Ubuntu in VirtualBox.

Help me, please
gloriaz
Newbie
 
Posts: 0
Joined: Thu Mar 28, 2013 6:13 pm

Re: PS2000con Unable to open device

Postby Martyn » Tue Apr 02, 2013 6:15 am

Have you tried the libps2_3000_R3_6_4_4_1 version I mentioned a couple of posts ago.

If this doesn't help then there may be a problem with the VitualBox USB interface, this has happened before
With my PS2205 I have similar problems from time to time. Check the configuration of the VM in VirtualBox. In the USB section, there is a flag that enables USB 2.0. This flag is available only since version 4 of VirtualBox. You have to activate it. The most recent version of VirtualBox (4.1.16) seems to have a bug, the bug inverts the USB 2.0 flag. So you have to de-activate the USB 2.0 flag in order to use a USB 2.0 device.

I am not quite sure if we are talking about the same problem. But the checks I suggested above are easy to do and if they really solve the problem then you have save much time.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2287
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Next

Return to Linux

Who is online

Users browsing this forum: No registered users and 0 guests