Problems with NI-6501

155 views
Skip to first unread message

E Hazen

unread,
Oct 28, 2020, 6:32:39 PM10/28/20
to Comedi: Linux Control and Measurement Device Interface
Hi Everyone-

I have an NI-6501 board, and I'm trying to talk to it using comedi under Unbuntu 20.04.  It seems there is a "staging" driver in the Kernel.  Whenever I try to read or write to the board I get a connection timeout.

When I plug in the board, it looks promising:

$ dmesg
[15683.830955] usb 3-7: new full-speed USB device number 10 using xhci_hcd
[15683.981620] usb 3-7: New USB device found, idVendor=3923, idProduct=718a, bcdDevice= 1.00
[15683.981627] usb 3-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15683.981630] usb 3-7: Product: NI USB-6501
[15683.981633] usb 3-7: Manufacturer: National Instruments
[15683.981636] usb 3-7: SerialNumber: 01F13904
[15683.983499] comedi comedi0: driver 'ni6501' has successfully auto-configured 'ni6501'.

Also, the board identifies reasonably:

$ comedi_board_info 
overall info:
  version code: 0x00074c
  driver name: ni6501
  board name: ni6501
  number of subdevices: 2
subdevice 0:
  type: 5 (digital I/O)
  flags: 0x00030000
  number of channels: 24
  max data value: 1
  ranges:
    all chans: [0 V,5 V]
  command:
    not supported
subdevice 1:
  type: 6 (counter)
  flags: 0x10030000
  number of channels: 1
  max data value: 4294967295
  ranges:
    all chans: [0,1]
  command:
    not supported

But, when I try to read or write, I get timeout messages:

$ cp -r /usr/share/doc/libcomedi-dev/demo .
$ cd demo
$ make
$ ./dio
configuring pin 0 on subdevice 0 for input.
comedi_dio_config: Connection timed out

Any thoughts?  Should I post more info about my system?
Thanks in advance.

Luca Ellero

unread,
Oct 29, 2020, 4:31:15 AM10/29/20
to comed...@googlegroups.com
Hi,

could this be useful:

http://www.brickedbrain.com/projects/ni_usb6501_linux.php

Keep in mind that this is quite old documentation, please skip the first
part (patching  the kernel).

Now the driver is part of kernel sources
(drivers/staging/comedi/drivers/ni_usb6501.c)

Regards

Luca


Ian Abbott

unread,
Oct 29, 2020, 6:42:41 AM10/29/20
to comed...@googlegroups.com
Is there any info reported by dmesg after this error?

If your machine has a mixture of USB 2.0 and USB 3.0 ports, try the
device in both types of ports to see whether it makes any difference.
(I have known of some USB 2.0 devices that refuse to work properly in
USB 3.0 ports!)

Luca Ellero's (the driver author's) last change to the driver was in
September 2014. There have been a few changes to the driver since then,
but just some minor tidy-ups and bug fixes that shouldn't effect the
normal behaviour of the driver.

--
-=( Ian Abbott <abb...@mev.co.uk> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

E Hazen

unread,
Oct 29, 2020, 7:32:36 AM10/29/20
to Comedi: Linux Control and Measurement Device Interface
There aren't any USB 3.0 ports on the machine.

There is nothing in the kernel buffer (dmesg) after the error.

I saw the "brickedbrain" thread but since the driver is already in the kernel I don't think it's relevant.

Thanks for the suggestions anyway.  I've downloaded the kernel source and started a build, with the intention of adding debug output to the driver.  It's the hard way, so hoping for someone else who's figured this out to come up with something easier!

Hugh Waite

unread,
Dec 15, 2021, 5:20:04 AM12/15/21
to Comedi: Linux Control and Measurement Device Interface

I had the same problem and came across this thread.
I suspected it might be a firmware issue. I can't find how to get the firmware version from the Windows based NI tools. However, after connecting it to a Windows PC which had the NIDAQmx software installed, but not explicitly asking it to do any update, the device started working with the comedi driver. I wonder if it does an automatic firmware update...
I was using installed version 21.3 of the Windows NI software.
I hope this helps anyone else coming across this!
Reply all
Reply to author
Forward
0 new messages