- From: Luc Lefebvre <luc.lefebvre_at_mcgill.ca>
- Date: Wed, 15 Jan 2003 14:46:34 -0500 (EST)
Thanks to the help of Frank Mori Hess <from the comedi mailing list> I was
able to resolve the issue of the card not coming up clean the first time
around. Here is the updated account of how it was done <Debian Woody,
kernel 2.4.18, IBM ThinkPad iSeries 1400, NI DAQ Card 6062E>.
This document describes my experience in getting comedi working with a
National Instruments DAQ Card <model 6062E> with Debian Woody and
kernel 2.4.18. It, or parts of it could be added as an addtional
example in the section 2 <Installation and Configuration> of the
Comedilib documentation <if deemed appropriate>.
Hopefully this will be of use to others. Any additional input is
welcome and if the list finds this useful, I will post any updates or
changes.
----------> START of EXAMPLE <---------------
Before getting started, one strong recommendation, join the comedi
mailing list and read the archives. The usual read the READMEs and
other docs.
--Getting the software.
-Kernel source
The kernel source can be obtained either through your distribution
<deb or rpm package> or at the usual place <kernel.org and mirrors>.
-Comedi & Comedilib
They are packaged with many distributions <including Debian> or can be
downloaded from the comedi website <http://stm.lbl.gov/comedi/>. The
version I used is comedilib-0.7.19.tgz and comedi-0.7.66.tgz.
-PCMCIA-CS
With the linux kernel, <at least with 2.4 kernels> you will need to
compile and install pcmcia card services. This is usually packaged
with your distribution. More information at
<http://pcmcia-cs.sourceforge.net/>
--Configuring the kernel.
In order to use a pcmcia DAQ card with comedi one needs to install
pcmcia card services modules <I compiled from source, pcmcia-cs
version 3.1.33>. In order for comedi to generate the proper
configuration during the make phase, the kernel _must_ be compiled
with PCMCIA/CardBus support enabled <ie. CONFIG_PCMCIA=y in your
kernel .config file, the "general setup" section in xconfig>.
--Compiling & installing Comedi & Comedilib
Comedi is the device drivers, comedlib are the libraries required to
write software which interacts with the comedi supported devices.
For the Debian distribution one extracts the comedi archive into the
/usr/src/modules directory. This allows us to use the "make-kpkg
--revision xx modules-image" which generates a package compatible with
the kernel source which is ready to install. During the process you
will be asked a series of questions which will result in the .config
file for the comedi module. My .config file is as follows:
#
# Automatically generated make config: don't edit
#
CONFIG_COMEDI=m
#
# Comedi Features
#
# CONFIG_COMEDI_RT is not set
CONFIG_COMEDI_DEBUG=y
CONFIG_COMEDI_KLIB=m
#
# Hardware device drivers
#
# CONFIG_COMEDI_DT is not set
CONFIG_COMEDI_NI=y
# CONFIG_COMEDI_NI_ATMIO is not set
CONFIG_COMEDI_NI_MIO_CS=m
# CONFIG_COMEDI_NI_DAQ_DIO24 is not set
# CONFIG_COMEDI_NI_PCIMIO is not set
# CONFIG_COMEDI_NI_PCIDIO is not set
# CONFIG_COMEDI_NI_670X is not set
# CONFIG_COMEDI_NI_ATMIO16D is not set
# CONFIG_COMEDI_NI_AT_A2150 is not set
# CONFIG_COMEDI_NI_LABPC is not set
# CONFIG_COMEDI_NI_AT_AO is not set
# CONFIG_COMEDI_DAS08 is not set
# CONFIG_COMEDI_DAS16 is not set
# CONFIG_COMEDI_DAS16M1 is not set
# CONFIG_COMEDI_DAS6402 is not set
# CONFIG_COMEDI_DAS800 is not set
# CONFIG_COMEDI_DAS1800 is not set
# CONFIG_COMEDI_CB_PCIDAS is not set
# CONFIG_COMEDI_CB_PCIDAS64 is not set
# CONFIG_COMEDI_CB_PCIDDA is not set
# CONFIG_COMEDI_CB_PCIMDDA is not set
# CONFIG_COMEDI_CB_PCIMDAS is not set
# CONFIG_COMEDI_CB_DAS16_CS is not set
CONFIG_COMEDI_8255=m
# CONFIG_COMEDI_MULTIQ3 is not set
CONFIG_COMEDI_PARPORT=m
# CONFIG_COMEDI_ADL_PCI9111 is not set
# CONFIG_COMEDI_ADL_PCI9118 is not set
# CONFIG_COMEDI_ADV_PCI1710 is not set
# CONFIG_COMEDI_PCL711 is not set
# CONFIG_COMEDI_PCL724 is not set
# CONFIG_COMEDI_PCL725 is not set
# CONFIG_COMEDI_PCL726 is not set
# CONFIG_COMEDI_PCL812 is not set
# CONFIG_COMEDI_PCL816 is not set
# CONFIG_COMEDI_PCL818 is not set
# CONFIG_COMEDI_RTD520 is not set
# CONFIG_COMEDI_RTI800 is not set
# CONFIG_COMEDI_RTI802 is not set
# CONFIG_COMEDI_II_PCI20KC is not set
# CONFIG_COMEDI_CONTEC_PCI_DIO is not set
# CONFIG_COMEDI_QUATECH_DAQP is not set
# CONFIG_COMEDI_DAQBOARD2000 is not set
# CONFIG_COMEDI_DAQBOARD2000_FPGA is not set
# CONFIG_COMEDI_FL512 is not set
# CONFIG_COMEDI_POC is not set
# CONFIG_COMEDI_PCM3730 is not set
# CONFIG_COMEDI_PCMAD is not set
# CONFIG_COMEDI_AMPLC_PCI230 is not set
# CONFIG_COMEDI_AMPLC_PC236 is not set
# CONFIG_COMEDI_AMPLC_PC263 is not set
# CONFIG_COMEDI_SSV_DNP is not set
# CONFIG_COMEDI_ICP_MULTI is not set
# CONFIG_COMEDI_KE_COUNTER is not set
# CONFIG_COMEDI_ME_DAQ is not set
CONFIG_COMEDI_TEST=m
CONFIG_COMEDI_SKEL=m
CONFIG_COMEDI_FC=m
#---END OF COMEDI .config FILE---
NOTE: Do not forget to run "make dev" from the comedi source directory
if the devices /dev/comedi? don't exist on your system. See the
INSTALL file in the source directory.
Comedilib is easily produced as a package with the "make debian"
command <there is a similar "make rpm" command for RPM based distros>.
One important detail if you want to use the python or perl wrappers
provided edit the Config file in the comedlib directory to reflect
this. After making the package simply install as per your
distributions procedure.
--Configuring the system
I created the file /etc/modutils/comedi with the contents:
# created in order to add comedi modules to modules.conf
# via update-modules
# ---
# LL 8 Jan 2003
# ---
path=/lib/modules/`uname -r`/comedi/comedi
#---end of /etc/modutils/comedi file---
I then ran update-modules which <in Debian distributions> updated the
/etc/modules.conf.
I then ran "depmod -a".
Now with the DAQ Card in place one can run modprobe ni_mio_cs to load
the module, or if the card is in place when one reboots the computer
one should have the card come up automatically with the modules
automatically loaded. I used cardinfo <an X-windows gui showing the
status of pcmcia card slots> to verify that the card was identified
and configured OK <I got the proper card ID, as well as an irq and
memory address allocated>.
NOTE: the Debian package libcomedi-dev includes the file
/etc/pcmcia/comedi.conf which takes care of associating the card
manfid with the card name and its driver.
I then ran a series of example programs provided with comedilib <in
the associated demo subdirectory and all seems to be working OK.
-----------------> END of documentation INSERT <--------------------
In conclusion I would like to thank David Schleef and other
contributors to the comedi project as well as the kindness and
generosity of all list members.
--URLs
Comedi: <http://stm.lbl.gov/comedi/>
pcmcia-cs: <http://pcmcia-cs.sourceforge.net/>
Luc Lefebvre
15 January 2003
--
Luc Lefebvre o
/`-'
Open Source, a strategic choice \ www.eff.org
for mission-critical applications ___/___./ www.publicknowledge.org
http://www.gnu.org/philosophy/no-word-attachments.html
Key fingerprint = D2E5 5E35 B910 6F4E 0242 EC63 0FD9 96D0 C7F4 784E
Received on 2003-01-15Z19:46:34