Menu

#82 Errors with NI USB driver

v1.0 (example)
closed
DaveP
None
5
2023-07-19
2023-02-06
No

I am getting errors when using the NI_USB_HS device that I do not get when using the Agilent 82357b USB device & driver.

Attached is a simple program to query and read a GPIB device for the ID string 100 times.

This program runs without failure every time using the Agilent 82357b device, however; using the NI USB-HS device I frequently (say one in 30 times) get failures with the log showing kernel errors:

Feb 06 12:14:37 dirac kernel: usb 1-1.1: USB disconnect, device number 30
Feb 06 12:14:39 dirac kernel: usb 1-1.1: new high-speed USB device number 31 using xhci_hcd
Feb 06 12:14:39 dirac kernel: usb 1-1.1: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
Feb 06 12:14:39 dirac kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 06 12:14:39 dirac kernel: usb 1-1.1: Product: GPIB-USB-HS
Feb 06 12:14:39 dirac kernel: usb 1-1.1: Manufacturer: National Instruments
Feb 06 12:14:39 dirac kernel: usb 1-1.1: SerialNumber: 0159084A
Feb 06 12:14:39 dirac kernel: ni_usb_gpib: probe succeeded for path: usb-0000:01:00.0-1.1
Feb 06 12:14:39 dirac kernel: gpib1: exiting autospoll thread
Feb 06 12:14:39 dirac kernel: ni_usb_gpib: attach
Feb 06 12:14:39 dirac kernel: usb 1-1.1: bus 1 dev num 31 attached to gpib minor 1, NI usb interface 0
Feb 06 12:14:39 dirac kernel:         product id=0x709b
Feb 06 12:14:39 dirac kernel: ni_usb_hs_wait_for_ready: board serial number is 0x159084a
Feb 06 12:14:51 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20221109svn2046.fc37/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: parse error: wrong start id
Feb 06 12:14:51 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20221109svn2046.fc37/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: parse error: wrong end id
Feb 06 12:14:51 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20221109svn2046.fc37/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: parse error: wrong count=0 for NIUSB_REGISTER_READ_DATA_END
Feb 06 12:14:51 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20221109svn2046.fc37/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: unexpected data: raw_data[6]=0xff, expected 0
Feb 06 12:14:51 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20221109svn2046.fc37/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: unexpected data: raw_data[7]=0xff, expected 0
Feb 06 12:14:51 dirac kernel: ni_usb_dump_raw_block:
Feb 06 12:14:51 dirac kernel: 
Feb 06 12:14:51 dirac kernel:   1
Feb 06 12:14:51 dirac kernel:   0
Feb 06 12:14:51 dirac kernel:  78
Feb 06 12:14:51 dirac kernel:   0
Feb 06 12:14:51 dirac kernel:   0
Feb 06 12:14:51 dirac kernel:   0
Feb 06 12:14:51 dirac kernel:  ff
Feb 06 12:14:51 dirac kernel:  ff
Feb 06 12:14:51 dirac kernel: 

I presume it might be a hardware fault (I have only one NI device to test) but it may also be a driver bug. This is using the SVN 2046 pull (very recent).

1 Attachments

Discussion

