Re: Need help with linux-gpib on Raspberry Pi 4

dave penkler <[email protected]> Thu, 25 Mar 2021 10:14:57 +0100
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAL=kjP1PNunL099gFBSj9Aph-f7RFTUykhRceg9Wx4gVx_imxw@mail.gmail.com>
Hi Edevaldo,
Everything looks alright. When you did the ./configure did you specify
--sysconfdir=/etc ?
If not, please try gpib_config with your gpib.conf in the default
location /usr/local/etc/gpib.conf or
gpib_config -f /etc/gpib.conf
cheers,
-Dave


On Thu, 25 Mar 2021 at 06:26, Edevaldo Pereira da Silva Junior
<[email protected]> wrote:
>
> I tried to install the NI GPIB-USB-HS device and use it on a Raspberry Pi 4. But I cannot get to communicate with devices connected to it.
>
> Compiling and installing linux-gpib seems to have worked well. I didn't see any errors.
> When I connect the device to the Pi and run dmesg I see:
>
> [ 3184.306689] usb 1-1.1: new high-speed USB device number 7 using xhci_hcd
> [ 3184.547108] usb 1-1.1: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7
> [ 3184.547619] usb 1-1.1: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
> [ 3184.547632] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [ 3184.547645] usb 1-1.1: Product: GPIB-USB-HS
> [ 3184.547657] usb 1-1.1: Manufacturer: National Instruments
> [ 3184.547668] usb 1-1.1: SerialNumber: 0184AC93
> [ 3184.551672] ni_usb_gpib: probe succeeded for path: usb-0000:01:00.0-1.1
>
> Typing lsusb I see:
> Bus 001 Device 007: ID 3923:709b National Instruments Corp. GPIB-USB-HS
>
> And "lsmod | grep gpib" results in:
> ni_usb_gpib            40960  0
> gpib_common            49152  1 ni_usb_gpib
>
> My /etc/gpib.conf looks:
>
> interface {
>     minor       = 0             /* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1 */
>     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     = T30s          /* 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 */
>     master      = yes           /* interface board is system controller */
> }
>
> device {
>     minor = 0          /* minor number for interface this device is connected to */
>     pad = 17           /* Primary address */
>     name = "K2000"     /* device mnemonic */
>     sad = 0            /* Secondary address */
>     eos = 0xa          /* EOS byte, 0xa is newline and 0xd is carriage return */
>     set-reos = yes     /* Terminate read if EOS */
>     set-bin = yes      /* Compare EOS 8-bit */
>     set-xeos = no      /* Assert EOI whenever EOS byte is sent */
>     set-eot = yes      /* Assert EOI with last byte on writes */
> }
>
>
> device {
>     minor = 0          /* minor number for interface this device is connected to */
>     pad = 16           /* Primary address */
>     name = "K2001M"    /* device mnemonic */
>     sad = 0            /* Secondary address */
>     eos = 0xa          /* EOS byte, 0xa is newline and 0xd is carriage return */
>     set-reos = yes     /* Terminate read if EOS */
>     set-bin = yes      /* Compare EOS 8-bit */
>     set-xeos = no      /* Assert EOI whenever EOS byte is sent */
>     set-eot = yes      /* Assert EOI with last byte on writes */
> }
>
> But running "sudo gpib_config" results in:
> failed to configure boardtype: ni_pci
> failed to configure board
> main: Invalid argument
>
> If I run something like "sudo gpib_config -t ni_usb_b --sre --ifc" I get no errors.
> And after I run it "sudo ibtest" seems to start but I get get any response from devices on the bus:
> 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]: 16
> trying to open pad = 16 on /dev/gpib0 ...
> You can:
>
> w(a)it for an event
> write (c)ommand bytes to bus (system controller only)
> send (d)evice clear (device only)
> change remote (e)nable line (system controller only)
> (g)o to standby (release ATN line, system controller only)
> send (i)nterface clear (system controller only)
> ta(k)e control (assert ATN line, system controller only)
> get bus (l)ine status (board only)
> go to local (m)ode
> change end (o)f transmission configuration
> (q)uit
> (r)ead string
> perform (s)erial poll (device only)
> change (t)imeout on io operations
> request ser(v)ice (board only)
> (w)rite data string
> send group e(x)ecute trigger (device only)
>
> : w
> enter a string to send to your device: *IDN?
> sending string: *IDN?
>
> gpib status is:
> ibsta = 0xc100  < ERR TIMO CMPL >
> iberr= 6
> EABO 6: Operation aborted
>
> ibcntl = 0
>
> Any ideas on what I could try to fix the problem? The GPIB card works ok on windows. I have no other linux machines to test it.
>
> Thanks a lot!
>
> Edevaldo
> _______________________________________________
> Linux-gpib-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general