Hello,
i have some problems by installing linux-gpib for ubuntu 20.04 LTS to drive an spectrum analyzer by a GPIB-USB-HS interface.
I followed the instructions of both INSTALL files in linux-gpib-kernel and linux-gpib-user.
I tried everything available on the network and nothing seems to work.
The errors are always:
gpib_config
failed to bring board online
failed to configure board
main: Connection timed out
and in ibtest
ibtest
Do you wish to open a (d)evice or an interface (b)oard?
(you probably want to open a device): d
enter primary gpib address for device you wish to open [0-30]: 0
trying to open pad = 0 on /dev/gpib0 ...
libgpib: IBOPENDEV ioctl failed
libgpib: error in is_cic()!
ibdev error
ibsta = 0x8000 < ERR >
iberr= 0
EDVR 0: OS error
ibcntl = 22
Abandon (core dumped)
the following are the actual conf in my pc.
uname -r
5.4.0-45-generic
lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 3923:709b National Instruments Corp. GPIB-USB-HS
Bus 003 Device 003: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
Bus 003 Device 006: ID 0461:4d51 Primax Electronics, Ltd 0Y357C PMX-MMOCZUL (B) [Dell Laser Mouse]
Bus 003 Device 005: ID 1267:0103 Logic3 / SpectraVideo plc G-720 Keyboard
Bus 003 Device 002: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsmod
Module Size Used by
ni_usb_gpib 40960 0
gpib_common 45056 1 ni_usb_gpib
more /etc/gpib.conf
/ This section configures the configurable driver characteristics
* for an interface board, such as board address, and interrupt level.
* minor = 0 configures /dev/gpib0, minor = 1 configures /dev/gpib1, etc.
/
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 = "violet" / optional name, allows you to get a board descriptor using ibfind() /
pad = 0 / primary address of interface /
sad = 0 / secondary address of interface /
timeout = T3s / timeout for commands /
eos = 0x0a /* EOS Byte, 0xa is newline and 0xd is carriage return */ set-reos = yes /* Terminate read if EOS */ set-bin = no /* Compare EOS 8-bit */ set-xeos = no /* Assert EOI whenever EOS byte is sent */ set-eot = yes /* Assert EOI with last byte on writes */
/ settings for boards that lack plug-n-play capability /
base = 0 / Base io ADDRESS /
irq = 0 / Interrupt request level /
dma = 0 / DMA channel (zero disables) /
Everything looks OK. Did you specify ./configure --sysconfdir=/etc when
you did the build in linux-gpib-user ?
On Mon, 7 Sep 2020 at 13:50, Abraham St abrahamst2020@users.sourceforge.net
wrote:
Related
Support Requests: #29
hello! yes i dit it
I'm using ubuntu 20.04 LTS ... could have an issue as a consequence to use the latest version of ubuntu?
Hi Abraham,
Can you please send me the output of:
sudo dmesg | grep gpib
after the failed gpib_config. Assume you are using 4.3.3
You may want to try the svn repo version.
cheers,
-dave
On Mon, 7 Sep 2020, 21:14 Abraham St, abrahamst2020@users.sourceforge.net
wrote:
Related
Support Requests: #29
Hello Dave,
Thank you for your answer. I attach the response to the command because is quite long.
Abraham
Looking at the beginning of your dmesg, goib_config appears to run 3 times
successfully before failing on the fourth time. I'm guessing you have some
old gpib udev rules installed which you should delete. Also, you don't
need to run gpib_config since the udev rules run it automatically (after
you delete them then reinstall linux-gpib-user gpib_config should only run
once, and maybe restart udev to get it to reread the rules).
On Mon, Sep 7, 2020, 16:43 Abraham St abrahamst2020@users.sourceforge.net
wrote:
Related
Support Requests: #29
Hello Frank,
Thanks for your answer. So i did the following steps:
/etc/udev/rules.d$ sudo rm 98-gpib-generic.rules 99-agilent_82357a.rules 99-ni_usb_gpib.rules
sudo apt clean
sudo apt autoclean
sudo apt autoremove
sudo ./configure --sysconfdir=/etc
sudo make
sudo make install
...
Libraries have been installed in:
/usr/local/lib
...
Add fichier ld.conf in /etc/ld.so.conf.d/
more ld.conf
/usr/local/lib
sudo ldconfig
sudo ibtest
Do you wish to open a (d)evice or an interface (b)oard?
(you probably want to open a device): d
enter primary gpib address for device you wish to open [0-30]: 0
trying to open pad = 0 on /dev/gpib0 ...
libgpib: IBOPENDEV ioctl failed
libgpib: error in is_cic()!
ibdev error
ibsta = 0x8000 < ERR >
iberr= 0
EDVR 0: OS error
ibcntl = 19
Abandon (core dumped)
sudo gpib_config --minor 0
enter a string to send to your device: IDN?
sending string: IDN?
gpib status is:
ibsta = 0x8100 < ERR CMPL >
iberr= 0
EDVR 0: OS error
enter maximum number of bytes to read [1024]: 1024
trying to read 1024 bytes from device...
received string: ''
Number of bytes read: 0
gpib status is:
ibsta = 0x8100 < ERR CMPL >
iberr= 0
EDVR 0: OS error
sudo dmesg | grep gpib
[ 14.654897] gpib_common: loading out-of-tree module taints kernel.
[ 14.654943] gpib_common: module verification failed: signature and/or required key missing - tainting kernel
[ 14.733507] ni_usb_gpib driver loading
[ 14.733537] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-3
[ 14.733568] usbcore: registered new interface driver ni_usb_gpib
[ 14.733569] gpib: registered ni_usb_b interface
[ 957.963734] gpib: no gpib board configured on /dev/gpib0
[ 957.963760] gpib: no gpib board configured on /dev/gpib0
[ 957.963775] gpib: no gpib board configured on /dev/gpib0
[ 982.937573] ni_usb_gpib: attach
[ 982.937586] usb 3-3: bus 3 dev num 4 attached to gpib minor 0, NI usb interface 0
Well, now udev isn't running gpib_config at all, but that is a
separate issue from your main problem. Anyways, when you manually ran
gpib_config it worked. The problem is you are running ibtest opening
device primary address 0, which is the address of your adapter. You
should be opening the address of the instrument you are trying to talk
to.
On Tue, Sep 8, 2020 at 5:39 AM Abraham St
abrahamst2020@users.sourceforge.net wrote:
--
Frank
Related
Support Requests: #29
Hello Frank,
I've tried again after unistanlling and reinstalling linux_gpib_kernel and user. I ran ibtest but the errors continue appearing:
enter a string to send to your device: IDN?
sending string: IDN?
gpib status is:
ibsta = 0x8100 < ERR CMPL >
iberr= 0
EDVR 0: OS error
enter maximum number of bytes to read [1024]: 256
trying to read 256 bytes from device...
received string: ''
Number of bytes read: 0
gpib status is:
ibsta = 0x8100 < ERR CMPL >
iberr= 0
EDVR 0: OS error
Here the results of dsmesg
sudo dmesg | grep gpib
[ 14.701929] gpib_common: loading out-of-tree module taints kernel.
[ 14.701962] gpib_common: module verification failed: signature and/or required key missing - tainting kernel
[ 15.211421] ni_usb_gpib driver loading
[ 15.211443] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-4
[ 15.211467] usbcore: registered new interface driver ni_usb_gpib
[ 15.211467] gpib: registered ni_usb_b interface
[ 15.554690] ni_usb_gpib: attach
[ 15.554694] usb 3-4: bus 3 dev num 4 attached to gpib minor 0, NI usb interface 0
[ 15.953398] gpib0: exiting autospoll thread
[ 15.954030] ni_usb_gpib: attach
[ 15.954034] usb 3-4: bus 3 dev num 4 attached to gpib minor 0, NI usb interface 0
Sorry but i don't understand why 0 is incorrect, mi adapter gpib is 0. My instrument has an address GPIB0::8::INSTR, you mean 8?
I tried 8 too but the same erros.
Do you believe we can communicate by phone (if yes please send me a DM). This work is for an entreprise and we appreciate some support for this case.
Thank you for your help.
BR,
Abraham
Email to your users.sourceforge.net address didn't work, so send me an
email directly to fmh6jj@gmail.com
On Wed, Sep 9, 2020, 17:35 Abraham St abrahamst2020@users.sourceforge.net
wrote:
Related
Support Requests: #29
Hi Please try the following test to establish whether at least the
board is working:
DAV off
NDAC off
NRFD off
IFC off
REN on
SRQ off
ATN on
EOI off
gpib status is:
ibsta = 0x130 < CMPL CIC ATN >
iberr= 0
$
cheers,
-Dave
Hello! I am experiencing the very same problem as the OP.
Whenever I try to send a
*IDN?
command thoughibtest
I get the following error.My OS is Ubuntu 20.04:
I have installed the latest version of
gpib-linux
4.3.4 and when I run thesudo gpib_config
there is no error displayed.Here is my
/etc/gpib.conf
:If I use
eos = 0xa
the result is the same.Here is the relevant output of dmesg:
Here is the full output of
ibtest
. The instrument is on ID 1. The instrument is correctly detected in Windows so the hardware is OK.Please can you send the output of the following command:
sudo grep gpib /var/log/messages
thanks,
/d
On Mon, 6 Sept 2021 at 07:30, Giorgio Pintaudi
laststardust@users.sourceforge.net wrote:
Related
Support Requests: #29
Hello Dave. Thank you very much for your quick reply.
As you might already know, in Ubuntu 20.04 the
/var/log/messages
log has been replaced by/var/log/syslog
. This is the relevant section of the syslog when the GPIB adapter is connected:The only suspicious entry seems to be this:
Sep 7 10:50:03 zion kernel: [ 7338.077951] usb 1-3.1.1: config 1
interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0,
changing to 7
Could you please send the output of
"lsusb -v -d 3923:"
thanks
On Tue, 7 Sept 2021 at 04:00, Giorgio Pintaudi
laststardust@users.sourceforge.net wrote:
Related
Support Requests: #29
Here you are:
errno 6 is ENXIO which the ni_usb driver returns when the adapter gives a NIUSB_ADDRESSING_ERROR on write. So I would guess your instrument isn't really at address 1, or its gpib interface isn't enabled or something similar.
Really, the library should be returning an error of EADR rather than EDVR in this case, but looking at ibWrt.c it seems I never got around to handling that error.
I am quite sure that the GPIB address of the device (TDS 1002 Oscilloscope) is 1. I have set it to be 1 on the instrument menu. In Windows 10 the instrument is correctly recognized to be at address 1.
The only other GPIB option that I can set on the instrument is
Bus connection
that takes values ofTalk-Listen
andOff-Bus
. Which one should I set?Set it to talk-listen. IIRC correctly, the adapter gives an addressing
error when it is not connected to anything, which causes it's sending of
addressing command bytes to fail. I think if it were just writing to the
wrong address then if would give a "no listeners" error after attempting to
send the data bytes.
I had it already set to talk-listen. So your guess is that there is just no reply from the instrument. Is there anything else that I can do to troubleshoot this problem?
Yes, open a board descriptor with ibtest (rather than a device). Then send the following command bytes: MTA0 (0x40) UNL (0x3f) MLA1 (0x21). That should address the adapter as talker (which you will see in the ibsta status) and your device as listener (which can be detected by looking at the line status). Assuming that worked, you can try doing a board-level write of *IDN?. You can read the response by sending command bytes MTA1 UNL MLA0 then doing a board level read.
If the adapter is really not working correctly, the ultimate thing would be to run a usb sniffer (wireshark with libpcap) on windows and capture how the windows driver is initializing the adapter.
I have tried to do the test with
ibtest
but without success. Before I go on sniffing the USB connection in Windows, could you please double check if the commands that I used are correct?Last edit: Giorgio Pintaudi 2021-09-08
It might be interesting to see the line status after you send the command, before doing the write. Then do a "go to standby" to release ATN and do a line status again. The commands seems to be succeeding, the board goes into TACS/LACS. However, after the board level write/read it has dropped out of TACS/LACS somehow. So possibly something has changed in how the adapter does board level read/write with your adapter hardware/firmware version.
Here you are:
Last edit: Giorgio Pintaudi 2021-09-09