Newbie problems

I have two Advantech PCI-1760 digital I/O cards.  I've tested them with
Windows and they seem to be working: I can ground the inputs and the
little indicators on the screen turn green when I do, and when I click
the output buttons, the little read led's on the board turn on and off
as expected.

But...

My application is for linux.  I have two machines that give similar
results, both run Debian Sarge, one with a stock Debian 2.4.27 kernel
and one with a locally compiled 2.6.8 kernel.  I have comedi kenrel
modules 0.7 installed, and libcomedi 0.7.22 installed.  When I load the
driver modules: comedi.o and either pci1760.o or adv_pci_dio.o and run:
comedi_config /dev/comedi0 pci1760
it appears to work.

But when I run my test program, or the di_insn or do_insn programs, the
driver logs the following:

kernel: comedi0: adv_pci_dio: PCI-1760 mailbox request timeout!

and none of the operations work.  They all return success, but the led's
never come on when I do an output, and I always read 0xF7 when I do an
input.

Here is the result of comedi_test on the 2.6.8 box:

I: Comedi version: 0.7.70
I: Comedilib version: unknown =)
I: driver name: adv_pci_dio
I: device name: pci1760
I:
I: subdevice 0
I: testing info...
rev 1
I: subdevice type: 3 (digital input)
  number of channels: 8
  max data value: 1
  ranges:
    all chans: [0,5]
I: testing insn_read...
rev 1
comedi_do_insn returned 1, good
I: testing insn_read_0...
comedi_do_insn returned 0, good
I: testing insn_read_time...
rev 1
comedi_do_insn: 3
read time: 8639 us
I: testing cmd_no_cmd...
got EIO, good
I: testing cmd_probe_src_mask...
not applicable
I: testing cmd_probe_fast_1chan...
not applicable
I: testing cmd_read_fast_1chan...
not applicable
I: testing cmd_write_fast_1chan...
not applicable
I: testing cmd_logic_bug...
not applicable
I: testing cmd_fifo_depth_check...
not applicable
I: testing cmd_start_inttrig...
not applicable
I: testing mmap...
not applicable
I: testing read_select...
not applicable
I: testing bufconfig...
buffer length is 0, good
I:
I: subdevice 1
I: testing info...
rev 1
I: subdevice type: 4 (digital output)
  number of channels: 8
  max data value: 1
  ranges:
    all chans: [0,5]
I: testing insn_read...
rev 1
comedi_do_insn returned 1, good
I: testing insn_read_0...
comedi_do_insn returned 0, good
I: testing insn_read_time...
rev 1
comedi_do_insn: 3
read time: 2 us
I: testing cmd_no_cmd...
got EIO, good
I: testing cmd_probe_src_mask...
not applicable
I: testing cmd_probe_fast_1chan...
not applicable
I: testing cmd_read_fast_1chan...
not applicable
I: testing cmd_write_fast_1chan...
not applicable
I: testing cmd_logic_bug...
not applicable
I: testing cmd_fifo_depth_check...
not applicable
I: testing cmd_start_inttrig...
not applicable
I: testing mmap...
not applicable
I: testing read_select...
not applicable
I: testing bufconfig...
buffer length is 0, good
I:
I: subdevice 2
I: testing info...
rev 1
I: subdevice type: 7 (timer)
  number of channels: 2
  max data value: -1
  ranges:
    all chans: [0,1]
I: testing insn_read...
rev 1
E: comedi_do_insn: Invalid argument
I: testing insn_read_0...
E: comedi_do_insn: Invalid argument
I: testing insn_read_time...
rev 1
comedi_do_insn: -1
W: comedi_do_insn: errno=22 Invalid argument
W: comedi_do_insn: returned -1 (expected 3)
read time: -1059139946 us
I: testing cmd_no_cmd...
got EIO, good
I: testing cmd_probe_src_mask...
not applicable
I: testing cmd_probe_fast_1chan...
not applicable
I: testing cmd_read_fast_1chan...
not applicable
I: testing cmd_write_fast_1chan...
not applicable
I: testing cmd_logic_bug...
not applicable
I: testing cmd_fifo_depth_check...
not applicable
I: testing cmd_start_inttrig...
not applicable
I: testing mmap...
not applicable
I: testing read_select...
not applicable
I: testing bufconfig...
buffer length is 0, good
I:
I: subdevice 3
I: testing info...
rev 1
I: subdevice type: 6 (counter)
  number of channels: 8
  max data value: 65535
  ranges:
    all chans: [0,1]
