Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-KAL for 2.6.31+ Kernels

No, actually I haven't. The reason  is that the installer depends on NIKAL being installed in order to use the C/C++ api. The smallish suite of tools that are supplied in the NI-Daqmx and daq base won't install without finding the nikal library. I forced an install on the nikal by configuring the kernel and changing the configure script but it fails to initialize. I have been tied up on the real job to work with the driver to see if it is using the usb interface at the kernel level, which I suspect it is. If it is just a matter of using the usb user level then it only a matter of determining if it is a character device or a block device and then determining the structures and protocol. I have a fedora 10 system working using the nikali 1.9 so that will be the starting point. I may be able to instrument the existing Nikal 1.9 to dump the transactions. Then it is a matter of writing a user side interface to talk to the usb device directly.

I guess what I am talking about is doing the baby steps. I should have more of an answer after tonight, now that I have a bit of time to look at the NIKAL source and see what it is doing. I might find the bug in it or a work around to allow it to work. If this is the case then it is a matter of submitting a diff/patch file.I am surprised there is no one else taking these approaches. I guess most are comfortable with settling for MS solutions.

The TCO  of the USB-6009 is suddenly becoming much higher.

0 Kudos
Message 31 of 49
(1,000 Views)

If it is just a matter of using the usb user level then it only a matter of determining if it is a character device or a block device and then determining the structures and protocol.

I can tell you for sure that DAQmx Base support of USB devices is in user-mode through ioctl/read/write on usbdevfs.  The difficulty of getting things installed has to do with the package also includes PCI support which requires NI-KAL.  If you can figure out a way to split that out or if the PCI stuff can fail out gracefully somehow to still allow you to use a USB device, then you'd be in business.

NI-KAL does also have some kernel-mode USB API support in it.  But those kernel USB APIs went GPL only earlier in the 2.6 kernel.  So we can't use that anymore since NI-KAL is not a GPL module.  That is the USB API that the 488.2 driver is written on and why that no longer works if you want to use NI USB-GPIB products on Linux.

0 Kudos
Message 32 of 49
(1,000 Views)

mhoogend wrote:

If it is just a matter of using the usb user level then it only a matter of determining if it is a character device or a block device and then determining the structures and protocol.

I can tell you for sure that DAQmx Base support of USB devices is in user-mode through ioctl/read/write on usbdevfs.  The difficulty of getting things installed has to do with the package also includes PCI support which requires NI-KAL.  If you can figure out a way to split that out or if the PCI stuff can fail out gracefully somehow to still allow you to use a USB device, then you'd be in business.

Since NI-DAQmx Base uses NI-VISA for all of the device access, and NI-VISA uses passports for each of the different buses you should be able to simply disable the PCI/PXI passport to remove the NI-KAL dependancy.  The tricky part might be getting everything to install, but once it is installed you can run visaconf to disable the PCI/PXI passport.  Once the PCI/PXI passport is disabled NI-KAL won't be needed at all for USB.

--

Shawn

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 33 of 49
(1,000 Views)

ShermanO wrote:

I contacted NI about getting the register mapping and such information so I could write an embedded driver for the 6009/6008. I was told that the information was proprietary and could not have it.

How did you contact NI -- did you call your local sales engineer or speak with someone in applications engineering or do something else?

Joe

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 34 of 49
(1,000 Views)

Hi

Have you managed to get the USB-6009 working?

I disabled the PXI stuff mentioned in another reply using visaconf but NI-KAL still doesn't load and the USB device still doesn't work.

0 Kudos
Message 35 of 49
(1,000 Views)

I disabled the PXI stuff mentioned in another reply using visaconf but NI-KAL still doesn't load and the USB device still doesn't work.

NI-KAL not loading and USB not working in NI-VISA would be two different things.  For 2.6.31+ kernels you can try the new VISA beta that we have posted. (http://decibel.ni.com/content/thread/7461)

That still doesn't address getting VISA USB working without NI-KAL installed which people may want to try in the future, in particular in those times that new kernels come out that break NI-KAL.  Since you disabled the PXI stuff and didn't have USB working, I don't know if NI-KAL not being there was breaking something else in VISA or if there is something else wrong with USB.  Let us know what you find when you install the beta.

0 Kudos
Message 36 of 49
(1,000 Views)

I uninstalled visa 4.5.1 and installed visa 5.0.0.

Running updateNIDrivers now gives this (which looks OK)

Installing NI-KAL:
  NI-KAL successfully updated.
Updating client modules:
  nipalk.ko successfully updated.
  NiViPxiK.ko successfully updated.
  NiViPciK.ko successfully updated.
  niorbk.ko successfully updated.

Are there any more modules?

The usb device still doesn't work. Running lsdaq gives this:

--------------------------------
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
/usr/local/bin/lsdaq: line 7:  3872 Aborted                 /etc/natinst/nidaqmxbase/bin/daqmxbase_listdevices
--------------------------------

Any ideas?

I am very interested in using the USB devices without NI-KAL since I foresee that my upgrading habits will break it often. Does it involve selectively installing packages, changing the source files or something else?

0 Kudos
Message 37 of 49
(1,000 Views)

Did you reboot at all during your uninstall / install / updateNIDrivers sequence?  If old kernel modules still are stuck in memory it could cause this problem.  Did you take a look at what sort of messages you got from dmesg when you are getting the failure from lsdaq?

I've only seen conjecture on installing USB support for DAQmxBase without NI-KAL.  Nobody as far as I know has fully tried to go through it and get it working.  I personally don't have the setup to try it out myself.

0 Kudos
Message 38 of 49
(1,000 Views)

Which Linux distribution are you using? You may need to follow the expanded instructions in the NI-KAL 1.10 readme.

Joe FriedChicken

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 39 of 49
(1,000 Views)

Yes, I rebooted almost as much as if it was windows. I don't think there are old modules left over but I can look again.

The reason for the lsdaq problem is that nipal module is not running. When I do "/etc/init.d/nipal start" lsdaq works but then it doesn't find my device (usb6210).

I will investigate the USB/no nikal thing when I have some time.

@Joe

I run kubuntu 10.04. I had the usb6008 and usb6501 working on kubuntu 9.10 but then didn't use them for a while and now it doesn't work anymore.

0 Kudos
Message 40 of 49
(1,000 Views)