Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQMX and Kernel 2.6.35 (Ubuntu 10.10 Maverick 32-bit)

Hello,

I am trying to set-up NI-DAQmx on a 32-bit ubuntu 10.10 machine with kernel 2.6.35 to make a PCI-6115 board work.  I am almost there but something eludes me.

briefly, what I did:

intall ni-kal 2.1(along the lines of https://decibel.ni.com/content/docs/DOC-15450)

install ni-DAQmx 8.02 (same reference, converted rpms to debs with alien, had to change sh to bash in /usr/local/natinst/nipal/bin/palModuleMgr.sh, changed a bit the INSTALL script to make it actually build the kernel modules)

now:

- the modules load fine; lsmod|grep NI shows

nipxirmk              115030  0

nidimk                320599  1 nipxirmk

nimsdrk               231258  0

nidmxfk               373960  1 nimsdrk

nimxdfk               477896  2 nimsdrk,nidmxfk

nimstsk                78153  2 nimsdrk,nidmxfk

nimdbgk               360232  4 nimsdrk,nidmxfk,nimxdfk,nimstsk

niorbk                 95647  7 nipxirmk,nidimk,nimsdrk,nidmxfk,nimxdfk,nimstsk,nimdbgk

nipalk               1225168  9 nipxirmk,nidimk,nimsdrk,nidmxfk,nimxdfk,nimstsk,nimdbgk,niorbk

nikal                  57990  1 nipalk

- there is no error reported in dmesg (kernel Ooops etc)

-lspci -k -vv shows:

03:07.0 Unassigned class [ff00]: National Instruments Device 2ed0

          Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

          Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

          Latency: 32, Cache Line Size: 4 bytes

          Interrupt: pin A routed to IRQ 21

          Region 0: Memory at fddff000 (32-bit, non-prefetchable)

          Region 1: Memory at fddfe000 (32-bit, non-prefetchable) [size=4K]

          Kernel driver in use: nidaqmx_nidaq2

[whereas on another suse 11.2 machine with a PCI-6110 board it shows

04:00.0 Class ff00: National Instruments PCI-6110

          Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

          Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR+ INTx-

          Latency: 255, Cache Line Size: 256 bytes

          Interrupt: pin A routed to IRQ 16

          Region 0: Memory at fd8ff000 (32-bit, non-prefetchable) [size=4K]

          Region 1: Memory at fd8fe000 (32-bit, non-prefetchable) [size=4K]

          Kernel driver in use: nidaqmx_nidaq2

]

Now the problem : nilsdev does not see any device (but does not report any error neither). Sample programs, unsurprisingly, do not work.

So I am looking for any further step I could take to solve that problem. In particular:

- did I miss something with the .inf files describing the PCI vendor and device ID of NI boards that are supposed to be fed to the kernel when installing the driver? I tried to repeat that special step manually (feeding nipal/bin/readInfFiles with the same inf files of nipal/etc/inf/ as used in the normal install process), but could not get lspci to tell me the actual board name, and get rid of that "Unassigned class" thing.

- Do I have to recompile the kernel in order to change the stack size (I believe it is 8KB under Ubuntu) and/or do something about the 'tainted kernel' messages seen in dmesg relative to the licence of NI drivers?

I tried to patch nikal as explained in the thread https://decibel.ni.com/content/thread/9252?tstart=0 : this does not seem to change anything (my kernel is older than the 2.6.37 used there anyway)

The bzipped niSystemReport of the target system is attached.

Any help is appreciated.

0 Kudos
Message 1 of 6
(9,193 Views)

An additional observation:

The PCI-6115 is not described in the vendor/device database lspci uses. I tried to add it manually (in /usr/share/misc/pci.ids for Ubuntu). Now I get

03:07.0 Unassigned class [ff00]: National Instruments PCI-6115

but this does not change anything for nilsdev.

0 Kudos
Message 2 of 6
(3,946 Views)

We don't use the database that lspci uses. That db, afaik, is only for pretty printing by lspci.

Anyway, it doesn't look like DAQ's device loader daemon is running.

try:

updateNIDrivers

sudo modprobe nissrk       -- see if this succeed. If this succeed, run the following 2 commands.

sudo /etc/init.d/mxssvr start

sudo /etc/init.d/nidevldu start

After that, run nilsdev again, and see.

Message 3 of 6
(3,946 Views)

I finally got it to work. The steps that I had missed:

- several scripts of NI do not work with dash, the shell that is actually used in place of sh for ubuntu ; therefore as indicated in thread https://decibel.ni.com/content/docs/DOC-15450, making sh point to bash instead of dash is required (once this is done it is not necessary anymore to modify /usr/local/natinst/nipal/bin/palModuleMgr.sh as stated above).

- /lib/init/upstart-job must be patched with the following patch: https://launchpadlibrarian.net/49141862/upstart-job.patch (see http://http://130.164.140.171/content/message/17610)

- One has to check that the services nidevldu, nipal, nipxirmu, mxssvr are properly installed in /etc/init.d and started at boot. In my case, the first three had their script in /etc/init.d, but not the last one, which I had to copy manually from /usr/local/natinst/max/etc/init.d/mxssvr to /etc/init.d ; then I made sure that these scripts were started at boot with

update-rc.d mxssvr defaults

update-rc.d nipal defaults

update-rc.d nipxirmu defaults

update-rc.d nidevldu defaults

some more info on the steps detailed in the first post :

- to make the modules compile, I had to install the non-pae kernel linux-image-2.6.35-30-generic, boot with it (default kernel can be changed by editing /etc/default/grub then by running update-grub), then the package linux-headers-$(uname -r) , in my case linux-headers-2.6.35-30-generic (and not any other header package like linux-headers-2.6.35, linux-headers-2.6.35-virtual...), and finally by manually creating a symbolink link /usr/src/linux pointing to /usr/src/linux-headers-2.6.35-30-generic.

- then the INSTALL script in the nidaqmx package tends to try to work in 'RPM mode' instead of working in 'DEB mode'. This makes it skip the actual module compilation (it thinks that the package install step failed). To correct that, one can 1) install manually the .deb created with alien (dpkg must be passed the option --force overwrite, see https://decibel.ni.com/content/docs/DOC-11652) and 2) modify the function 'wasInstalled' in the INSTALL script to make it always return '0' (true).

In the end, lspci still has the output above, with the 'unassigned class' message. However nilsdev sees the board and test programs work.

0 Kudos
Message 4 of 6
(3,946 Views)

Thanks for your help!

Concerning the "unassigned class" message of lspci, can you tell whether it relates to an actual problem of the NI software install?

0 Kudos
Message 5 of 6
(3,946 Views)

There is one last missing step in the instructions above : after copying or  linking /usr/local/natinst/max/etc/init.d/mxssvr to /etc/init.d/mxssvr, one must do

ln -sf /etc/init.d/mxssvr /usr/sbin/rcmxssvr

All of this should be done by the post-install script of nimxs, which seems to be correctly replicated in the .deb (see /var/lib/dpkg/info/nimxs.postinst), but it isn't.

Here are also two observations on the INSTALL script of nidaqmx. It tries to execute two scripts which do not exist:

$maxDir/bin/nimxsInstallerUtility.sh (should be created by nimxs package install, and lie in /usr/local/natinst/max/bin with default install path)

and

$libDir/bin/labview80_rteInstallerUtility.sh (should be created by labview_rte package install)

in that second case, the file /etc/natinst/lib/lib.dir that is supposed to define the variable $libDir, is not present either.

0 Kudos
Message 6 of 6
(3,946 Views)