I: testing insn_read...
rev 1
comedi_do_insn returned 1, good
I: testing insn_read_0...
comedi_do_insn returned 0, good
I: testing insn_read_time...
rev 1
comedi_do_insn: 3
read time: 2666 us
I: testing cmd_no_cmd...
got EIO, good
I: testing cmd_probe_src_mask...
not applicable
I: testing cmd_probe_fast_1chan...
not applicable
I: testing cmd_read_fast_1chan...
not applicable
I: testing cmd_write_fast_1chan...
not applicable
I: testing cmd_logic_bug...
not applicable
I: testing cmd_fifo_depth_check...
not applicable
I: testing cmd_start_inttrig...
not applicable
I: testing mmap...
not applicable
I: testing read_select...
not applicable
I: testing bufconfig...
buffer length is 0, good

And, here is the result on the 2.4.27 box:

I: Comedi version: 0.7.60
I: Comedilib version: unknown =)
I: driver name: adv_pci1760
I: device name: pci1760
I:
I: subdevice 0
I: testing info...
rev 1
I: subdevice type: 0 (unused)
I: testing insn_read...
rev 1
comedi_do_insn: EIO, good
I: testing insn_read_0...
not applicable
I: testing insn_read_time...
rev 1
not applicable
I: testing cmd_no_cmd...
got EIO, good
I: testing cmd_probe_src_mask...
not applicable
I: testing cmd_probe_fast_1chan...
not applicable
I: testing cmd_read_fast_1chan...
not applicable
I: testing cmd_write_fast_1chan...
not applicable
I: testing cmd_logic_bug...
not applicable
I: testing cmd_fifo_depth_check...
not applicable
I: testing cmd_start_inttrig...
not applicable
I: testing mmap...
not applicable
I: testing read_select...
not applicable
I: testing bufconfig...
buffer length is 0, good
I:
I: subdevice 1
I: testing info...
rev 1
I: subdevice type: 0 (unused)
I: testing insn_read...
rev 1
comedi_do_insn: EIO, good
I: testing insn_read_0...
not applicable
I: testing insn_read_time...
rev 1
not applicable
I: testing cmd_no_cmd...
got EIO, good
I: testing cmd_probe_src_mask...
not applicable
I: testing cmd_probe_fast_1chan...
not applicable
I: testing cmd_read_fast_1chan...
not applicable
I: testing cmd_write_fast_1chan...
not applicable
I: testing cmd_logic_bug...
not applicable
I: testing cmd_fifo_depth_check...
not applicable
I: testing cmd_start_inttrig...
not applicable
I: testing mmap...
not applicable
I: testing read_select...
not applicable
I: testing bufconfig...
buffer length is 0, good
I:
I: subdevice 2
I: testing info...
rev 1
I: subdevice type: 3 (digital input)
  number of channels: 4
  max data value: 255
  ranges:
    all chans: [1e-06,0]
I: testing insn_read...
rev 1
comedi_do_insn returned 1, good
I: testing insn_read_0...
comedi_do_insn returned 0, good
I: testing insn_read_time...
rev 1
comedi_do_insn: 3
read time: 3 us
I: testing cmd_no_cmd...
got EIO, good
I: testing cmd_probe_src_mask...
not applicable
I: testing cmd_probe_fast_1chan...
not applicable
I: testing cmd_read_fast_1chan...
not applicable
I: testing cmd_write_fast_1chan...
not applicable
I: testing cmd_logic_bug...
not applicable
I: testing cmd_fifo_depth_check...
not applicable
I: testing cmd_start_inttrig...
not applicable
I: testing mmap...
not applicable
I: testing read_select...
not applicable
I: testing bufconfig...
buffer length is 0, good


I noticed the the channels seem to be re-ordered, but the software
notices and acts appropriately, but when I read or write the DIO bits,
nothing happens on output and on input I always get 0xF7 no matter which
bits I have open or grounded.

Any help at all would be greatly appreciated.

Thanks in advance.

Bill Jennings
<bj_at_bigriverwirless.net>

Received on 2005-05-13Z16:17:02