1 2 > >> (Page 1 of 2)
  • Michael Katzmann

    Although I believed this to be a genuine NI device, (and internally and externally appeared to be so), the NI Windows utility indicates that it is not.
    This might explain the problems.

     
  • Michael Katzmann

    I've got another NI device and this time the NI Windows driver does not cast doubt on its authenticity. I'm certain that this is genuine; however, this device also exhibits this problem.
    It does appear that there is some problem in the driver for the GPIB-USB-HS.

     
  • DaveP

    DaveP - 2023-04-15

    Hi,
    Please send the output of "lsusb -d 3923:", with the adapter plugged in.
    cheers,
    -Dave

     
  • Michael Katzmann

    Here you go...

    [michael@dirac ~]$ sudo lsusb -v -d 3923:
    
    Bus 001 Device 017: 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 016AC4CD
      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     0x06  EP 6 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               2
          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               2
          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               2
          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               2
          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               4
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0 
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      bNumConfigurations      1
    Device Status:     0x0000
      (Bus Powered)
    [michael@dirac ~]$ 
    
     
  • DaveP

    DaveP - 2023-04-15

    OK this looks like a "new" version of the adaptor AFAICT.
    In the lsusb you sent the four bulk endpoints have a maxPacketSize of 512 which indicates a USB high speed device.
    Previous adaptors show a maxPacketSize of 64 for the bulk endpoints which is what the driver uses.
    Furthermore the previous adaptors have a bInterval of 0 for the bulk endpoints (which is normal) and a bInterval of 2 for the interrupt endpoint. This "new" device has a bInterval of 2 for the bulk endpoints (which is weird and in anycase ignored) and a bInterval of 4 for the interrupt endpoint.
    Is there any way of knowing whether this is a genuine new version of the NI_USB_HS adaptor ?
    In both cases the lsusb's shows bcdDevice = 1.01, so one can't tell. Judging from the NI website there does not seem to ever have been be a "new" version.
    cheers,
    -Dave

     
  • Michael Katzmann

    I have very high confidence that this is genuine.
    As I said, the NI Windows driver does not complain or identify this as suspect. The guy I bought this from says that he purchased it directly from NI.

    I looked again at the test program I attached above and noticed that it still had the mitigation I had used to get around bug #81. With that bug now fixed I removed those delays and the problem got much worse.

    So the addition of delays just before the async read and async writes helps mitigate the problem.
    Its possible that this problem is related to USB comms between the system and the controller and the delays just gives the USB device enough time to process the command.

    I modified the test program to have a switch -D to set the delay (default no delay).
    e.g:
    $ ./GPIBtest -c 0 -d 16 --EOI -D 50
    The problem cannot be seen if the delay is set to 50ms (for each read and write) but if set to zero then it will fail after about 50 write IDN / read commands. (this on the Raspberri Pi ... its somewhat less frequent on a faster laptop I tried).

     

    Last edit: Michael Katzmann 2023-04-15
  • Michael Katzmann

    OK... yet more testing.
    I replaced the asyncronous calls to ibrda and ibwrta with the synchronous calls ibrd and ibwrt and it works without problems (I tried 10000 IDN? writes/reads).
    If either ibrda or ibwrta are used, the driver will fail after some period.
    This problem is only with the NI USB driver. The same high level C code (using async calls) works flawlessly with the Keysight 82357B.
    The NI USB driver seems to have an issue with asynchronous operation (or with the way I'm using it).

    (attached updated code with -y switch to use synchronous calls (default is async)
    Michael

     

    Last edit: Michael Katzmann 2023-04-16
  • DaveP

    DaveP - 2023-04-16

    Thanks, this does look like a driver problem. Please rebuild the kernel part with GPIB_DEBUG=1, install and run the async test with no delay and send the corresponding syslog output.
    -dave

     
  • Michael Katzmann

    Here are three runs. With the debugging enabled, it failed on the first call (without any delay).
    I did one run with a 1ms delay to get some sucessfull calls before a failure.

    Run without delay ... (5)

    [michael@dirac ~]$ ./GPIBtest2 -c 1 -d 16 --EOI
       GPIB controller ID: 1
           GPIB device ID: 16
             EOI asserted: Yes
            EOS character: No
    Contact with GPIB device established
    InternalReceiveSetup: command failed
    GPIB async read failed (0x0001)
       1 / 500  : 
    [michael@dirac ~]$ 
    

    Run with 1ms delay (25 sucessfull calls before failure)

    [michael@dirac ~]$ ./GPIBtest2 -c 1 -d 16 -D 1 --EOI
       GPIB controller ID: 1
           GPIB device ID: 16
             EOI asserted: Yes
            EOS character: No
    Contact with GPIB device established
       1 / 500  : IDN returns "HEWLETT PACKARD,8753C,0,4.13
    "
       2 / 500  : IDN returns "HEWLETT PACKARD,8753C,0,4.13
    "
    .....etc ....
    
      25 / 500  : IDN returns "HEWLETT PACKARD,8753C,0,4.13
    "
    InternalReceiveSetup: command failed
    GPIB async read failed (0x0001)
      26 / 500  :
    [michael@dirac ~]$
    
     

    Last edit: Michael Katzmann 2023-04-16
  • DaveP

    DaveP - 2023-04-16

    Thanks, it looks like we have two problems here:
    First that the initialization sequence is not one known to the driver. This does not prevent it from working. If the adaptor is indeed genuine then we can just add the new sequence response to the driver:

    Apr 16 09:54:59 dirac kernel: ni_usb_hs_wait_for_ready: board serial number is 0x16ac4cd
    Apr 16 09:55:00 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x16, expected 0x2, 0xe or 0xf
    Apr 16 09:55:00 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[7]=0x8, expected 0x3 or 0x5 or 0x6
    Apr 16 09:55:00 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[10]=0x6e, expected 0x96 or 0x07
    

    The second problem concerns the failures when using the async calls. These manifest when we get errors on the ni_usb_parse_register_read_block for example:

    Apr 16 10:07:55 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: parse error: wrong start id
    Apr 16 10:07:55 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: parse error: wrong end id
    Apr 16 10:07:55 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: parse error: wrong count=0 for NIUSB_REGISTER_READ_DATA_END
    Apr 16 10:07:55 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: unexpected data: raw_data[6]=0xff, expected 0
    Apr 16 10:07:55 dirac kernel: /var/lib/dkms/linux-gpib/4.3.5-9.20230407svn2050.fc38/build/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_parse_register_read_block: unexpected data: raw_data[7]=0xff, expected 0
    

    Their occurrence is not always fatal but they do precede the timeout error. It would be interesting to ascertain whether they also occur when using only synchronous calls.
    We no longer need the GPIB_DEBUG=1 make option.
    cheers,
    -dave

     
  • Carey McKee

    Carey McKee - 2023-04-22

    I also have an NI-USB-HS adapter that works on Windows with the official
    NI driver but not on Linux with this driver. The problem is not fixed
    in revision 2050.

    This is the log.

    [ 1750.766917] Linux-GPIB 4.3.5 Driver
    [ 1750.768995] ni_usb_gpib driver loading
    [ 1750.769023] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-4
    [ 1750.769078] usbcore: registered new interface driver ni_usb_gpib
    [ 1750.769080] gpib: registered ni_usb_b interface
    [ 1750.851532] gpib debug: pid 8273, gpib: opening minor 0
    [ 1750.853542] gpib debug: pid 8273, gpib: request module returned 256
    [ 1750.853549] gpib debug: pid 8273, minor 0, ioctl 39, interface=, use=0, onl=0
    [ 1750.853552] gpib debug: pid 8273, minor 0, ioctl 24, interface=, use=0, onl=0
    [ 1750.853554] gpib debug: pid 8273, minor 0, ioctl 21, interface=ni_usb_b, use=1, onl=0
    [ 1750.853556] gpib debug: pid 8273, minor 0, ioctl 22, interface=ni_usb_b, use=1, onl=0
    [ 1750.853557] gpib debug: pid 8273, minor 0, ioctl 23, interface=ni_usb_b, use=1, onl=0
    [ 1750.853557] gpib debug: pid 8273, minor 0, ioctl 15, interface=ni_usb_b, use=1, onl=0
    [ 1750.853558] gpib debug: set primary addr to 0
    [ 1750.853559] gpib debug: pid 8273, minor 0, ioctl 16, interface=ni_usb_b, use=1, onl=0
    [ 1750.853560] gpib debug: set secondary addr to -96
    [ 1750.853560] gpib debug: pid 8273, minor 0, ioctl 32, interface=ni_usb_b, use=1, onl=0
    [ 1750.853562] gpib debug: pid 8273, minor 0, ioctl 43, interface=ni_usb_b, use=1, onl=0
    [ 1750.853568] gpib debug: pid 8273, minor 0, ioctl 39, interface=ni_usb_b, use=1, onl=0
    [ 1750.853570] ni_usb_gpib: attach
    [ 1750.853573] usb 3-4: bus 3 dev num 3 attached to gpib minor 0, NI usb interface 0
    [ 1750.856998]  product id=0x709b
    [ 1750.857097] ni_usb_hs_wait_for_ready: board serial number is 0x1d6a085
    [ 1750.858575] .../ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x16, expected 0x2, 0xe or 0xf
    [ 1750.858577] .../ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[7]=0x8, expected 0x3 or 0x5 or 0x6
    [ 1750.858577] .../ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[10]=0x6e, expected 0x96 or 0x07
    [ 1750.858578] ni_usb_dump_raw_block:
    
    [ 1750.858579]  40
    [ 1750.858579]   1
    [ 1750.858580]   0
    [ 1750.858580]   1
    [ 1750.858580]  30
    [ 1750.858581]   1
    [ 1750.858581]  16
    [ 1750.858581]   8
    
    [ 1750.858582]   0
    [ 1750.858582]   0
    [ 1750.858582]  6e
    
    [ 1750.858583] gpib debug: .../ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready exit retval=0
    [ 1750.858933] gpib debug: ni_usb_soft_update_status: need_monitoring_bits=0x10ff
    [ 1750.859074] gpib debug: ni_usb_soft_update_status: ni_usb_ibsta=0x0
    [ 1750.859230] gpib debug: gpib: board online
    [ 1750.859231] gpib debug: entering autospoll thread
    [ 1750.859350] gpib debug: pid 8273, gpib: opening minor 0
    [ 1750.859352] gpib debug: pid 8273, minor 0, ioctl 26, interface=ni_usb_b, use=2, onl=1
    [ 1750.859354] gpib debug: pid 8273, locked board 0 mutex
    [ 1750.859354] gpib debug: pid 8273, minor 0, ioctl 34, interface=ni_usb_b, use=2, onl=1
    [ 1750.859410] gpib debug: ni_usb_soft_update_status: need_monitoring_bits=0x0
    [ 1750.859411] gpib debug: ni_usb_soft_update_status: ni_usb_ibsta=0x0
    [ 1750.859412] gpib debug: pid 8273, minor 0, ioctl 5, interface=ni_usb_b, use=2, onl=1
    [ 1750.859534] gpib debug: ni_usb_soft_update_status: need_monitoring_bits=0x0
    [ 1750.859535] gpib debug: ni_usb_soft_update_status: ni_usb_ibsta=0x0
    [ 1750.859616] gpib debug: pid 8273, minor 0, ioctl 26, interface=ni_usb_b, use=2, onl=1
    [ 1750.859617] gpib debug: pid 8273, unlocked board 0 mutex
    [ 1750.859619] gpib debug: pid 8273, minor 0, ioctl 26, interface=ni_usb_b, use=2, onl=1
    [ 1750.859620] gpib debug: pid 8273, locked board 0 mutex
    [ 1750.859620] gpib debug: pid 8273, minor 0, ioctl 29, interface=ni_usb_b, use=2, onl=1
    [ 1750.859621] gpib debug: pid 8273, minor 0, ioctl 9, interface=ni_usb_b, use=2, onl=1
    [ 1750.859622] gpib debug: sending interface clear
    [ 1750.859805] gpib debug: ni_usb_soft_update_status: need_monitoring_bits=0x30
    [ 1750.859807] gpib debug: ni_usb_soft_update_status: ni_usb_ibsta=0x30
    [ 1750.859909] gpib debug: pid 8273, minor 0, ioctl 5, interface=ni_usb_b, use=2, onl=1
    [ 1750.860034] gpib debug: ni_usb_soft_update_status: need_monitoring_bits=0x30
    [ 1750.860035] gpib debug: ni_usb_soft_update_status: ni_usb_ibsta=0x30
    [ 1750.860117] gpib debug: pid 8273, minor 0, ioctl 26, interface=ni_usb_b, use=2, onl=1
    [ 1750.860119] gpib debug: pid 8273, unlocked board 0 mutex
    [ 1750.860120] gpib debug: pid 8273, minor 0, ioctl 26, interface=ni_usb_b, use=2, onl=1
    [ 1750.860120] gpib debug: pid 8273, locked board 0 mutex
    [ 1750.860121] gpib debug: pid 8273, minor 0, ioctl 29, interface=ni_usb_b, use=2, onl=1
    [ 1750.860121] gpib debug: pid 8273, minor 0, ioctl 10, interface=ni_usb_b, use=2, onl=1
    [ 1750.860199] gpib debug: ni_usb_soft_update_status: need_monitoring_bits=0x70
    [ 1750.860201] gpib debug: ni_usb_soft_update_status: ni_usb_ibsta=0x70
    [ 1750.860203] gpib debug: pid 8273, minor 0, ioctl 5, interface=ni_usb_b, use=2, onl=1
    [ 1750.860327] gpib debug: ni_usb_soft_update_status: need_monitoring_bits=0x70
    [ 1750.860328] gpib debug: ni_usb_soft_update_status: ni_usb_ibsta=0x70
    [ 1750.860409] gpib debug: pid 8273, minor 0, ioctl 26, interface=ni_usb_b, use=2, onl=1
    [ 1750.860410] gpib debug: pid 8273, unlocked board 0 mutex
    [ 1750.860417] gpib debug: pid 8273, gpib: closing minor 0
    [ 1750.860481] gpib debug: pid 8273, gpib: closing minor 0
    

    lsusb

    Bus 003 Device 003: ID 3923:709b National Instruments Corp. GPIB-USB-HS
    
     
  • DaveP

    DaveP - 2023-04-23

    This looks like the same clone as evidenced by unexpected data: buffer[6]=0x16, etc in the log. Please send the output of 'lsusb -v -d 3923:' to check. Otherwise this board does seem to work OK with rev 2050 . What is not working for you ?

     
  • Carey McKee

    Carey McKee - 2023-04-24

    The is the output of lsusb.

    Bus 003 Device 014: 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 01D6A085
      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
    

    When I run lsusb -v -d 3923: as root, it produces the above output,
    hangs for about 15 seconds, and gives this error. The exit status is 0.

    cannot read device status, Resource temporarily unavailable (11)
    

    Running it without the -v flag doesn't cause the problem.

    What is not working for you?

    I can't even run 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]: 2
    trying to open pad = 2 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
    [1]    97709 IOT instruction  sudo ibtest
    
     
  • DaveP

    DaveP - 2023-04-25

    This looks like a third variant in the clones we have seen so far based on the lsusb/dmesg reports. The first clone reported in this thread does not work with linux-gpib. This is because it only supports device mode operation where addressing and data are sent together in one usb request. linux-gpib uses board mode where addressing and data are sent separately. This being a fundamental part of the linux-gpib architecture that clone cannot be supported.

    The second variant reported at the top of this bug report does seem to work despite the errored response to the ready request. Your board - the third variant has the same errors in the ready-request response but a different lsusb output. It has however the same lsusb output as the first variant.

    I presume that your gpib.conf has master=yes set for the board.

    Please send the syslog output corresponding to the failed ibtest session.

     
  • Carey McKee

    Carey McKee - 2023-04-25

    This is my gpib.conf.

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

    This is the output of journalctl when I ran ibtest. I ran it at 20:40:43 and 20:40:49.

    Apr 25 20:40:34 kernel: usb 3-4: new high-speed USB device number 19 using xhci_hcd
    Apr 25 20:40:34 kernel: usb 3-4: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7
    Apr 25 20:40:34 kernel: usb 3-4: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
    Apr 25 20:40:34 kernel: usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Apr 25 20:40:34 kernel: usb 3-4: Product: GPIB-USB-HS
    Apr 25 20:40:34 kernel: usb 3-4: Manufacturer: National Instruments
    Apr 25 20:40:34 kernel: usb 3-4: SerialNumber: 01D6A085
    Apr 25 20:40:34 kernel: ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-4
    Apr 25 20:40:34 mtp-probe[33371]: checking bus 3, device 19: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4"
    Apr 25 20:40:34 mtp-probe[33371]: bus: 3, device: 19 was not an MTP device
    Apr 25 20:40:34 /usr/local/lib/udev/gpib_udev_config[33384]: entered for Product: 3923/709b/101 Devpath: /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0 Serial: 01D6A085
    Apr 25 20:40:34 /usr/local/lib/udev/gpib_udev_config[33385]: gpib_config options: --board-type ni_usb_b
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, gpib: opening minor 0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, gpib: request module returned 256
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 39, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 24, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 21, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 22, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 23, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 15, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: set primary addr to 0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 16, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: set secondary addr to -96
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 32, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 43, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: gpib debug: pid 33386, minor 0, ioctl 39, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:34 kernel: ni_usb_gpib: attach
    Apr 25 20:40:34 kernel: usb 3-4: bus 3 dev num 19 attached to gpib minor 0, NI usb interface 0
    Apr 25 20:40:34 kernel:         product id=0x709b
    Apr 25 20:40:34 kernel: ni_usb_hs_wait_for_ready: board serial number is 0x1d6a085
    Apr 25 20:40:34 kernel: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x16, expected 0x2, 0xe or 0xf
    Apr 25 20:40:34 kernel: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[7]=0x8, expected 0x3 or 0x5 or 0x6
    Apr 25 20:40:34 kernel: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[10]=0x6e, expected 0x96 or 0x07
    Apr 25 20:40:34 kernel: ni_usb_dump_raw_block:
    Apr 25 20:40:34 kernel:
    Apr 25 20:40:34 kernel:  40
    Apr 25 20:40:34 kernel:   1
    Apr 25 20:40:34 kernel:   0
    Apr 25 20:40:34 kernel:   1
    Apr 25 20:40:34 kernel:  30
    Apr 25 20:40:34 kernel:   1
    Apr 25 20:40:34 kernel:  16
    Apr 25 20:40:34 kernel:   8
    Apr 25 20:40:34 kernel:
    Apr 25 20:40:34 kernel:   0
    Apr 25 20:40:34 kernel:   0
    Apr 25 20:40:34 kernel:  6e
    Apr 25 20:40:34 kernel:
    Apr 25 20:40:34 kernel: gpib debug: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready exit retval=0
    Apr 25 20:40:35 kernel: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: usb_control_msg returned -110
    Apr 25 20:40:36 kernel: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: usb_control_msg returned -110
    Apr 25 20:40:37 kernel: ni_usb_nonblocking_receive_bulk_msg: killed urb due to timeout
    Apr 25 20:40:37 kernel: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_write_registers: ni_usb_receive_bulk_msg returned -110, bytes_read=0
    Apr 25 20:40:37 kernel: ni_usb_dump_raw_block:
    Apr 25 20:40:37 kernel:
    Apr 25 20:40:37 kernel: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_shutdown_hardware: register write failed, retval=-110
    Apr 25 20:40:37 kernel: gpib: interface attach failed
    Apr 25 20:40:37 kernel: gpib debug: pid 33386, gpib: closing minor 0
    Apr 25 20:40:37 (udev-worker)[33370]: 3-4:1.0: Process '/usr/local/lib/udev/gpib_udev_config' failed with exit code 255.
    Apr 25 20:40:37 mtp-probe[33388]: checking bus 3, device 19: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4"
    Apr 25 20:40:37 mtp-probe[33388]: bus: 3, device: 19 was not an MTP device
    Apr 25 20:40:43 audit[33392]: USER_ACCT pid=33392 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="user" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:43 audit[33392]: USER_CMD pid=33392 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/user" cmd="ibtest" exe="/usr/bin/sudo" terminal=pts/4 res=success'
    Apr 25 20:40:43 sudo[33392]:     user : TTY=pts/4 ; PWD=/home/user ; USER=root ; COMMAND=/usr/local/bin/ibtest
    Apr 25 20:40:43 audit[33392]: CRED_REFR pid=33392 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:43 sudo[33392]: pam_unix(sudo:session): session opened for user root(uid=0) by user(uid=1000)
    Apr 25 20:40:43 audit[33392]: USER_START pid=33392 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:43 kernel: gpib debug: pid 33394, gpib: opening minor 0
    Apr 25 20:40:43 audit[33394]: ANOM_ABEND auid=1000 uid=0 gid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=33394 comm="ibtest" exe="/usr/local/bin/ibtest" sig=6 res=1
    Apr 25 20:40:43 kernel: gpib debug: pid 33394, gpib: request module returned 256
    Apr 25 20:40:43 kernel: gpib debug: pid 33394, minor 0, ioctl 3, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:43 kernel: gpib: ioctl 3 invalid for offline board
    Apr 25 20:40:43 kernel: gpib debug: pid 33394, minor 0, ioctl 5, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:43 kernel: gpib: ioctl 5 invalid for offline board
    Apr 25 20:40:43 kernel: gpib debug: pid 33394, minor 0, ioctl 5, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:43 kernel: gpib: ioctl 5 invalid for offline board
    Apr 25 20:40:43 audit: BPF prog-id=99 op=LOAD
    Apr 25 20:40:43 audit: BPF prog-id=100 op=LOAD
    Apr 25 20:40:43 audit: BPF prog-id=101 op=LOAD
    Apr 25 20:40:43 systemd[1]: Started systemd-coredump@8-33396-0.service - Process Core Dump (PID 33396/UID 0).
    Apr 25 20:40:43 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@8-33396-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Apr 25 20:40:43 systemd-coredump[33397]: Resource limits disable core dumping for process 33394 (ibtest).
    Apr 25 20:40:43 kernel: gpib debug: pid 33394, gpib: closing minor 0
    Apr 25 20:40:43 systemd-coredump[33397]: [LNK] Process 33394 (ibtest) of user 0 dumped core.
    Apr 25 20:40:43 audit[33392]: USER_END pid=33392 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:43 audit[33392]: CRED_DISP pid=33392 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:43 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@8-33396-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Apr 25 20:40:43 audit[33392]: ANOM_ABEND auid=1000 uid=1000 gid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=33392 comm="sudo" exe="/usr/bin/sudo" sig=6 res=1
    Apr 25 20:40:43 sudo[33392]: pam_unix(sudo:session): session closed for user root
    Apr 25 20:40:43 systemd[1]: systemd-coredump@8-33396-0.service: Deactivated successfully.
    Apr 25 20:40:43 audit: BPF prog-id=101 op=UNLOAD
    Apr 25 20:40:43 audit: BPF prog-id=100 op=UNLOAD
    Apr 25 20:40:43 audit: BPF prog-id=99 op=UNLOAD
    Apr 25 20:40:44 abrt-dump-journal-core[1001]: Failed to obtain all required information from journald
    Apr 25 20:40:44 abrt-dump-journal-core[1001]: Failed to save detect problem data in abrt database
    Apr 25 20:40:49 audit[33421]: USER_ACCT pid=33421 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="user" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:49 audit[33421]: USER_CMD pid=33421 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/user" cmd="ibtest" exe="/usr/bin/sudo" terminal=pts/4 res=success'
    Apr 25 20:40:49 sudo[33421]:     user : TTY=pts/4 ; PWD=/home/user ; USER=root ; COMMAND=/usr/local/bin/ibtest
    Apr 25 20:40:49 audit[33421]: CRED_REFR pid=33421 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:49 sudo[33421]: pam_unix(sudo:session): session opened for user root(uid=0) by user(uid=1000)
    Apr 25 20:40:49 audit[33421]: USER_START pid=33421 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:49 kernel: gpib debug: pid 33422, gpib: opening minor 0
    Apr 25 20:40:49 audit[33422]: ANOM_ABEND auid=1000 uid=0 gid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=33422 comm="ibtest" exe="/usr/local/bin/ibtest" sig=6 res=1
    Apr 25 20:40:49 kernel: gpib debug: pid 33422, gpib: request module returned 256
    Apr 25 20:40:49 kernel: gpib debug: pid 33422, minor 0, ioctl 3, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:49 kernel: gpib: ioctl 3 invalid for offline board
    Apr 25 20:40:49 kernel: gpib debug: pid 33422, minor 0, ioctl 5, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:49 kernel: gpib: ioctl 5 invalid for offline board
    Apr 25 20:40:49 kernel: gpib debug: pid 33422, minor 0, ioctl 5, interface=ni_usb_b, use=1, onl=0
    Apr 25 20:40:49 kernel: gpib: ioctl 5 invalid for offline board
    Apr 25 20:40:49 audit: BPF prog-id=102 op=LOAD
    Apr 25 20:40:49 audit: BPF prog-id=103 op=LOAD
    Apr 25 20:40:49 audit: BPF prog-id=104 op=LOAD
    Apr 25 20:40:49 systemd[1]: Started systemd-coredump@9-33424-0.service - Process Core Dump (PID 33424/UID 0).
    Apr 25 20:40:49 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@9-33424-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Apr 25 20:40:49 systemd-coredump[33425]: Resource limits disable core dumping for process 33422 (ibtest).
    Apr 25 20:40:49 systemd-coredump[33425]: [LNK] Process 33422 (ibtest) of user 0 dumped core.
    Apr 25 20:40:49 kernel: gpib debug: pid 33422, gpib: closing minor 0
    Apr 25 20:40:49 systemd[1]: systemd-coredump@9-33424-0.service: Deactivated successfully.
    Apr 25 20:40:49 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@9-33424-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    Apr 25 20:40:49 sudo[33421]: pam_unix(sudo:session): session closed for user root
    Apr 25 20:40:49 audit[33421]: USER_END pid=33421 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:49 audit[33421]: CRED_DISP pid=33421 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
    Apr 25 20:40:49 audit[33421]: ANOM_ABEND auid=1000 uid=1000 gid=0 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=33421 comm="sudo" exe="/usr/bin/sudo" sig=6 res=1
    Apr 25 20:40:49 audit: BPF prog-id=104 op=UNLOAD
    Apr 25 20:40:49 audit: BPF prog-id=103 op=UNLOAD
    Apr 25 20:40:49 audit: BPF prog-id=102 op=UNLOAD
    Apr 25 20:40:50 abrt-dump-journal-core[1001]: Failed to obtain all required information from journald
    Apr 25 20:40:50 abrt-dump-journal-core[1001]: Failed to save detect problem data in abrt database
    Apr 25 20:40:53 kernel: usb 3-4: USB disconnect, device number 19
    
     
  • DaveP

    DaveP - 2023-04-26

    The board attach failed due to a timeout on a control message. To progress we would need the USB I/O trace of the board initialization sequence on Windows and linux using Wiresharsk or some other USB monitoring application. From the journalctl output it looks like this is a different clone compared to the others we have seen so far.

     
  • Carey McKee

    Carey McKee - 2023-04-26

    Here is the trace.

     
  • DaveP

    DaveP - 2023-04-27

    It looks like the setup of the interrupt URB causes the board to go catatonic.
    We can try the following to check this hypothesis:
    in ni_usb_gpib.c change line 2298 from

    retval = ni_usb_setup_urbs(board);
    

    to
    ~~~
    retval = 0;
    ~~~
    rebuild, install, plug in the adapter and send me the resulting dmesg.

     
  • Carey McKee

    Carey McKee - 2023-04-27
    [ 7022.052467] usb 3-4: new high-speed USB device number 13 using xhci_hcd
    [ 7022.419719] usb 3-4: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7
    [ 7022.420060] usb 3-4: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01
    [ 7022.420066] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 7022.420069] usb 3-4: Product: GPIB-USB-HS
    [ 7022.420072] usb 3-4: Manufacturer: National Instruments
    [ 7022.420074] usb 3-4: SerialNumber: 01D6A085
    [ 7022.454794] Linux-GPIB 4.3.5 Driver
    [ 7022.456358] ni_usb_gpib driver loading
    [ 7022.456395] ni_usb_gpib: probe succeeded for path: usb-0000:00:14.0-4
    [ 7022.456425] usbcore: registered new interface driver ni_usb_gpib
    [ 7022.456427] gpib: registered ni_usb_b interface
    [ 7022.532036] gpib debug: pid 33425, gpib: opening minor 0
    [ 7022.533989] gpib debug: pid 33425, gpib: request module returned 256
    [ 7022.533994] gpib debug: pid 33425, minor 0, ioctl 39, interface=, use=0, onl=0
    [ 7022.533997] gpib debug: pid 33425, minor 0, ioctl 24, interface=, use=0, onl=0
    [ 7022.533999] gpib debug: pid 33425, minor 0, ioctl 21, interface=ni_usb_b, use=1, onl=0
    [ 7022.534000] gpib debug: pid 33425, minor 0, ioctl 22, interface=ni_usb_b, use=1, onl=0
    [ 7022.534001] gpib debug: pid 33425, minor 0, ioctl 23, interface=ni_usb_b, use=1, onl=0
    [ 7022.534002] gpib debug: pid 33425, minor 0, ioctl 15, interface=ni_usb_b, use=1, onl=0
    [ 7022.534002] gpib debug: set primary addr to 0
    [ 7022.534003] gpib debug: pid 33425, minor 0, ioctl 16, interface=ni_usb_b, use=1, onl=0
    [ 7022.534004] gpib debug: set secondary addr to -96
    [ 7022.534005] gpib debug: pid 33425, minor 0, ioctl 32, interface=ni_usb_b, use=1, onl=0
    [ 7022.534006] gpib debug: pid 33425, minor 0, ioctl 43, interface=ni_usb_b, use=1, onl=0
    [ 7022.534011] gpib debug: pid 33425, minor 0, ioctl 39, interface=ni_usb_b, use=1, onl=0
    [ 7022.534014] ni_usb_gpib: attach
    [ 7022.534018] usb 3-4: bus 3 dev num 13 attached to gpib minor 0, NI usb interface 0
    [ 7022.537643]  product id=0x709b
    [ 7022.537745] ni_usb_hs_wait_for_ready: board serial number is 0x1d6a085
    [ 7022.539191] /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[6]=0x16, expected 0x2, 0xe or 0xf
    [ 7022.539193] /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[7]=0x8, expected 0x3 or 0x5 or 0x6
    [ 7022.539194] /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready: unexpected data: buffer[10]=0x6e, expected 0x96 or 0x07
    [ 7022.539195] ni_usb_dump_raw_block:
    
    [ 7022.539196]  40
    [ 7022.539196]   1
    [ 7022.539196]   0
    [ 7022.539197]   1
    [ 7022.539197]  30
    [ 7022.539197]   1
    [ 7022.539198]  16
    [ 7022.539198]   8
    
    [ 7022.539199]   0
    [ 7022.539199]   0
    [ 7022.539199]  6e
    
    [ 7022.539200] gpib debug: /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_hs_wait_for_ready exit retval=0
    [ 7023.600638] /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: usb_control_msg returned -110
    [ 7024.624574] /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: usb_control_msg returned -110
    [ 7025.648622] ni_usb_nonblocking_receive_bulk_msg: killed urb due to timeout
    [ 7025.648631] /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_write_registers: ni_usb_receive_bulk_msg returned -110, bytes_read=0
    [ 7025.648636] ni_usb_dump_raw_block:
    
    [ 7025.648641] /home/user/Downloads/linux-gpib-code/linux-gpib-kernel/drivers/gpib/ni_usb/ni_usb_gpib.c: ni_usb_shutdown_hardware: register write failed, retval=-110
    [ 7025.648645] gpib: interface attach failed
    [ 7025.648975] gpib debug: pid 33425, gpib: closing minor 0
    
     
  • DaveP

    DaveP - 2023-04-29

    OK that was not it. Please send the wireshark trace for the plug-in sequence with the modified ni_usb_gpib.c

     
  • Carey McKee

    Carey McKee - 2023-04-29

    The wireshark trace for the plug-in sequence.

     

    Last edit: Carey McKee 2023-04-29
  • DaveP

    DaveP - 2023-04-30

    We have reached an impasse - your board does not recognise wValue=0x300 in the vendor control sent to setup the interrupt monitor. The windows driver only ever sends wValue=0x200.
    The setup_interrupt_monitor control is used very frequently in the linux-gpib driver so no work-around can be considered.
    Thank you for your prompt and pertinent replies.
    Sorry I cannot be of any further help.

     

    Last edit: DaveP 2023-04-30
  • Carey McKee

    Carey McKee - 2023-05-01

    Can you document the problem? For your information, my adapter has a
    part number of 187965G-01L and a serial number of 1D6A085, and the code
    39 bar code on it shows the serial number. It was purchased from Ebay
    for about 100 dollars including shipping. It came with a manual in
    several languages and a CD. I can't tell it is a clone.

     
  • DaveP

    DaveP - 2023-05-02

    From the exterior it is not known how to detect a fake. Clones resemble the newer genuine parts.

    There is a youtube video that can be helpful to distinguish a clone by the board layout.
    Search for "Teardown fake USB-GPIB-HS from china". There do seem to be genuine boards without shielding on the inside of the casing. It is the layout of the chips that is the determining factor.

    To detect a fake by software:
    In the output of 'sudo lsusb -v -d 3923:'
    look for the value of bInterval corresponding to EP 1. If it is zero you have a fake that will not work.

    You can also register your serial number with NI and if the corresponding product is not a NI_USB_HS you have a clone but it may work.

     
  • Carey McKee

    Carey McKee - 2023-05-03

    I am sorry if what I said was not clear. Can you write about the problem about clones in the supported hardware section of the manual for this piece of software?

     
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.