[comedi] Re: Comedi Driver with LPCIe-7250 problem
Gus Cerda <[email protected]> Tue, 27 May 2025 02:54:55 -0700 (PDT)
| Newsgroups | gmane.linux.comedi |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_127778_545424946.1748339695862
Content-Type: multipart/alternative;
boundary="----=_Part_127779_1179220288.1748339695862"
------=_Part_127779_1179220288.1748339695862
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
This is the output of comedi_test:
*tramuntana:~/comedi_prova$ comedi_testI: Comedi version: 0.7.76I:=20
Comedilib version: unknown =3D)I: driver name: adl_pci7250I: device name:=
=20
pci7250I:I: subdevice 0I: testing info...rev 1I: subdevice type: 4 (digital=
=20
output) number of channels: 32 max data value: 1 ranges: all chans:=
=20
[0,5]I: testing insn_read...rev 1comedi_do_insn returned 1, goodI: testing=
=20
insn_read_0...comedi_do_insn returned 0, goodI: testing=20
insn_read_time...rev 1comedi_do_insn: 3read time: 1 usI: testing=20
cmd_no_cmd...got EIO, goodI: testing cmd_probe_src_mask...not applicableI:=
=20
testing cmd_probe_fast_1chan...not applicableI: testing=20
cmd_read_fast_1chan...not applicableI: testing cmd_write_fast_1chan...not=
=20
applicableI: testing cmd_logic_bug...not applicableI: testing=20
cmd_fifo_depth_check...not applicableI: testing cmd_start_inttrig...not=20
applicableI: testing mmap...not applicableI: testing read_select...not=20
applicableI: testing bufconfig...buffer length is 0, goodI:I: subdevice 1I:=
=20
testing info...rev 1I: subdevice type: 3 (digital input) number of=20
channels: 32 max data value: 1 ranges: all chans: [0,5]I: testing=20
insn_read...rev 1comedi_do_insn returned 1, goodI: testing=20
insn_read_0...comedi_do_insn returned 0, goodI: testing=20
insn_read_time...rev 1comedi_do_insn: 3read time: 4 usI: testing=20
cmd_no_cmd...got EIO, goodI: testing cmd_probe_src_mask...not applicableI:=
=20
testing cmd_probe_fast_1chan...not applicableI: testing=20
cmd_read_fast_1chan...not applicableI: testing cmd_write_fast_1chan...not=
=20
applicableI: testing cmd_logic_bug...not applicableI: testing=20
cmd_fifo_depth_check...not applicableI: testing cmd_start_inttrig...not=20
applicableI: testing mmap...not applicableI: testing read_select...not=20
applicableI: testing bufconfig...buffer length is 0, good*
El martes, 27 de mayo de 2025 a las 11:07:25 UTC+2, Gus Cerda escribi=C3=B3=
:
> Hi all,
> I'm working with ADlink LPCIe-7250 and comedi drivers, the driver loads=
=20
> correctly:
>
> *root@tramuntana:~# lspci | grep -i adlink*
>
> *41:00.0 DPIO module: Adlink Technology PCI-7250 (rev 01)*
>
>
> *root@tramuntana:~# dmesg | grep comedi*
>
> *[ 3.136992] comedi: loading out-of-tree module taints kernel.*
>
> *[ 3.143073] comedi: version 0.7.76.1 - http://www.comedi.org=20
> <https://cas5-0-urlprotect.trendmicro.com:443/wis/clicktime/v1/query?url=
=3Dhttp%3a%2f%2fwww.comedi.org&umid=3Dee5ef60d-3a1f-11f0-90ed-0022487ef3e8&=
rct=3D1748256931&auth=3D84fd7b44f3c6e5843978f04d97647fc72161b300-d6755bb34c=
5622b9b70ff2815b8ad8e134942afc>*
>
> *[ 3.162617] comedi0: adl_pci7250*
>
> *[ 3.162799] comedi: base addr 92001000*
>
> *[ 3.162804] comedi: attached*
>
> But when I try to capture channel 0 with this sample code:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *#include <comedilib.h>#include <stdio.h>int main(){ comedi_t *dev=
=20
> =3D comedi_open("/dev/comedi0"); if (!dev) { perror("comedi_open")=
; =20
> return 1; } int value; comedi_dio_read(dev, 1, =
0,=20
> &value); // Read subdevice 1, channel 0 printf("Input value: %d\n"=
,=20
> value); comedi_close(dev); return 0;}*
>
> I'm always receiving a "1", independently of applying voltage or not to=
=20
> the input.=20
>
> The card works fine in windows environment, for this input.
>
> Could someone give me an advice or something to look in order to make the=
=20
> card work under Linux?
>
> Thank you in advance.
>
--=20
You received this message because you are subscribed to the Google Groups "=
Comedi: Linux Control and Measurement Device Interface" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/comedi_list=
/99b7513f-d267-4e14-ab11-56791ac00d44n%40googlegroups.com.
------=_Part_127779_1179220288.1748339695862
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
This is the output of comedi_test:<div><b><i>tramuntana:~/comedi_prova$ com=
edi_test<br />I: Comedi version: 0.7.76<br />I: Comedilib version: unknown =
=3D)<br />I: driver name: adl_pci7250<br />I: device name: pci7250<br />I:<=
br />I: subdevice 0<br />I: testing info...<br />rev 1<br />I: subdevice ty=
pe: 4 (digital output)<br />=C2=A0 number of channels: 32<br />=C2=A0 max d=
ata value: 1<br />=C2=A0 ranges:<br />=C2=A0 =C2=A0 all chans: [0,5]<br />I=
: testing insn_read...<br />rev 1<br />comedi_do_insn returned 1, good<br /=
>I: testing insn_read_0...<br />comedi_do_insn returned 0, good<br />I: tes=
ting insn_read_time...<br />rev 1<br />comedi_do_insn: 3<br />read time: 1 =
us<br />I: testing cmd_no_cmd...<br />got EIO, good<br />I: testing cmd_pro=
be_src_mask...<br />not applicable<br />I: testing cmd_probe_fast_1chan...<=
br />not applicable<br />I: testing cmd_read_fast_1chan...<br />not applica=
ble<br />I: testing cmd_write_fast_1chan...<br />not applicable<br />I: tes=
ting cmd_logic_bug...<br />not applicable<br />I: testing cmd_fifo_depth_ch=
eck...<br />not applicable<br />I: testing cmd_start_inttrig...<br />not ap=
plicable<br />I: testing mmap...<br />not applicable<br />I: testing read_s=
elect...<br />not applicable<br />I: testing bufconfig...<br />buffer lengt=
h is 0, good<br />I:<br />I: subdevice 1<br />I: testing info...<br />rev 1=
<br />I: subdevice type: 3 (digital input)<br />=C2=A0 number of channels: =
32<br />=C2=A0 max data value: 1<br />=C2=A0 ranges:<br />=C2=A0 =C2=A0 all=
chans: [0,5]<br />I: testing insn_read...<br />rev 1<br />comedi_do_insn r=
eturned 1, good<br />I: testing insn_read_0...<br />comedi_do_insn returned=
0, good<br />I: testing insn_read_time...<br />rev 1<br />comedi_do_insn: =
3<br />read time: 4 us<br />I: testing cmd_no_cmd...<br />got EIO, good<br =
/>I: testing cmd_probe_src_mask...<br />not applicable<br />I: testing cmd_=
probe_fast_1chan...<br />not applicable<br />I: testing cmd_read_fast_1chan=
...<br />not applicable<br />I: testing cmd_write_fast_1chan...<br />not ap=
plicable<br />I: testing cmd_logic_bug...<br />not applicable<br />I: testi=
ng cmd_fifo_depth_check...<br />not applicable<br />I: testing cmd_start_in=
ttrig...<br />not applicable<br />I: testing mmap...<br />not applicable<br=
/>I: testing read_select...<br />not applicable<br />I: testing bufconfig.=
..<br />buffer length is 0, good</i></b><br /><br /></div><div class=3D"gma=
il_quote"><div dir=3D"auto" class=3D"gmail_attr">El martes, 27 de mayo de 2=
025 a las 11:07:25 UTC+2, Gus Cerda escribi=C3=B3:<br/></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rg=
b(204, 204, 204); padding-left: 1ex;">Hi all,<div>I'm working with ADli=
nk LPCIe-7250 and comedi drivers, the driver loads correctly:</div><div><p>=
<b><i><span style=3D"font-family:"Courier New"">root@tramuntana:~=
# lspci | grep -i adlink</span></i></b></p><p>
</p><p><b><i><span style=3D"font-family:"Courier New"">41:00.0 DP=
IO module: Adlink Technology
PCI-7250 (rev 01)</span></i></b></p><p><b><i><br></i></b></p><p><b><i><font=
face=3D"Courier New">root@tramuntana:~#
dmesg | grep comedi</font></i></b></p>
<p><b><i><font face=3D"Courier New">[=C2=A0=C2=A0=C2=A0
3.136992] comedi: loading out-of-tree module taints kernel.</font></i></b><=
/p>
<p><b><i><font face=3D"Courier New">[=C2=A0=C2=A0=C2=A0
3.143073] comedi: version 0.7.76.1 - <a href=3D"https://cas5-0-urlprotect.t=
rendmicro.com:443/wis/clicktime/v1/query?url=3Dhttp%3a%2f%2fwww.comedi.org&=
amp;umid=3Dee5ef60d-3a1f-11f0-90ed-0022487ef3e8&rct=3D1748256931&au=
th=3D84fd7b44f3c6e5843978f04d97647fc72161b300-d6755bb34c5622b9b70ff2815b8ad=
8e134942afc" target=3D"_blank" rel=3D"nofollow" data-saferedirecturl=3D"htt=
ps://www.google.com/url?hl=3Des&q=3Dhttps://cas5-0-urlprotect.trendmicr=
o.com:443/wis/clicktime/v1/query?url%3Dhttp%253a%252f%252fwww.comedi.org%26=
umid%3Dee5ef60d-3a1f-11f0-90ed-0022487ef3e8%26rct%3D1748256931%26auth%3D84f=
d7b44f3c6e5843978f04d97647fc72161b300-d6755bb34c5622b9b70ff2815b8ad8e134942=
afc&source=3Dgmail&ust=3D1748425836382000&usg=3DAOvVaw0v4BUvKQc=
h6Oa41dotr1MV">http://www.comedi.org</a></font></i></b></p>
<p><b><i><font face=3D"Courier New">[=C2=A0=C2=A0=C2=A0
3.162617] comedi0: adl_pci7250</font></i></b></p>
<p><b><i><font face=3D"Courier New">[=C2=A0=C2=A0=C2=A0
3.162799] comedi: base addr 92001000</font></i></b></p>
<p><b><i><font face=3D"Courier New">[=C2=A0=C2=A0=C2=A0
3.162804] comedi: attached</font></i></b></p><p>But when I try to capture c=
hannel 0 with this sample code:</p><p><b><i>#include <comedilib.h><br=
>#include <stdio.h><br>int main()<br>{<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=
comedi_t *dev =3D comedi_open("/dev/comedi0");<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 if (!dev) { perror("comedi_open");<br>=C2=A0 =C2=A0=
=C2=A0 =C2=A0 return 1;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 int value;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 comedi_dio_r=
ead(dev, 1, 0, &value); // Read subdevice 1, channel 0<br>=C2=A0 =C2=A0=
=C2=A0 =C2=A0 printf("Input value: %d\n", value);<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0=C2=A0comedi_close(dev);<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 re=
turn 0;<br>}</i></b><br></p><p>I'm always receiving a "1", in=
dependently of applying voltage or not to the input.=C2=A0</p><p>The card w=
orks fine in windows environment, for this input.</p><p>Could someone give =
me an advice or something to look in order to make the card work under Linu=
x?</p><p>Thank you in advance.</p></div></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Comedi: Linux Control and Measurement Device Interface" group.<br=
/>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">comedi_=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
comedi_list/99b7513f-d267-4e14-ab11-56791ac00d44n%40googlegroups.com?utm_me=
dium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/comedi_=
list/99b7513f-d267-4e14-ab11-56791ac00d44n%40googlegroups.com</a>.<br />
------=_Part_127779_1179220288.1748339695862--
------=_Part_127778_545424946.1748339695862--