From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-13-2012 10:43 AM
I am trying to make niDAQmx work on a Ubuntu 12.04 32-bit machine, with kernel 3.2. I had some success before with ubuntu 10.10 (see https://decibel.ni.com/content/message/25254). Here I am using the exact same versions of NI software (ni-kal 2.1, DAQmx 8.02). I had to modify slightly nikal.c in the nikal module to get around the ioctl / compat_ioctl issue with recent kernels (see attached file nikal.c.patch). Once this is done, and with steps similar to the Ubuntu 10.10 setup, one has :
lsmod|grep ni
nissrk 2042495 0
nistcrk 189457 1 nissrk
nistc2k 227493 2 nissrk,nistcrk
nitiork 1002687 1 nissrk
nicdrk 372290 3 nissrk,nistcrk,nitiork
nimru2k 430085 3 nissrk,nistcrk,nitiork
nimxpk 41736 5 nissrk,nistcrk,nistc2k,nitiork,nicdrk
nipxirmk 120058 0
nidimk 328631 3 nitiork,nimru2k,nipxirmk
nimsdrk 237610 3 nissrk,nistcrk,nitiork
nidmxfk 380304 5 nissrk,nistcrk,nitiork,nicdrk,nimsdrk
nimxdfk 482184 7 nissrk,nistcrk,nitiork,nicdrk,nimru2k,nimsdrk,nidmxfk
nimstsk 83261 6 nissrk,nistcrk,nitiork,nicdrk,nimsdrk,nidmxfk
nimdbgk 366412 10 nissrk,nistcrk,nistc2k,nitiork,nicdrk,nimru2k,nimsdrk,nidmxfk,nimxdfk,nimstsk
niorbk 101451 12 nissrk,nistcrk,nitiork,nicdrk,nimru2k,nipxirmk,nidimk,nimsdrk,nidmxfk,nimxdfk,nimstsk,nimdbgk
nipalk 1229948 16 nissrk,nistcrk,nistc2k,nitiork,nicdrk,nimru2k,nimxpk,nipxirmk,nidimk,nimsdrk,nidmxfk,nimxdfk,nimstsk,nimdbgk,niorbk
nikal 61822 1 nipalk
The nipal service also starts properly and creates /dev/nipalk as expected; other NI services do not complain. However, all NI utilities fail with the message
libnipalu.so failed to initialize
In syslog, more info is given, for instance when launching nilsdev :
nilsdev: [nipalu] Warning: source/lib/linux/linLoadKern.cpp:97 - libKernelDriverInit: Failure loading kernel driver. status=-50202
nilsdev: [nipalu] Warning: source/initcln/initcln.cpp:147 - Posix: Init kInitClnPackage: kernelDriver: failed! status=-50202
nilsdev: [nipalu] Warning: source/package/posix/ulibEntry.cpp:179 - initialize: unable to load NI-PAL. status=-50202
It seems that libnipalu.so does not see that nikal / nipalk is already loaded.
Is there some way to overcome this ?
12-13-2012 11:07 AM
My guess is that you're not patching NI-KAL correctly. If HAVE_COMPAT_IOCTL is defined, you're not defining ioctl in the driver structure.
Considering most of our software communicates to our driver using mostly ioctl, the error you're seeing is understandable if ioctl isn't done right.
I'm not sure how to patch the ioctl correctly. I haven't kept track of the kernel changes for a while.
Exactly what error did you encounter when you compile KAL against your kernel?
12-13-2012 11:27 AM
with the original source, I get :
/usr/local/natinst/nikal/src/nikal/nikal.c:489:4: error: unknown field ‘ioctl’ specified in initializer
/usr/local/natinst/nikal/src/nikal/nikal.c:489:4: warning: initialization from incompatible pointer type [enabled by default]
/usr/local/natinst/nikal/src/nikal/nikal.c:489:4: warning: (near initialization for ‘nNIKAL100_fops.fsync’) [enabled by default]
make[2]: *** [/usr/local/natinst/nikal/src/nikal/nikal.o] Error 1
make[1]: *** [_module_/usr/local/natinst/nikal/src/nikal] Error 2
make: *** [all] Error 2
12-13-2012 11:44 AM
See if there's a new NI-KAL that just works for that kernel.. looks like 2.3.1 is avail:
http://joule.ni.com/nidu/cds/view/p/id/3477/lang/en
I see that 2.3 has some changes to address the ioctl probs.
12-13-2012 11:49 AM
Based on your previous comment this is what I did - using nikal 2.2-f0 from NI-VISA that does not need patching (only the compile scripts need to have their kernel version check disabled). nilsdev and DAQmxtestpanels works, thank you !