Subject: |
Re: ioctl errorno: 25 in GPIB communication using python-gpib |
From: |
Rod Nussbaumer <[email protected]> |
To: |
[email protected] |
Date: |
Thu, 26 Nov 2015 16:19:16 -0800 |
Since you didn't mention it in your otherwise detailed list, I will
mention that following the loading of the GPIB kernel drivers, you must
run the gpib_config command, which gets built as part of the linux-gpib
package. This must be done as root, I believe. Also, the default
permissions on the /dev/gpibXX device nodes generally seem to end up
with root-only write access, so either your application will need root
privileges, or the device nodes must have user/group write permission
added.
Rod Nussbaumer
Controls Group, TRIUMF
Vancouver, Canada
On 11/26/2015 01:10 PM, Vinícius Mariani Lenart wrote:
Dear EPICS,
I recently discovered the site and I would like to congratulate
the good work done. Furthermore, I would like to share a problem =). I
post my problem in the stackoverflow site in this link
ioctl-errorno-25-in-gpib-communication-using-python-gpib
<http://stackoverflow.com/questions/33946130/ioctl-errorno-25-in-gpib-communication-using-python-gpib>.
But I paste a copy below.
I am trying to communicate with a Tektronix oscilloscope TDS 210 using a
GPIB-USB-HS adapter of National Instruments. My system is Ubuntu 14.04.3
where I installed linux-gpib as described in this link: Linux GPIB
Driver package (source)
<http://sourceforge.net/p/linux-gpib/mailman/linux-gpib-general/thread/[email protected]/> and
also python-gpib. I reconfigured the /etc/gpib.conf like this:
|interface{
minor= 0 /* board index, minor= 0 uses/dev/gpib0, minor= 1 uses/dev/gpib1, etc. */
board_type= "ni_usb_b" /* type of interface board being used*/
name= "tds" /* optional name, allows you to get a board descriptor using ibfind() */
pad= 0 /* primary address of interface*/
sad= 0 /* secondary address of interface*/
master= yes/* interface boardis system controller*/
timeout= TNONE/* timeoutfor commands*/
}
device{
minor= 0
name= "ATTN"
pad= 0
sad= 0
}|
The lsmod give me this:
|$ lsmod| grep gpib
ni_usb_gpib36515 1
gpib_common38274 3 ni_usb_gpib|
The dmesg:
|$ dmesg| grep gpib
[ 2173.992039] ni_usb_gpib driver loadingni_usb_gpib: probe succeededfor path: usb-0000:00:1a.0-1.2
[ 2173.992098] usbcore: registered new interface driver ni_usb_gpib
[ 2173.992102] gpib: registered ni_usb_b interface
[ 2173.995077] ni_usb_gpib: attach|
But when a try to communicate with the oscilloscope using ibtest I
receive this error:
|gpib statusis:
ibsta= 0x8100 < ERR CMPL>
iberr= 0
EDVR0: OS error
ibcnt= 25|
And with Python:
|import Gpib
tds= Gpib.Gpib(0,0)
tds.write("*IDN?")
---------------------------------------------------------------------------
GpibError Traceback (most recent call last)
<ipython-input-4-e61e6a76ac49> in <module>()
1 import Gpib
2 inst= Gpib.Gpib(0,0)
----> 3 inst.write("*IDN?")
/usr/local/lib/python2.7/dist-packages/Gpib.pycin write(self, str)
47
48 def write(self,str):
---> 49 gpib.write(self.id, str)
50
51 def write_async(self,str):
GpibError: write() error: Inappropriate ioctlfor device(errno: 25)|
So, if you know how to fix or can share with the community I will
appreciated.
Best regards!
--------------------------------------------------------
Vinícius Mariani Lenart
E-mail: [email protected] <mailto:[email protected]>
Skype: vmlenart
www.researchgate.net/profile/V_M_Lenart/
<https://www.researchgate.net/profile/V_M_Lenart/>
"/Live long and prosper/"
--------------------------------------------------------
- References:
- ioctl errorno: 25 in GPIB communication using python-gpib Vinícius Mariani Lenart
- Navigate by Date:
- Prev:
ioctl errorno: 25 in GPIB communication using python-gpib Vinícius Mariani Lenart
- Next:
EPICS and Beckhoff tyse_ljw
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
ioctl errorno: 25 in GPIB communication using python-gpib Vinícius Mariani Lenart
- Next:
EPICS and Beckhoff tyse_ljw
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|