Menu

#29 linux-gpib ubuntu 20.0 LTS

v1.0 (example)
open
nobody
linux-gpib (1)
1
2022-11-10
2020-09-07
Abraham St
No

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) /

Related

Support Requests: #29

Discussion

1 2 > >> (Page 1 of 2)
  • DaveP

    DaveP - 2020-09-07

    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:


    Status: open
    Group: v1.0 (example)
    Labels: linux-gpib
    Created: Mon Sep 07, 2020 11:50 AM UTC by Abraham St
    Last Updated: Mon Sep 07, 2020 11:50 AM UTC
    Owner: nobody

    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) /


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/linux-gpib/support-requests/29/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Support Requests: #29

    • Abraham St

      Abraham St - 2020-09-07

      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?

       
      • DaveP

        DaveP - 2020-09-07

        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:

        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?


        Status: open
        Group: v1.0 (example)
        Labels: linux-gpib
        Created: Mon Sep 07, 2020 11:50 AM UTC by Abraham St
        Last Updated: Mon Sep 07, 2020 11:50 AM UTC
        Owner: nobody

        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) /


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/linux-gpib/support-requests/29/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         

        Related

        Support Requests: #29

        • Abraham St

          Abraham St - 2020-09-07

          Hello Dave,
          Thank you for your answer. I attach the response to the command because is quite long.

          Abraham

           
          • Frank Mori Hess

            Frank Mori Hess - 2020-09-07

            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:

            Hello Dave,
            Thank you for your answer. I attach the response to the command because is
            quite long.

            Abraham

            Attachments:


            Status: open
            Group: v1.0 (example)
            Labels: linux-gpib
            Created: Mon Sep 07, 2020 11:50 AM UTC by Abraham St
            Last Updated: Mon Sep 07, 2020 07:14 PM UTC
            Owner: nobody

            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) /


            Sent from sourceforge.net because you indicated interest in
            https://sourceforge.net/p/linux-gpib/support-requests/29/

            To unsubscribe from further messages, please visit
            https://sourceforge.net/auth/subscriptions/

             

            Related

            Support Requests: #29

            • Abraham St

              Abraham St - 2020-09-08

              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

              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 ...
              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 = 0x8100 < ERR CMPL >
              iberr= 0
              EDVR 0: OS error

              ibcntl = 6
              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)
              r
              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
              ibcntl = 5
              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)
              q

              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

               
              • Frank Mori Hess

                Frank Mori Hess - 2020-09-08

                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:

                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

                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 ... 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 = 0x8100 < ERR CMPL >
                iberr= 0
                EDVR 0: OS error

                ibcntl = 6 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) r
                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 ibcntl = 5 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) q


                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


                [support-requests:#29] linux-gpib ubuntu 20.0 LTS

                Status: open
                Group: v1.0 (example)
                Labels: linux-gpib
                Created: Mon Sep 07, 2020 11:50 AM UTC by Abraham St
                Last Updated: Mon Sep 07, 2020 08:43 PM UTC
                Owner: nobody

                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) /


                Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/linux-gpib/support-requests/29/

                To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

                --
                Frank

                 

                Related

                Support Requests: #29

                • Abraham St

                  Abraham St - 2020-09-09

                  Hello Frank,

                  I've tried again after unistanlling and reinstalling linux_gpib_kernel and user. I ran ibtest but the errors continue appearing:


                  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 ...
                  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 = 0x8100 < ERR CMPL >
                  iberr= 0
                  EDVR 0: OS error

                  ibcntl = 6
                  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)
                  r
                  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

                   
                  • Frank Mori Hess

                    Frank Mori Hess - 2020-09-09

                    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:

                    Hello Frank,

                    I've tried again after unistanlling and reinstalling linux_gpib_kernel and
                    user. I ran ibtest but the errors continue appearing:


                    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 ... 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 = 0x8100 < ERR CMPL >
                    iberr= 0
                    EDVR 0: OS error
                    ibcntl = 6 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) r
                    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


                    Status: open
                    Group: v1.0 (example)
                    Labels: linux-gpib
                    Created: Mon Sep 07, 2020 11:50 AM UTC by Abraham St
                    Last Updated: Tue Sep 08, 2020 09:39 AM UTC
                    Owner: nobody

                    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) /


                    Sent from sourceforge.net because you indicated interest in
                    https://sourceforge.net/p/linux-gpib/support-requests/29/

                    To unsubscribe from further messages, please visit
                    https://sourceforge.net/auth/subscriptions/

                     

                    Related

                    Support Requests: #29

                  • DaveP

                    DaveP - 2020-09-10

                    Hi Please try the following test to establish whether at least the
                    board is working:

                    $ ibtest
                    Do you wish to open a (d)evice or an interface (b)oard?
                    (you probably want to open a device): b
                    enter name of interface board (or device) you wish to open: violet
                    trying to open board named 'violet'
                    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)
                    l
                    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
                    ibcntl = 0
                    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)
                    q
                    $
                    cheers,
                    -Dave
                     
  • Giorgio Pintaudi

    Hello! I am experiencing the very same problem as the OP.
    Whenever I try to send a *IDN? command though ibtest I get the following error.

    gpib status is:
    ibsta = 0x8100 < ERR CMPL >
    iberr= 0
    EDVR 0: OS error
    ibcntl = 6 
    

    My OS is Ubuntu 20.04:

    $ uname -a
    Linux zion 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    

    I have installed the latest version of gpib-linux 4.3.4 and when I run the sudo gpib_config there is no error displayed.

    Here is my /etc/gpib.conf:

    interface {
        minor = 0
        board_type = "ni_usb_b"
        name = "NI_USB_HS"
        pad = 0
        sad = 0
        timeout = T3s
        eos = 0xd
        set-reos = yes
        set-bin = no
        set-xeos = no
        set-eot = yes
        base = 0
        irq  = 0
        dma  = 0
        master = yes
    }
    

    If I use eos = 0xa the result is the same.

    Here is the relevant output of dmesg:

    [   56.709709] usb 1-3.1.1: new high-speed USB device number 11 using xhci_hcd
    [   57.002076] usb 1-3.1.1: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7
    [   57.002608] usb 1-3.1.1: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
    [   57.002623] usb 1-3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [   57.002630] usb 1-3.1.1: Product: GPIB-USB-HS
    [   57.002636] usb 1-3.1.1: Manufacturer: National Instruments
    [   57.002641] usb 1-3.1.1: SerialNumber: 01E37DBC
    [   57.627517] Linux-GPIB 4.3.4 Driver
    [   57.629759] ni_usb_gpib driver loading
    [   57.629797] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-3.1.1
    [   57.629924] usbcore: registered new interface driver ni_usb_gpib
    [   57.629927] gpib: registered ni_usb_b interface
    [   57.762545] ni_usb_gpib: attach
    [   57.762551] usb 1-3.1.1: bus 1 dev num 11 attached to gpib minor 0, NI usb interface 0
    [   57.765543]  product id=0x709b
    [   57.765657] ni_usb_hs_wait_for_ready: board serial number is 0x1e37dbc
    [   57.767188] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x12, expected 0x2, 0xe or 0xf
    [   57.767191] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[9]=0x2, expected 0x0, 0x3 or 0x30
    [   57.767192] ni_usb_dump_raw_block:
    
    [   57.767194]  40
    [   57.767194]   1
    [   57.767195]   0
    [   57.767195]   1
    [   57.767195]  30
    [   57.767196]   1
    [   57.767196]  12
    [   57.767197]   5
    
    [   57.767198]   0
    [   57.767198]   2
    [   57.767198]   0
    

    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.

    $ 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]: 1
    trying to open pad = 1 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 = 0x8100  < ERR CMPL >
    iberr= 0
    EDVR 0: OS error
    
    ibcntl = 6
    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)
    : q
    
     
    • DaveP

      DaveP - 2021-09-06

      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:

      Hello! I am experiencing the very same problem as the OP.
      Whenever I try to send a *IDN? command though ibtest I get the following error.

      gpib status is:
      ibsta = 0x8100 < ERR CMPL >
      iberr= 0
      EDVR 0: OS error
      ibcntl = 6

      My OS is Ubuntu 20.04:

      $ uname -a
      Linux zion 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

      I have installed the latest version of gpib-linux 4.3.4 and when I run the sudo gpib_config there is no error displayed.

      Here is my /etc/gpib.conf:

      interface {
      minor = 0
      board_type = "ni_usb_b"
      name = "NI_USB_HS"
      pad = 0
      sad = 0
      timeout = T3s
      eos = 0xd
      set-reos = yes
      set-bin = no
      set-xeos = no
      set-eot = yes
      base = 0
      irq = 0
      dma = 0
      master = yes
      }

      If I use eos = 0xa the result is the same.

      Here is the relevant output of dmesg:

      [ 56.709709] usb 1-3.1.1: new high-speed USB device number 11 using xhci_hcd
      [ 57.002076] usb 1-3.1.1: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7
      [ 57.002608] usb 1-3.1.1: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
      [ 57.002623] usb 1-3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      [ 57.002630] usb 1-3.1.1: Product: GPIB-USB-HS
      [ 57.002636] usb 1-3.1.1: Manufacturer: National Instruments
      [ 57.002641] usb 1-3.1.1: SerialNumber: 01E37DBC
      [ 57.627517] Linux-GPIB 4.3.4 Driver
      [ 57.629759] ni_usb_gpib driver loading
      [ 57.629797] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-3.1.1
      [ 57.629924] usbcore: registered new interface driver ni_usb_gpib
      [ 57.629927] gpib: registered ni_usb_b interface
      [ 57.762545] ni_usb_gpib: attach
      [ 57.762551] usb 1-3.1.1: bus 1 dev num 11 attached to gpib minor 0, NI usb interface 0
      [ 57.765543] product id=0x709b
      [ 57.765657] ni_usb_hs_wait_for_ready: board serial number is 0x1e37dbc
      [ 57.767188] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x12, expected 0x2, 0xe or 0xf
      [ 57.767191] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[9]=0x2, expected 0x0, 0x3 or 0x30
      [ 57.767192] ni_usb_dump_raw_block:

      [ 57.767194] 40
      [ 57.767194] 1
      [ 57.767195] 0
      [ 57.767195] 1
      [ 57.767195] 30
      [ 57.767196] 1
      [ 57.767196] 12
      [ 57.767197] 5

      [ 57.767198] 0
      [ 57.767198] 2
      [ 57.767198] 0

      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.

      $ 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]: 1
      trying to open pad = 1 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 = 0x8100 < ERR CMPL >
      iberr= 0
      EDVR 0: OS error

      ibcntl = 6
      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)
      q

      [support-requests:#29] linux-gpib ubuntu 20.0 LTS

      Status: open
      Group: v1.0 (example)
      Labels: linux-gpib
      Created: Mon Sep 07, 2020 11:50 AM UTC by Abraham St
      Last Updated: Wed Sep 09, 2020 09:35 PM UTC
      Owner: nobody

      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) /


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/linux-gpib/support-requests/29/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #29

  • Giorgio Pintaudi

    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:

    Sep  7 10:50:02 zion kernel: [ 7337.849701] usb 1-3.1.1: new high-speed USB device number 11 using xhci_hcd
    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
    Sep  7 10:50:03 zion kernel: [ 7338.078174] usb 1-3.1.1: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
    Sep  7 10:50:03 zion kernel: [ 7338.078187] usb 1-3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Sep  7 10:50:03 zion kernel: [ 7338.078194] usb 1-3.1.1: Product: GPIB-USB-HS
    Sep  7 10:50:03 zion kernel: [ 7338.078198] usb 1-3.1.1: Manufacturer: National Instruments
    Sep  7 10:50:03 zion kernel: [ 7338.078203] usb 1-3.1.1: SerialNumber: 01E37DBC
    Sep  7 10:50:03 zion mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1"
    Sep  7 10:50:03 zion mtp-probe: bus: 1, device: 11 was not an MTP device
    Sep  7 10:50:03 zion kernel: [ 7338.738238] Linux-GPIB 4.3.4 Driver
    Sep  7 10:50:03 zion kernel: [ 7338.741228] ni_usb_gpib driver loading
    Sep  7 10:50:03 zion kernel: [ 7338.741272] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-3.1.1
    Sep  7 10:50:03 zion kernel: [ 7338.741432] usbcore: registered new interface driver ni_usb_gpib
    Sep  7 10:50:03 zion kernel: [ 7338.741437] gpib: registered ni_usb_b interface
    Sep  7 10:50:03 zion mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1"
    Sep  7 10:50:03 zion mtp-probe: bus: 1, device: 11 was not an MTP device
    Sep  7 10:50:03 zion Thunar[16280]: thunar-volman: Unsupported USB device type "usb".
    Sep  7 10:50:03 zion /usr/local/lib/udev/gpib_udev_config: entered for Product: 3923/709b/101 Devpath: /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1/1-3.1.1:1.0 Serial: 01E37DBC
    Sep  7 10:50:03 zion /usr/local/lib/udev/gpib_udev_config: gpib_config options: --board-type ni_usb_b
    Sep  7 10:50:03 zion kernel: [ 7338.897811] ni_usb_gpib: attach
    Sep  7 10:50:03 zion kernel: [ 7338.897816] usb 1-3.1.1: bus 1 dev num 11 attached to gpib minor 0, NI usb interface 0
    Sep  7 10:50:03 zion kernel: [ 7338.900648]     product id=0x709b
    Sep  7 10:50:03 zion kernel: [ 7338.900757] ni_usb_hs_wait_for_ready: board serial number is 0x1e37dbc
    Sep  7 10:50:03 zion upowerd[2987]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1/1-3.1.1:1.0
    Sep  7 10:50:03 zion kernel: [ 7338.902260] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x12, expected 0x2, 0xe or 0xf
    Sep  7 10:50:03 zion kernel: [ 7338.902263] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[9]=0x2, expected 0x0, 0x3 or 0x30
    Sep  7 10:50:03 zion kernel: [ 7338.902265] ni_usb_dump_raw_block:
    Sep  7 10:50:03 zion kernel: [ 7338.902266] 
    Sep  7 10:50:03 zion kernel: [ 7338.902267]  40
    Sep  7 10:50:03 zion kernel: [ 7338.902268]   1
    Sep  7 10:50:03 zion kernel: [ 7338.902268]   0
    Sep  7 10:50:03 zion kernel: [ 7338.902269]   1
    Sep  7 10:50:03 zion kernel: [ 7338.902270]  30
    Sep  7 10:50:03 zion kernel: [ 7338.902270]   1
    Sep  7 10:50:03 zion kernel: [ 7338.902271]  12
    Sep  7 10:50:03 zion kernel: [ 7338.902272]   5
    Sep  7 10:50:03 zion kernel: [ 7338.902272] 
    Sep  7 10:50:03 zion kernel: [ 7338.902273]   0
    Sep  7 10:50:03 zion kernel: [ 7338.902274]   2
    Sep  7 10:50:03 zion kernel: [ 7338.902274]   0
    
     
    • DaveP

      DaveP - 2021-09-07

      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:

      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:

      Sep 7 10:50:02 zion kernel: [ 7337.849701] usb 1-3.1.1: new high-speed USB device number 11 using xhci_hcd
      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
      Sep 7 10:50:03 zion kernel: [ 7338.078174] usb 1-3.1.1: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
      Sep 7 10:50:03 zion kernel: [ 7338.078187] usb 1-3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      Sep 7 10:50:03 zion kernel: [ 7338.078194] usb 1-3.1.1: Product: GPIB-USB-HS
      Sep 7 10:50:03 zion kernel: [ 7338.078198] usb 1-3.1.1: Manufacturer: National Instruments
      Sep 7 10:50:03 zion kernel: [ 7338.078203] usb 1-3.1.1: SerialNumber: 01E37DBC
      Sep 7 10:50:03 zion mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1"
      Sep 7 10:50:03 zion mtp-probe: bus: 1, device: 11 was not an MTP device
      Sep 7 10:50:03 zion kernel: [ 7338.738238] Linux-GPIB 4.3.4 Driver
      Sep 7 10:50:03 zion kernel: [ 7338.741228] ni_usb_gpib driver loading
      Sep 7 10:50:03 zion kernel: [ 7338.741272] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-3.1.1
      Sep 7 10:50:03 zion kernel: [ 7338.741432] usbcore: registered new interface driver ni_usb_gpib
      Sep 7 10:50:03 zion kernel: [ 7338.741437] gpib: registered ni_usb_b interface
      Sep 7 10:50:03 zion mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1"
      Sep 7 10:50:03 zion mtp-probe: bus: 1, device: 11 was not an MTP device
      Sep 7 10:50:03 zion Thunar[16280]: thunar-volman: Unsupported USB device type "usb".
      Sep 7 10:50:03 zion /usr/local/lib/udev/gpib_udev_config: entered for Product: 3923/709b/101 Devpath: /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1/1-3.1.1:1.0 Serial: 01E37DBC
      Sep 7 10:50:03 zion /usr/local/lib/udev/gpib_udev_config: gpib_config options: --board-type ni_usb_b
      Sep 7 10:50:03 zion kernel: [ 7338.897811] ni_usb_gpib: attach
      Sep 7 10:50:03 zion kernel: [ 7338.897816] usb 1-3.1.1: bus 1 dev num 11 attached to gpib minor 0, NI usb interface 0
      Sep 7 10:50:03 zion kernel: [ 7338.900648] product id=0x709b
      Sep 7 10:50:03 zion kernel: [ 7338.900757] ni_usb_hs_wait_for_ready: board serial number is 0x1e37dbc
      Sep 7 10:50:03 zion upowerd[2987]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1.1/1-3.1.1:1.0
      Sep 7 10:50:03 zion kernel: [ 7338.902260] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x12, expected 0x2, 0xe or 0xf
      Sep 7 10:50:03 zion kernel: [ 7338.902263] /home/neo/Downloads/linux-gpib-4.3.4/linux-gpib-kernel-4.3.4/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[9]=0x2, expected 0x0, 0x3 or 0x30
      Sep 7 10:50:03 zion kernel: [ 7338.902265] ni_usb_dump_raw_block:
      Sep 7 10:50:03 zion kernel: [ 7338.902266]
      Sep 7 10:50:03 zion kernel: [ 7338.902267] 40
      Sep 7 10:50:03 zion kernel: [ 7338.902268] 1
      Sep 7 10:50:03 zion kernel: [ 7338.902268] 0
      Sep 7 10:50:03 zion kernel: [ 7338.902269] 1
      Sep 7 10:50:03 zion kernel: [ 7338.902270] 30
      Sep 7 10:50:03 zion kernel: [ 7338.902270] 1
      Sep 7 10:50:03 zion kernel: [ 7338.902271] 12
      Sep 7 10:50:03 zion kernel: [ 7338.902272] 5
      Sep 7 10:50:03 zion kernel: [ 7338.902272]
      Sep 7 10:50:03 zion kernel: [ 7338.902273] 0
      Sep 7 10:50:03 zion kernel: [ 7338.902274] 2
      Sep 7 10:50:03 zion kernel: [ 7338.902274] 0


      [support-requests:#29] linux-gpib ubuntu 20.0 LTS

      Status: open
      Group: v1.0 (example)
      Labels: linux-gpib
      Created: Mon Sep 07, 2020 11:50 AM UTC by Abraham St
      Last Updated: Mon Sep 06, 2021 05:30 AM UTC
      Owner: nobody

      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) /


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/linux-gpib/support-requests/29/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #29

  • Giorgio Pintaudi

    Here you are:

    $ sudo lsusb -v -d 3923:
    
    Bus 001 Device 018: ID 3923:709b National Instruments Corp. GPIB-USB-HS
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      idVendor           0x3923 National Instruments Corp.
      idProduct          0x709b GPIB-USB-HS
      bcdDevice            1.01
      iManufacturer           1 National Instruments
      iProduct                2 GPIB-USB-HS
      iSerial                 3 01E37DBC
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0035
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0 
        bmAttributes         0x80
          (Bus Powered)
        MaxPower              500mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           5
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      0 
          bInterfaceProtocol      0 
          iInterface              0 
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x02  EP 2 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x06  EP 6 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0010  1x 16 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x88  EP 8 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0 
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      bNumConfigurations      1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0000
      (Bus Powered)
    
     
  • Frank Mori Hess

    Frank Mori Hess - 2021-09-07

    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.

     
  • Frank Mori Hess

    Frank Mori Hess - 2021-09-07

    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.

     
  • Giorgio Pintaudi

    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.

     
  • Giorgio Pintaudi

    The only other GPIB option that I can set on the instrument is Bus connection that takes values of Talk-Listen and Off-Bus. Which one should I set?

     
    • Frank Mori Hess

      Frank Mori Hess - 2021-09-08

      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.

       
  • Giorgio Pintaudi

    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?

     
  • Frank Mori Hess

    Frank Mori Hess - 2021-09-08

    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.

     
  • Giorgio Pintaudi

    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?

    $ sudo ibtest
    Do you wish to open a (d)evice or an interface (b)oard?
        (you probably want to open a device): b
    enter name of interface board (or device) you wish to open: NI_USB_HS
    trying to open board named 'NI_USB_HS'
    
    : l
    DAV off
    NDAC on
    NRFD off
    IFC off
    REN on
    SRQ off
    ATN on
    EOI off
    gpib status is: 
    ibsta = 0x170  < CMPL REM CIC ATN >
    iberr= 0
    
    ibcntl = 0
    
    : c
    enter command bytes to send to the bus: 0x40 0x3f 0x21
    writing 3 command bytes to the bus
    gpib status is: 
    ibsta = 0x178  < CMPL REM CIC ATN TACS >
    iberr= 0
    
    ibcntl = 0
    
    : w
    enter a string to send to your device: *IDN?
    sending string: *IDN?
    
    gpib status is: 
    ibsta = 0x8120  < ERR CMPL CIC >
    iberr= 0
    EDVR 0: OS error
    
    ibcntl = 6
    
    : c
    enter command bytes to send to the bus: 0x41 0x3f 0x20
    writing 3 command bytes to the bus
    gpib status is: 
    ibsta = 0x164  < CMPL REM CIC LACS >
    iberr= 0
    
    ibcntl = 0
    
    : r
    enter maximum number of bytes to read [1024]: 
    trying to read 1024 bytes from device...
    received string: ''
    Number of bytes read: 0
    gpib status is: 
    ibsta = 0xc120  < ERR TIMO CMPL CIC >
    iberr= 6
    EABO 6: Operation aborted
    
    ibcntl = 0
    
    : q
    
     

    Last edit: Giorgio Pintaudi 2021-09-08
  • Frank Mori Hess

    Frank Mori Hess - 2021-09-09

    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.

     
  • Giorgio Pintaudi

    Here you are:

    $ sudo ibtest
    Do you wish to open a (d)evice or an interface (b)oard?
        (you probably want to open a device): b
    enter name of interface board (or device) you wish to open: NI_USB_HS
    trying to open board named 'NI_USB_HS'
    
    : l
    DAV off
    NDAC on
    NRFD off
    IFC off
    REN on
    SRQ off
    ATN on
    EOI off
    gpib status is: 
    ibsta = 0x170  < CMPL REM CIC ATN >
    iberr= 0
    
    ibcntl = 0
    
    : c
    enter command bytes to send to the bus: 0x40 0x3f 0x21
    writing 3 command bytes to the bus
    gpib status is: 
    ibsta = 0x178  < CMPL REM CIC ATN TACS >
    iberr= 0
    
    ibcntl = 0
    
    : l
    DAV off
    NDAC on
    NRFD off
    IFC off
    REN on
    SRQ off
    ATN on
    EOI off
    gpib status is: 
    ibsta = 0x178  < CMPL REM CIC ATN TACS >
    iberr= 0
    
    ibcntl = 0
    
    : g
    ATN released.
    gpib status is: 
    ibsta = 0x120  < CMPL CIC >
    iberr= 0
    
    ibcntl = 0
    
    : l
    DAV off
    NDAC on
    NRFD off
    IFC off
    REN on
    SRQ off
    ATN off
    EOI off
    gpib status is: 
    ibsta = 0x120  < CMPL CIC >
    iberr= 0
    
    ibcntl = 0
    
    : c
    enter command bytes to send to the bus: 0x40 0x3f 0x21
    writing 3 command bytes to the bus
    gpib status is: 
    ibsta = 0x168  < CMPL REM CIC TACS >
    iberr= 0
    
    ibcntl = 0
    
    : w
    enter a string to send to your device: *IDN?
    sending string: *IDN?
    
    gpib status is: 
    ibsta = 0x8120  < ERR CMPL CIC >
    iberr= 0
    EDVR 0: OS error
    
    ibcntl = 6
    
    : l
    DAV off
    NDAC on
    NRFD off
    IFC off
    REN on
    SRQ off
    ATN off
    EOI off
    gpib status is: 
    ibsta = 0x120  < CMPL CIC >
    iberr= 0
    
    ibcntl = 0
    
    : c
    enter command bytes to send to the bus: 0x41 0x3f 0x20
    writing 3 command bytes to the bus
    gpib status is: 
    ibsta = 0x164  < CMPL REM CIC LACS >
    iberr= 0
    
    ibcntl = 0
    
    : l
    DAV off
    NDAC on
    NRFD off
    IFC off
    REN on
    SRQ off
    ATN on
    EOI off
    gpib status is: 
    ibsta = 0x164  < CMPL REM CIC LACS >
    iberr= 0
    
    ibcntl = 0
    
    : r
    enter maximum number of bytes to read [1024]: 
    trying to read 1024 bytes from device...
    received string: ''
    Number of bytes read: 0
    gpib status is: 
    ibsta = 0xc120  < ERR TIMO CMPL CIC >
    iberr= 6
    EABO 6: Operation aborted
    
    ibcntl = 0
    
    : l
    gpib status is: 
    ibsta = 0x8120  < ERR CMPL CIC >
    iberr= 0
    EDVR 0: OS error
    
    ibcntl = 110
    
    : l
    DAV off
    NDAC off
    NRFD off
    IFC off
    REN off
    SRQ off
    ATN off
    EOI off
    gpib status is: 
    ibsta = 0x120  < CMPL CIC >
    iberr= 0
    
    ibcntl = 0
    
    : q
    
     

    Last edit: Giorgio Pintaudi 2021-09-09
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.