Hi,

On Fri, Oct 16, 2009 at 3:13 AM, Peter Pastor <[email protected]> wrote:
> Hey,
>
> I am trying to get a national instrument data acquisition pci card working
> under linux 2.6.30.5 xenomai 2.5-rc3 using comedi. I successfully installed
> the regular comedi drivers and I got data from the card, however, I also got
> mode switches. Therefore, I moved to the latest xenomai release which
> includes the comedi interface. The installation worked out and I got a
> xeno_comedi.ko module that I can load and a /usr/xenomai/lib/libcomedi.so.0.
> However, my program returns with...
>
> xenomai:~/xenomai_test> ./rt_comedi_test
> ./rt_comedi_test: /usr/xenomai/lib/libcomedi.so.0: no version information
> available (required by ./rt_comedi_test)
> Xenomai: incompatible ABI revision level
> (needed=1, current=2).

Is rt_comedi_test an application you developed ?

> I figured, that I need a national instrument driver (ni_pcimio) to get the
> /dev/comedi0 up and running since there is no kernel module associated with
> the NI card...

I think you should follow the common comedi way:
1) Check you have the suitable driver loaded:
# cat /proc/comedi/drivers
--  Comedi drivers --

| idx | driver name
|  00 | comedi_pcimio
|  01 | 8255
|  02 | comedi_loop
|  03 | comedi_fake

2) Check the comedi RTDM devices available:
# cat /proc/xenomai/rtdm/named_devices
Hash    Name                            Driver          /proc
A1      comedi0                         rtdm_comedi     comedi0
A2      comedi1                         rtdm_comedi     comedi1
A3      comedi2                         rtdm_comedi     comedi2
A4      comedi3                         rtdm_comedi     comedi3
A5      comedi4                         rtdm_comedi     comedi4
A6      comedi5                         rtdm_comedi     comedi5
A7      comedi6                         rtdm_comedi     comedi6
A8      comedi7                         rtdm_comedi     comedi7
A9      comedi8                         rtdm_comedi     comedi8
AA      comedi9                         rtdm_comedi     comedi9
D6      rttest0                         xeno_timerbench rttest0
D7      rttest1                         xeno_switchtest rttest1


3)  You have to attach the driver to the rtdm device you want to use
with comedi_config (a tool available in Xenomai).
#comedi_config comedi0 comedi_pcimio
    That command will assign comedi_pcimio driver to comedi0

4) Eventually, you can test the acquistion is working with some test
tool of ours :cmd_read
# /usr/local/bin/cmd_read -v
cmd_read: device comedi0 opened (fd=0)
cmd_read: basic descriptor retrieved
        subdevices count = 14
        read subdevice index = 0
        write subdevice index = 1
cmd_read: complex descriptor retrieved
cmd_read: channel 0
        ranges count = 4
        range's size = 16 (bits)
cmd_read: channel 1
        ranges count = 4
        range's size = 16 (bits)
cmd_read: channel 2
        ranges count = 4
        range's size = 16 (bits)
cmd_read: channel 3
        ranges count = 4
        range's size = 16 (bits)
cmd_read: scan size = 8
cmd_read: size to read = 800
cmd_read: command successfully sent
0x0 0x0 0x69 0x1 0x5f 0x33 0x33 0x58
0xb3 0x3a 0xec 0x28 0x2a 0x2d 0x9e 0x3a
0x73 0x3b 0x2f 0x35 0x78 0x32 0x7d 0x35
0x8b 0x37 0xad 0x36 0x25 0x35 0x8f 0x35
0xe 0x36 0x49 0x36 0xcd 0x35 0xef 0x35
0xc5 0x35 0x1 0x36 0xdb 0x35 0xe 0x36
0xc3 0x35 0xea 0x35 0xd1 0x35 0xe 0x36
0xc6 0x35 0xe4 0x35 0xc7 0x35 0x9 0x36
0xc3 0x35 0xe0 0x35 0xc1 0x35 0x1 0x36
0xc0 0x35 0xd9 0x35 0xbb 0x35 0xfb 0x35
0xb9 0x35 0xd5 0x35 0xb5 0x35 0xf3 0x35
0xb2 0x35 0xce 0x35 0xae 0x35 0xee 0x35

Here is my output with a NI 6221.

> xenomai:~/xenomai_test> lspci -v
>
> ...
>
> 06:00.0 Class ff00: National Instruments Device 717f
>     Flags: bus master, medium devsel, latency 64, IRQ 11
>     Memory at f7dfe000 (32-bit, non-prefetchable) [size=4K]
>     Memory at f7dff000 (32-bit, non-prefetchable) [size=4K]
>
> ...
>
> I "svn co http://svn.gna.org/svn/xenomai/branches/comedi-rtdm-dev"; since it
> seems to contain the NI drivers... however, I got a compiler error that I
> think relates to the fact that the system I am using has 4GB of ram
> (highmem). I am using revision: 4727.


SVN is not our version control system anymore. You should use our git
repository.

If you want the last fix I made, take my comedi branch.
Have a look at:
http://git.xenomai.org/?p=xenomai-abe.git;a=shortlog;h=refs/heads/comedi


> r...@xenomai:/usr/src/comedi-rtdm-dev# make
> make  all-recursive
> make[1]: Entering directory `/usr/src/comedi-rtdm-dev'
> Making all in comedi_kcore
> make[2]: Entering directory `/usr/src/comedi-rtdm-dev/comedi_kcore'
> make[3]: Entering directory `/usr/src/comedi-rtdm-dev'
> make[3]: Leaving directory `/usr/src/comedi-rtdm-dev'
> make[3]: Entering directory `/usr/src/linux-2.6.30.5'
>   CC [M]  /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_os_facilities.o
>   CC [M]  /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_command.o
>   CC [M]  /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_instruction.o
>   CC [M]  /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_driver.o
>   CC [M]  /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_subdevice.o
>   CC [M]  /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_buffer.o
> /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_buffer.c: In function
> ‘comedi_free_buffer’:
> /usr/src/comedi-rtdm-dev/comedi_kcore/comedi_buffer.c:52: error: implicit
> declaration of function ‘__va_to_kva’
> make[4]: *** [/usr/src/comedi-rtdm-dev/comedi_kcore/comedi_buffer.o] Error 1
> make[3]: *** [_module_/usr/src/comedi-rtdm-dev/comedi_kcore] Error 2
> make[3]: Leaving directory `/usr/src/linux-2.6.30.5'
> make[2]: *** [comedi.ko] Error 2
> make[2]: Leaving directory `/usr/src/comedi-rtdm-dev/comedi_kcore'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/comedi-rtdm-dev'
> make: *** [all] Error 2
>
> I would be really happy if someone could give me some hints/advice on how to
> get things working. What do I need to do ??
>
> Thanks a lot,
>  peter
>

Alexis.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to