[comedi] Comedi Driver with LPCIe-7250 problem

Gus Cerda <[email protected]> Tue, 27 May 2025 00:01:40 -0700 (PDT)
Newsgroups gmane.linux.comedi
Message-ID <[email protected]>
------=_Part_292194_87622605.1748329300089
Content-Type: multipart/alternative; 
	boundary="----=_Part_292195_645978632.1748329300089"

------=_Part_292195_645978632.1748329300089
Content-Type: text/plain; charset="UTF-8"

Hi all,
I'm working with ADlink LPCIe-7250 and comedi drivers, the driver loads 
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 
<https://cas5-0-urlprotect.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fwww.comedi.org&umid=ee5ef60d-3a1f-11f0-90ed-0022487ef3e8&rct=1748256931&auth=84fd7b44f3c6e5843978f04d97647fc72161b300-d6755bb34c5622b9b70ff2815b8ad8e134942afc>*

*[    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 = 
comedi_open("/dev/comedi0");        if (!dev) { perror("comedi_open");      
  return 1;         }        int value;        comedi_dio_read(dev, 1, 0, 
&value); // Read subdevice 1, channel 0        printf("Input value: %d\n", 
value);        comedi_close(dev);        return 0;}*

I'm always receiving a "1", independently of applying voltage or not to the 
input. 

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 
card work under Linux?

Thank you in advance.

-- 
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 email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/comedi_list/4ef36604-4f17-43c1-b9cb-22fbacad3a06n%40googlegroups.com.

------=_Part_292195_645978632.1748329300089
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi all,<div>I'm working with ADlink LPCIe-7250 and comedi drivers, the driv=
er loads correctly:</div><div><p><b><i><span style=3D"font-family: &quot;Co=
urier New&quot;;">root@tramuntana:~# lspci | grep -i adlink</span></i></b><=
/p><p>

</p><p><b><i><span style=3D"font-family: &quot;Courier New&quot;;">41:00.0 =
DPIO module: Adlink Technology
PCI-7250 (rev 01)</span></i></b></p><p><b><i><br /></i></b></p><p><b><i><fo=
nt 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&amp;rct=3D1748256931&amp;au=
th=3D84fd7b44f3c6e5843978f04d97647fc72161b300-d6755bb34c5622b9b70ff2815b8ad=
8e134942afc" target=3D"_blank">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 &lt;comedilib.h&gt;<br=
 />#include &lt;stdio.h&gt;<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=
_read(dev, 1, 0, &amp;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 ret=
urn 0;<br />}</i></b><br /></p><p>I'm always receiving a "1", independently=
 of applying voltage or not to the input.=C2=A0</p><p>The card works fine i=
n windows environment, for this input.</p><p>Could someone give me an advic=
e or something to look in order to make the card work under Linux?</p><p>Th=
ank you in advance.</p></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Comedi: Linux Control and Measurement Device Interface&quot; 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/4ef36604-4f17-43c1-b9cb-22fbacad3a06n%40googlegroups.com?utm_me=
dium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/comedi_=
list/4ef36604-4f17-43c1-b9cb-22fbacad3a06n%40googlegroups.com</a>.<br />

------=_Part_292195_645978632.1748329300089--

------=_Part_292194_87622605.1748329300089--