Re: Installation problems with Comedi

On Wed, 2006-08-23 at 10:17 +0200, Jan Gukelberger wrote: 
> Hi Harold,
> 
> > I have been trying to install RTAI/Comedi/Comedilib for over a week now.
> > Thanks to someone there who sent me a URL for the RTAI-Lab Tutorial I
> > have been able to get further than at any time in the past, however, I
> > can't quite get the task completed.
> > 
> > Following the RTAI-Lab Tutorial, Section 2, "Installation" I seem to be
> > able to get through sub-section 2.7, "RTAI-tests" OK.  That is at this
> > point I am able to execute the tests described in that sub-section.
> > 
> > Sub-section 2.8, "Comedi" appears to install OK, i.e. I get no error
> > messages, and everything looks OK until I attempt to run comedi_config
> > in sub-step 9.  At that point I get a message indicating that the
> > requested module was not installed.  (The actual command was: 
> > 
> > 	comedi_config -v /dev/comedi0 ni_pcimio
> > 
> > and the reason for the message appears obvious, as the directory
> > 
> > /lib/modules/2.6.10-rtai/comedi
> > 
> > is empty.
> > 
> > After going through various versions of this procedure several times
> > with virtually the same results, I starting looking for the files that
> > should have resulted from the "make install" command.  According to the
> > time stamps it appears that they were generated, so I attempted to link
> > them to their proper location.  Still no help, as I got the same error
> > message from "comedi_config".
> > 
> > I would greatly appreciate some direction regarding what I can do next.
> 
> It would probably be easier to help for anyone if you provided some more
> information, e.g. attached the output of "make install" that seems to
> have failed.
> Additionally, you should try and load the needed comedi modules manually
> before running comedi_config if you know where they are.
> 
> > 
> > BTW, I am doing this installation under CentOS version 4.3, a RedHat
> > Enterprise derivative.
> > 
> > 	Harold Skank
> 
> Regards,
> Jan
> 
People,

I wish to thank all of you for your attempts to answer my questions (as
outlined above).

Jan - actually the real answer to my problems came from two different
responses, one by Ian Abbott to a query from a different user, and the
second from Allesendro Toso to the same query that you responded to.

A. Toso's response was much the same as yours in saying that I should
load the needed modules manually before calling comedi_config.  The
response by I. Abbott covered the actual module installation problem
pretty well.  In the end I combined the script suggested by Abbott with
other material listed in the RTAI-Lab Tutorial to generate the following
script:

# RLINSMOD - RTAI-Lan insmod
#
# Inserts RTAI-Lab and Comedi modules in kernel and
# configures the drivers.
#
# Version 1.0 - January, 2006 - Arno H.A. Stienen
# Modified - August 23, 2006 - Harold Skank
#   to include rtai-inode script

# rtai-inode: RTAI inode creation for UDEV systems,
#  creates /dev/rtf(n)
for n in 'seq 0 9'; do \
  mknod -m 666 /dev/rtf$i c 150 $$n; \
done ; \

# create shared memory inode
mknod -m 666 /dev/rtai_shm c 10 254

# create Comedi inodes
for i in 'seq 0 15'; do \
  rm /dev/comedi$i
  mknod -m 666 /dev/comedi$i c 98 $i \
  ; \
  
done;

# RLINSMOD

insmod /usr/realtime/modules/rtai_hal.ko
insmod /usr/realtime/modules/rtai_lxrt.ko
insmod /usr/realtime/modules/rtai_fifos.ko
insmod /usr/realtime/modules/rtai_sem.ko
insmod /usr/realtime/modules/rtai_mbx.ko
insmod /usr/realtime/modules/rtai_msg.ko
insmod /usr/realtime/modules/rtai_netrpc.ko ThisNode="127.0.0.1"
insmod /usr/realtime/modules/rtai_shm.ko
insmod /usr/realtime/modules/rtai_leds.ko
insmod /usr/realtime/modules/rtai_signal.ko
insmod /usr/realtime/modules/rtai_tasklets.ko
modprobe comedi
modprobe kcomedilib
modprobe comedi_fc
modprobe ni_pcimio
insmod /usr/realtime/modules/rtai_comedi.ko

modprobe ni_pcimio			# acquisition card specific

/etc/init.d/pcmcia restart

/usr/local/sbin/comedi_config /dev/comedi0 ni_pcimio

In turn, I inserted a call to this script in /etc/rc.d/rc.local.  Now,
on booting to the rtai-kernel, I can verify that the /dev/comedi(n)
files exist (they are normally erased by udev at the start of the boot
process) and using lsmod I can verify that the modules exist, including
ni_pcimio, the driver module for the NI card installed in the backplane.

I don't know if I have all of the necessary modules installed, in fact I
doubt it, as when I attempt to start scicos (as described in RTAI-Lab
Tutorial, section 3, sub-section 3.2, entitled "Start Scicos," I have no
RTAI menu in the resulting screen.  Again, I would appreciate someone
suggesting how I can remedy this situation.

I do want to emphasize that I am very grateful to the various persona
who have assisted me in this installation.  The end benefits for my
application will be very significant.

	Harold Skank

Received on 2006-08-23Z19:38:57