Re: [comedi] Comedi Driver with LPCIe-7250 problem

Ian Abbott <[email protected]> Wed, 28 May 2025 19:12:58 +0100
Newsgroups gmane.linux.comedi
Organization MEV Ltd.
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------DrmGBACWjdA9xT4QNY0haDsO
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable

On 28/05/2025 11:36, Gus Cerda wrote:
> Hi again,
> In a fresh boot state, the output for the test program you send me is:
>
> */Input bits: 0x000000C0/*
> */
> /*
> Only when I try to activate a relay on subdevice 0, the state of the=20
> inputs change to:
>
> */Input bits: 0x000000C1/*
> */
> /*
> But the relay is not working, I can't hear the sound of the relay=20
> commuting.
> The initial relay values on a fresh boot are the following:
>
> */Relay values: 0x00000000/*
> */Input bits: 0x000000C0/*
>
> When you write to all the outputs you can see this:
>
> */Relay values: 0x000000FF/*
> */Input bits: 0x000000C1/*
>
> But no relays change is noticed, no sound and tester doesn't show=20
> continuity between NO and COM pins.
> If you change relay values to 0 another time I realized that the input=20
> bits maintain the values until reboot, this is the result:
>
> */Relay values: 0x00000000/*
> */Input bits: 0x000000C1/*
> */
> /*
> Could be that the register offsets have changed on a revision of the card=
?
> Is there any method to check it?

That's all pretty weird. I don't think the register offsets will have=20
have changed unless there was some reason to do so, such as PCI bridge=20
chips going obsolete. I assume your card has the two PLX chips pictured=20
here (the small PEX 8112, and the large PLX PCI-9052):

LPCIe-7250

Basically, that's a cost-reduced version of the original ADLINK PCI-7250=20
(with extra connectors for the PCI-7250 extension cards removed), placed=20
behind a PCIe-to-PCI bridge (the PLX PEX-8112 chip). The PLX PCI-9052=20
chip is the one that maps PCI base address region 2 to the local bus=20
registers, with the logic for handling the individual registers=20
controlled by some of the other chips.

I've managed to find an original PCI-7250 going very cheap (about =C2=A317=
=20
UK) on eBay, so have bought it. (My current work PC is old enough to=20
still have some PCI slots!)

ADLINK do have some software for Ubuntu that works with very specific=20
kernel versions, but with no source code at all provided. Still, I may=20
be able to disassemble the code to try and work out what it's doing.


Ian


>
> Thank you.
>
>
> */
> /*
> */
> /*
> El martes, 27 de mayo de 2025 a las 15:26:17 UTC+2, Ian Abbott escribi=C3=
=B3:
>
>     On 27/05/2025 13:37, Gus Cerda wrote:
>>     Hi Ian,
>>
>>     This is the output without any input signals:
>>
>>     Input bits: 0x000000C1
>>
>>     Exciting some inputs doesn't make a difference. Any further test
>>     that I can make to check any incompatibility with current Kernels?
>
>     I do sometimes have to update the comedi module sources in the Git
>     repository to get them to build properly when new versions of the
>     kernel are released, but that is normal for out-of-tree Linux
>     kernel module development, and I don't think that's the problem
>     here. Some distros include pre-built comedi modules in their
>     kernel packages, in which case it is important not to mix and
>     match the comedi modules from the Linux kernel image with the
>     comedi modules built from Comedi's git repository, due to kernel
>     API differences between the two sets of modules. The usual symptom
>     in that case is that the low-level comedi driver module fails to
>     load, but it could also result in kernel OOPS messages.
>
>     It's interesting that some of the inputs are reading low, and some
>     of them are reading high, which is normal for floating inputs. But
>     it does suggest that its reading something.
>
>     Are the relay channels on subdevice 0 working? The relay channels
>     are both readable and writeable. Assuming all the relays are
>     de-energized on power up, I would expect the relay channels to
>     read back as 0 until they written, and turning single relay
>     channels on or off should not affect the other relays.
>
>     Ian
>
>>
>>     Thank you so much!!
>>
>>     El martes, 27 de mayo de 2025 a las 14:23:18 UTC+2, Ian Abbott
>>     escribi=C3=B3:
>>
>>         Hi Gus,
>>
>>         On 27/05/2025 08:01, Gus Cerda wrote:
>>>         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/*
>>>
>>>         */[=C2=A0=C2=A0=C2=A0 3.136992] comedi: loading out-of-tree mod=
ule taints
>>>         kernel./*
>>>
>>>         */[=C2=A0=C2=A0=C2=A0 3.143073] comedi: version 0.7.76.1 -
>>>         http://www.comedi.org
>>>         <https://cas5-0-urlprotect.trendmicro.com:443/wis/clicktime/v1/=
query?url=3Dhttp%3a%2f%2fwww.comedi.org&umid=3Dee5ef60d-3a1f-11f0-90ed-0022=
487ef3e8&rct=3D1748256931&auth=3D84fd7b44f3c6e5843978f04d97647fc72161b300-d=
6755bb34c5622b9b70ff2815b8ad8e134942afc>/*
>>>
>>>         */[=C2=A0=C2=A0=C2=A0 3.162617] comedi0: adl_pci7250/*
>>>
>>>         */[=C2=A0=C2=A0=C2=A0 3.162799] comedi: base addr 92001000/*
>>>
>>>         */[=C2=A0=C2=A0=C2=A0 3.162804] comedi: attached/*
>>>
>>>         But when I try to capture channel 0 with this sample code:
>>>
>>>         */#include <comedilib.h>
>>>         #include <stdio.h>
>>>         int main()
>>>         {
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 comedi_t *dev =3D comedi_open("/dev=
/comedi0");
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!dev) { perror("comedi_open");
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 return 1;
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 int value;
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 comedi_dio_read(dev, 1, 0, &value);=
 // Read
>>>         subdevice 1, channel 0
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("Input value: %d\n", value);
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0comedi_close(dev);
>>>         =C2=A0 =C2=A0 =C2=A0 =C2=A0 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?
>>>
>>         Apparently, I wrote this driver in 2015 (which was a surprise
>>         to me as I'd forgotten writing it!), based on the fairly
>>         simple register layout from the user manual, but I didn't
>>         test it myself. It was reported working by Emma Peace in this
>>         email:
>>
>>         https://groups.google.com/g/comedi_list/c/RaQGeavOr0U/m/aa-EadJx=
y8AJ
>>
>>         She wrote that she had tested input and output fairly heavily
>>         without any problems.
>>
>>         I don't know why it is not working for you. It's a fairly
>>         simple driver.
>>
>>         Could you try reading all dio inputs at once as a bitmask
>>         using the following sample code?
>>
>>         #include <comedilib.h>
>>         #include <stdio.h>
>>         int main()
>>         {
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 comedi_t *dev =3D co=
medi_open("/dev/comedi0");
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!dev) { perror("=
comedi_open");
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 1;
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unsigned int bits;
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 comedi_dio_bitfield(=
dev, 1, 0, &bits); // Get bits from subdevice 1
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 printf("Input bits: =
0x%08X\n", bits);
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 comedi_close(dev);
>>          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0;
>>         }
>>
>>         This will read all 32 digital inputs as a 32-bit value,
>>         although only channels 0 to 7 will be valid on the
>>         LPCIe-7250. (The other 24 channels are for the PCI-7250 with
>>         PCI-7251 extension cards fitted.) These 32 inputs are read
>>         from register offsets 1, 3, 5, and 7, 8 bits per register.
>>         (Register offsets 0, 2, 4, and 6, 8 bits per register are
>>         used to control the relays.)
>>
>>         Looking at the manual, one other thing to check is that the
>>         input signal jumpers JP1 to JP8 on the board are set to
>>         position 2-3 for Non-AC-Filter (DC signal), although it's
>>         probably OK as you already tested the input in Windows.
>>
>>
>>         I should really port this driver (assuming it is not
>>         completely broken) for inclusion in the Linux kernel. I
>>         probably meant to do that 10 years ago!
>>
>>>         Thank you in advance.
>>>
>>         I hope you manage to get it working!
>>
>>         Ian
>>
>>         --=20
>>         -=3D( Ian Abbott<[email protected]> || MEV Ltd. is a company  )=
=3D-
>>         -=3D( registered in England & Wales.  Regd. number: 02862268.  )=
=3D-
>>         -=3D( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=
=3D-
>>         -=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. ||www.mev.co.uk <h=
ttp://www.mev.co.uk> )=3D-
>>
>>     --=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 email to [email protected].
>>     To view this discussion visit
>>     https://groups.google.com/d/msgid/comedi_list/eb9922e1-5c85-4f96-a4d=
0-1972be315604n%40googlegroups.com
>>     <https://groups.google.com/d/msgid/comedi_list/eb9922e1-5c85-4f96-a4=
d0-1972be315604n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter>=
.
>
>
>     --=20
>     -=3D( Ian Abbott<[email protected]> || MEV Ltd. is a company  )=3D-
>     -=3D( registered in England & Wales.  Regd. number: 02862268.  )=3D-
>     -=3D( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=3D-
>     -=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. ||www.mev.co.uk <http:/=
/www.mev.co.uk> )=3D-
>
> --=20
> You received this message because you are subscribed to the Google=20
> Groups "Comedi: Linux Control and Measurement Device Interface" group.
> To unsubscribe from this group and stop receiving emails from it, send=20
> an email to [email protected].
> To view this discussion visit=20
> https://groups.google.com/d/msgid/comedi_list/75a066da-d8f3-437c-8cb1-e27=
c30d217f5n%40googlegroups.com=20
> <https://groups.google.com/d/msgid/comedi_list/75a066da-d8f3-437c-8cb1-e2=
7c30d217f5n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter>.


--=20
-=3D( Ian Abbott<[email protected]> || MEV Ltd. is a company  )=3D-
-=3D( registered in England & Wales.  Regd. number: 02862268.  )=3D-
-=3D( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=3D-
-=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. ||www.mev.co.uk )=3D-

--=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=
/62be0593-b3c0-420f-a295-c379c9650e89%40mev.co.uk.

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

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8=
">
  </head>
  <body>
    <div class=3D"moz-cite-prefix">On 28/05/2025 11:36, Gus Cerda wrote:<br=
>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:[email protected]">
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF=
-8">
      Hi again,
      <div>In a fresh boot state, the output for the test program you
        send me is:</div>
      <div>=C2=A0<br>
        <b><i>Input bits: 0x000000C0</i></b></div>
      <div><b><i><br>
          </i></b></div>
      <div>Only when I try to activate a relay on subdevice 0, the state
        of the inputs change to:</div>
      <div><br>
      </div>
      <div>=C2=A0<b><i>Input bits: 0x000000C1</i></b></div>
      <div><b><i><br>
          </i></b></div>
      <div>But the relay is not working, I can't hear the sound of the
        relay commuting.=C2=A0</div>
      <div>The initial relay values on a fresh boot are the following:</div=
>
      <div><br>
      </div>
      <div><b><i>Relay values: 0x00000000</i></b>=C2=A0</div>
      <div><b><i>Input bits: 0x000000C0</i></b></div>
      <div><br>
      </div>
      <div>When you write to all the outputs you can see this:</div>
      <div><br>
      </div>
      <div><b><i>Relay values: 0x000000FF</i></b></div>
      <div><b><i>Input bits: 0x000000C1</i></b></div>
      <div><br>
      </div>
      <div>But no relays change is noticed, no sound and tester doesn't
        show continuity between NO and COM pins.=C2=A0</div>
      <div>If you change relay values to 0 another time I realized that
        the input bits maintain the values until reboot, this is the
        result:</div>
      <div><br>
      </div>
      <div><b><i>Relay values: 0x00000000</i></b></div>
      <div><b><i>Input bits: 0x000000C1</i></b></div>
      <div><b><i><br>
          </i></b></div>
      <div>Could be that the register offsets have changed on a revision
        of the card?</div>
      <div>Is there any method to check it?</div>
    </blockquote>
    <p>That's all pretty weird. I don't think the register offsets will
      have have changed unless there was some reason to do so, such as
      PCI bridge chips going obsolete. I assume your card has the two
      PLX chips pictured here (the small PEX 8112, and the large PLX
      PCI-9052):</p>
    <img moz-do-not-send=3D"true"
src=3D"https://cdn.adlinktech.com.cn/webupd/products/images/792/LPCIe-7250_=
bimg_14.jpg"
      alt=3D"LPCIe-7250" width=3D"400" height=3D"353">
    <p>Basically, that's a cost-reduced version of the original ADLINK
      PCI-7250 (with extra connectors for the PCI-7250 extension cards
      removed), placed behind a PCIe-to-PCI bridge (the PLX PEX-8112
      chip). The PLX PCI-9052 chip is the one that maps PCI base address
      region 2 to the local bus registers, with the logic for handling
      the individual registers controlled by some of the other chips.</p>
    <p>I've managed to find an original PCI-7250 going very cheap (about
      =C2=A317 UK) on eBay, so have bought it. (My current work PC is old
      enough to still have some PCI slots!)<br>
    </p>
    <p>ADLINK do have some software for Ubuntu that works with very
      specific kernel versions, but with no source code at all provided.
      Still, I may be able to disassemble the code to try and work out
      what it's doing.</p>
    <p><br>
    </p>
    <p>Ian</p>
    <p><br>
    </p>
    <blockquote type=3D"cite"
      cite=3D"mid:[email protected]">
      <div><br>
      </div>
      <div>Thank you.</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><b><i><br>
          </i></b></div>
      <div><b><i><br>
          </i></b></div>
      <div class=3D"gmail_quote">
        <div dir=3D"auto" class=3D"gmail_attr">El martes, 27 de mayo de 202=
5
          a las 15:26:17 UTC+2, Ian Abbott escribi=C3=B3:<br>
        </div>
        <blockquote class=3D"gmail_quote"
style=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); pa=
dding-left: 1ex;">
          <div>
            <div>On 27/05/2025 13:37, Gus Cerda wrote:<br>
            </div>
            <blockquote type=3D"cite"> Hi Ian,
              <div><br>
              </div>
              <div>This is the output without any input signals:</div>
              <div><br>
              </div>
              <div>Input bits: 0x000000C1</div>
              <div><br>
              </div>
              <div>Exciting some inputs doesn't make a difference. Any
                further test that I can make to check any
                incompatibility with current Kernels?</div>
            </blockquote>
          </div>
          <div>
            <p> I do sometimes have to update the comedi module sources
              in the Git repository to get them to build properly when
              new versions of the kernel are released, but that is
              normal for out-of-tree Linux kernel module development,
              and I don't think that's the problem here. Some distros
              include pre-built comedi modules in their kernel packages,
              in which case it is important not to mix and match the
              comedi modules from the Linux kernel image with the comedi
              modules built from Comedi's git repository, due to kernel
              API differences between the two sets of modules. The usual
              symptom in that case is that the low-level comedi driver
              module fails to load, but it could also result in kernel
              OOPS messages.</p>
            <p>It's interesting that some of the inputs are reading low,
              and some of them are reading high, which is normal for
              floating inputs. But it does suggest that its reading
              something.<br>
            </p>
            <p>Are the relay channels on subdevice 0 working? The relay
              channels are both readable and writeable. Assuming all the
              relays are de-energized on power up, I would expect the
              relay channels to read back as 0 until they written, and
              turning single relay channels on or off should not affect
              the other relays.</p>
            <p>Ian<br>
            </p>
          </div>
          <div>
            <blockquote type=3D"cite">
              <div><br>
              </div>
              <div>Thank you so much!!<br>
                <br>
              </div>
              <div class=3D"gmail_quote">
                <div dir=3D"auto" class=3D"gmail_attr">El martes, 27 de may=
o
                  de 2025 a las 14:23:18 UTC+2, Ian Abbott escribi=C3=B3:<b=
r>
                </div>
                <blockquote class=3D"gmail_quote"
style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-=
left:1ex">
                  <div>
                    <div>Hi Gus,</div>
                  </div>
                  <div>
                    <div><br>
                    </div>
                    <div>On 27/05/2025 08:01, Gus Cerda wrote:<br>
                    </div>
                    <blockquote type=3D"cite"> Hi all,
                      <div>I'm working with ADlink LPCIe-7250 and comedi
                        drivers, the driver loads correctly:</div>
                      <div>
                        <p><b><i><span
style=3D"font-family:&quot;Courier 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><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.trendmicro.com:443/wis/clicktime/v1/query=
?url=3Dhttp%3a%2f%2fwww.comedi.org&amp;umid=3Dee5ef60d-3a1f-11f0-90ed-00224=
87ef3e8&amp;rct=3D1748256931&amp;auth=3D84fd7b44f3c6e5843978f04d97647fc7216=
1b300-d6755bb34c5622b9b70ff2815b8ad8e134942afc"
                                  rel=3D"nofollow" target=3D"_blank"
data-saferedirecturl=3D"https://www.google.com/url?hl=3Des&amp;q=3Dhttps://=
cas5-0-urlprotect.trendmicro.com:443/wis/clicktime/v1/query?url%3Dhttp%253a=
%252f%252fwww.comedi.org%26umid%3Dee5ef60d-3a1f-11f0-90ed-0022487ef3e8%26rc=
t%3D1748256931%26auth%3D84fd7b44f3c6e5843978f04d97647fc72161b300-d6755bb34c=
5622b9b70ff2815b8ad8e134942afc&amp;source=3Dgmail&amp;ust=3D174851229827300=
0&amp;usg=3DAOvVaw14XbkgLH930TVFkc9gh1v1"
                                  moz-do-not-send=3D"true">http://www.comed=
i.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 channel 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) { perro=
r("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(d=
ev, 1, 0,
                              &amp;value); // Read subdevice 1, channel
                              0<br>
                              =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("Input val=
ue: %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 return 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 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
                          Linux?</p>
                      </div>
                    </blockquote>
                  </div>
                  <div>
                    <p>Apparently, I wrote this driver in 2015 (which
                      was a surprise to me as I'd forgotten writing
                      it!), based on the fairly simple register layout
                      from the user manual, but I didn't test it myself.
                      It was reported working by Emma Peace in this
                      email:<br>
                    </p>
                    <p><a
href=3D"https://groups.google.com/g/comedi_list/c/RaQGeavOr0U/m/aa-EadJxy8A=
J"
                        rel=3D"nofollow" target=3D"_blank"
data-saferedirecturl=3D"https://www.google.com/url?hl=3Des&amp;q=3Dhttps://=
groups.google.com/g/comedi_list/c/RaQGeavOr0U/m/aa-EadJxy8AJ&amp;source=3Dg=
mail&amp;ust=3D1748512298273000&amp;usg=3DAOvVaw2n1CiyKb6LwIWkTUqLQ492"
                        moz-do-not-send=3D"true"
                        class=3D"moz-txt-link-freetext">https://groups.goog=
le.com/g/comedi_list/c/RaQGeavOr0U/m/aa-EadJxy8AJ</a><br>
                    </p>
                    <p>She wrote that she had tested input and output
                      fairly heavily without any problems.</p>
                    <p>I don't know why it is not working for you. It's
                      a fairly simple driver.</p>
                    <p>Could you try reading all dio inputs at once as a
                      bitmask using the following sample code?</p>
                    <pre>#include &lt;comedilib.h&gt;
#include &lt;stdio.h&gt;
int main()
{
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 comedi_t *dev =3D comedi_open("/=
dev/comedi0");
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!dev) { perror("comedi_open"=
);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 1;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unsigned int bits;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 comedi_dio_bitfield(dev, 1, 0, &=
amp;bits); // Get bits from subdevice 1
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 printf("Input bits: 0x%08X\n", b=
its);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 comedi_close(dev);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0;
}
</pre>
                    <p>This will read all 32 digital inputs as a 32-bit
                      value, although only channels 0 to 7 will be valid
                      on the LPCIe-7250. (The other 24 channels are for
                      the PCI-7250 with PCI-7251 extension cards
                      fitted.) These 32 inputs are read from register
                      offsets 1, 3, 5, and 7, 8 bits per register.
                      (Register offsets 0, 2, 4, and 6, 8 bits per
                      register are used to control the relays.)<br>
                    </p>
                    <p>Looking at the manual, one other thing to check
                      is that the input signal jumpers JP1 to JP8 on the
                      board are set to position 2-3 for Non-AC-Filter
                      (DC signal), although it's probably OK as you
                      already tested the input in Windows.</p>
                    <p><br>
                    </p>
                    <p>I should really port this driver (assuming it is
                      not completely broken) for inclusion in the Linux
                      kernel. I probably meant to do that 10 years ago!<br>
                    </p>
                    <blockquote type=3D"cite">
                      <div>
                        <p>Thank you in advance.</p>
                      </div>
                    </blockquote>
                    <p>I hope you manage to get it working!<br>
                    </p>
                    <p>Ian<br>
                    </p>
                    <pre cols=3D"72">--=20
-=3D( Ian Abbott <a rel=3D"nofollow" moz-do-not-send=3D"true">&lt;abb...@me=
v.co.uk&gt;</a> || MEV Ltd. is a company  )=3D-
-=3D( registered in England &amp; Wales.  Regd. number: 02862268.  )=3D-
-=3D( Regd. addr.: S11 &amp; 12 Building 67, Europa Business Park, )=3D-
-=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || <a
                    href=3D"http://www.mev.co.uk" rel=3D"nofollow"
                    target=3D"_blank"
data-saferedirecturl=3D"https://www.google.com/url?hl=3Des&amp;q=3Dhttp://w=
ww.mev.co.uk&amp;source=3Dgmail&amp;ust=3D1748512298273000&amp;usg=3DAOvVaw=
0C0nRYbNpDQH0MktY5EpIC"
                    moz-do-not-send=3D"true">www.mev.co.uk</a> )=3D-</pre>
                  </div>
                </blockquote>
              </div>
            </blockquote>
          </div>
          <div>
            <blockquote type=3D"cite"> -- <br>
              You received this message because you are subscribed to
              the Google Groups "Comedi: Linux Control and Measurement
              Device Interface" group.<br>
              To unsubscribe from this group and stop receiving emails
              from it, send an email to <a href=3D"" data-email-masked=3D""
                rel=3D"nofollow" moz-do-not-send=3D"true">comedi_list...@go=
oglegroups.com</a>.<br>
              To view this discussion visit <a
href=3D"https://groups.google.com/d/msgid/comedi_list/eb9922e1-5c85-4f96-a4=
d0-1972be315604n%40googlegroups.com?utm_medium=3Demail&amp;utm_source=3Dfoo=
ter"
                target=3D"_blank" rel=3D"nofollow"
data-saferedirecturl=3D"https://www.google.com/url?hl=3Des&amp;q=3Dhttps://=
groups.google.com/d/msgid/comedi_list/eb9922e1-5c85-4f96-a4d0-1972be315604n=
%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&amp;source=
=3Dgmail&amp;ust=3D1748512298273000&amp;usg=3DAOvVaw3pLdHlRJo26yCa9zj-12xv"
                moz-do-not-send=3D"true">https://groups.google.com/d/msgid/=
comedi_list/eb9922e1-5c85-4f96-a4d0-1972be315604n%40googlegroups.com</a>.<b=
r>
            </blockquote>
          </div>
          <div>
            <p><br>
            </p>
            <pre cols=3D"72">--=20
-=3D( Ian Abbott <a href=3D"" data-email-masked=3D"" rel=3D"nofollow"
            moz-do-not-send=3D"true">&lt;[email protected]&gt;</a> || MEV Lt=
d. is a company  )=3D-
-=3D( registered in England &amp; Wales.  Regd. number: 02862268.  )=3D-
-=3D( Regd. addr.: S11 &amp; 12 Building 67, Europa Business Park, )=3D-
-=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || <a
            href=3D"http://www.mev.co.uk" target=3D"_blank" rel=3D"nofollow=
"
data-saferedirecturl=3D"https://www.google.com/url?hl=3Des&amp;q=3Dhttp://w=
ww.mev.co.uk&amp;source=3Dgmail&amp;ust=3D1748512298273000&amp;usg=3DAOvVaw=
0C0nRYbNpDQH0MktY5EpIC"
            moz-do-not-send=3D"true">www.mev.co.uk</a> )=3D-</pre>
          </div>
        </blockquote>
      </div>
      -- <br>
      You received this message because you are subscribed to the Google
      Groups "Comedi: Linux Control and Measurement Device Interface"
      group.<br>
      To unsubscribe from this group and stop receiving emails from it,
      send an email to <a
        href=3D"mailto:[email protected]"
        moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">comedi_lis=
[email protected]</a>.<br>
      To view this discussion visit <a
href=3D"https://groups.google.com/d/msgid/comedi_list/75a066da-d8f3-437c-8c=
b1-e27c30d217f5n%40googlegroups.com?utm_medium=3Demail&amp;utm_source=3Dfoo=
ter"
        moz-do-not-send=3D"true">https://groups.google.com/d/msgid/comedi_l=
ist/75a066da-d8f3-437c-8cb1-e27c30d217f5n%40googlegroups.com</a>.<br>
    </blockquote>
    <p><br>
    </p>
    <pre class=3D"moz-signature" cols=3D"72">--=20
-=3D( Ian Abbott <a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:abbotti@=
mev.co.uk">&lt;[email protected]&gt;</a> || MEV Ltd. is a company  )=3D-
-=3D( registered in England &amp; Wales.  Regd. number: 02862268.  )=3D-
-=3D( Regd. addr.: S11 &amp; 12 Building 67, Europa Business Park, )=3D-
-=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || <a class=3D"moz-txt-link-a=
bbreviated" href=3D"http://www.mev.co.uk">www.mev.co.uk</a> )=3D-</pre>
  </body>
</html>

<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/62be0593-b3c0-420f-a295-c379c9650e89%40mev.co.uk?utm_medium=3De=
mail&utm_source=3Dfooter">https://groups.google.com/d/msgid/comedi_list/62b=
e0593-b3c0-420f-a295-c379c9650e89%40mev.co.uk</a>.<br />

--------------DrmGBACWjdA9xT4QNY0haDsO--