Re: Fwd: Linux-gpib driver install fails to complete

Siloam via Linux-gpib-general <[email protected]> Tue, 10 Mar 2026 11:04:06 +0000
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============3237828547452318847==
Content-Type: multipart/alternative;
 boundary="------------8YrDxqH1OvJvNhxwAJejOw6t"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------8YrDxqH1OvJvNhxwAJejOw6t
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable


Just to add to my previous messsage, I compiled and installed the perl=20
binding whoch went without any problem.

I then created a small Perl test script for my HP34401A and got it to=20
return the IDN and a single measurement. Its seems that the Perl binding=
=20
works fine.

Still stuck on the Python binding.


On 10/03/2026 10:59, Siloam via Linux-gpib-general wrote:
>
> Sorry, I just realised that my messages are not going to the mailing=20
> list but directly to the individuals that have responded to my=20
> previous message. My apologies to the individuals concerned.
>
> Not sure why this is happening?
>
> I have copied the group address manually to the 'To:' field for this=20
> one so hopefully it will make to to the mailing list!
>
>
> -------- Forwarded Message --------
> Subject: 	Re: [Linux-gpib-general] Linux-gpib driver install fails to=20
> complete
> Date: 	Tue, 10 Mar 2026 09:53:02 +0000
> From: 	Siloam <[email protected]>
> To: 	Christian Grosz <[email protected]>
>
>
>
> That's a fair point.
>
> I had an idea it may have already been installed for compiling sigrok=20
> and pulseview, but nevertheless=C2=A0checked to be sure. There is alread=
y a=20
> ton of python stuff installed on that machine, including, as it=20
> happens python3-dev.
>
> I then checked the build configuration:
>
> Configuration:
> pdf documentation: no
> html documentation: no
> man pages: no
> Guile binding: no
> Perl binding: yes
> PHP binding: no
> Python binding: yes
> TCL binding: no
> sysconfdir: /usr/local/etc
>
> So yes, python binding is there.
>
> It also apparently has Perl binding, so it might be an interesting=20
> experiment to see if I can gpib working in Perl. Its been a while=20
> since I last used Perl though and these days python seems to be the=20
> preferred scripting language.
>
> I note that the python stuff is very old, so maybe its not designed=20
> for python3?
>
>
>
> On 10/03/2026 07:42, Christian Grosz wrote:
>> John,
>>
>> Did you check if the Python binding was enabled during configure? If no=
t
>> python3-devel is probably missing.
>>
>> ----
>> ...
>> Configuration:
>> SGML Documentation: no
>> Guile binding: no
>> Perl binding: yes
>> PHP binding: no
>> Python binding: yes
>> TCL binding: no
>> sysconfdir: /etc
>> ...
>> ----
>>
>> Christian
>>
>> On Mon, March 9, 2026 11:15 pm, Siloam wrote:
>>> Christian,
>>>
>>>
>>> Thanks, but I already have both of these packages installed.
>>>
>>>
>>> As it turns out, the drivers were getting copied into the kernel modul=
es
>>> directory anyway. I checked and since I didn't have secure boot enable=
d,
>>> lsmod reported that the tnt4882 driver was actually getting loaded.=20
>>> After
>>> building and installing the user packages, and following that running
>>> ldconfig, I was able to connect to my HP DMM with ibterm:
>>>
>>> $ ibterm -d 22
>>> Attempting to open /dev/gpib0
>>> pad =3D 22, sad =3D 0, timeout =3D 10, send_eoi =3D 1, eos_mode =3D 0x=
0000
>>> ibterm>*idn? HEWLETT-PACKARD,34401A,0,10-5-2
>>> ibterm>
>>>
>>> So far, so good. The hardware and driver appear to work.
>>>
>>>
>>> However, I can't get the python stuff to work. I ran make and make
>>> install, but python3 still does not find the module. I have to create =
a
>>> .toml file to get rid of the deprectation message, but the gpib module
>>> is still not being found.
>>>
>>> I was hoping that ibterm could do a bit more like read from secondary
>>> addresses for example, but at least it can do a basic connection and=
=20
>>> read.
>>> Python would be more flexible if I can get it to work:
>>>
>>>
>>> $ python3 test_gpib.py
>>> Traceback (most recent call last):
>>> =C2=A0 File "/home/johnc/Test/linux-gpib/test_gpib.py", line 1, in <mo=
dule>
>>> =C2=A0 =C2=A0 import gpib
>>> ModuleNotFoundError: No module named 'gpib'
>>>
>>>
>>> This is my test_gpib.py:
>>>
>>>
>>> import gpib
>>>
>>> # GPIB interface 0, address 22
>>> con =3D None try:
>>> =C2=A0 =C2=A0 con =3D gpib.dev(0,22)
>>> except gpib.GpibError as e: =C2=A0 =C2=A0 print(e)
>>> =C2=A0 =C2=A0 exit()
>>>
>>>
>>> status =3D gpib.write(con, "*IDN?") deviceID =3D gpib.read(con,=20
>>> 1000).decode()
>>> print("found device: " + deviceID)
>>>
>>> John.
>>
> --=20
> John.
>
>
>
> _______________________________________________
> Linux-gpib-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general

=2D-=20
John.

--------------8YrDxqH1OvJvNhxwAJejOw6t
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>
    <p><br>
    </p>
    <p>Just to add to my previous messsage, I compiled and installed the
      perl binding whoch went without any problem.</p>
    <p>I then created a small Perl test script for my HP34401A and got
      it to return the IDN and a single measurement. Its seems that the
      Perl binding works fine.</p>
    <p>Still stuck on the Python binding.</p>
    <br>
    <div class=3D"moz-cite-prefix">On 10/03/2026 10:59, Siloam via
      Linux-gpib-general wrote:<br>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:[email protected]">
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUT=
F-8">
      <p>Sorry, I just realised that my messages are not going to the
        mailing list but directly to the individuals that have responded
        to my previous message. My apologies to the individuals
        concerned.</p>
      <p>Not sure why this is happening?</p>
      <p>I have copied the group address manually to the 'To:' field for
        this one so hopefully it will make to to the mailing list!</p>
      <div class=3D"moz-forward-container"><br>
        -------- Forwarded Message --------
        <table cellpadding=3D"0" cellspacing=3D"0" border=3D"0"
          class=3D"moz-email-headers-table">
          <tbody>
            <tr>
              <th valign=3D"BASELINE" align=3D"RIGHT" nowrap=3D"nowrap">Su=
bject:
              </th>
              <td>Re: [Linux-gpib-general] Linux-gpib driver install
                fails to complete</td>
            </tr>
            <tr>
              <th valign=3D"BASELINE" align=3D"RIGHT" nowrap=3D"nowrap">Da=
te:
              </th>
              <td>Tue, 10 Mar 2026 09:53:02 +0000</td>
            </tr>
            <tr>
              <th valign=3D"BASELINE" align=3D"RIGHT" nowrap=3D"nowrap">Fr=
om:
              </th>
              <td>Siloam <a class=3D"moz-txt-link-rfc2396E"
                  href=3D"mailto:[email protected]" moz-do-not-send=3D"true">=
&lt;[email protected]&gt;</a></td>
            </tr>
            <tr>
              <th valign=3D"BASELINE" align=3D"RIGHT" nowrap=3D"nowrap">To=
: </th>
              <td>Christian Grosz <a class=3D"moz-txt-link-rfc2396E"
                  href=3D"mailto:[email protected]"
                  moz-do-not-send=3D"true">&lt;boeingflieger@centerofgravi=
ty.at&gt;</a></td>
            </tr>
          </tbody>
        </table>
        <br>
        <br>
        That's a fair point.<br>
        <br>
        I had an idea it may have already been installed for compiling
        sigrok and pulseview, but nevertheless=C2=A0checked to be sure. Th=
ere
        is already a ton of python stuff installed on that machine,
        including, as it happens python3-dev.<br>
        <br>
        I then checked the build configuration:<br>
        <br>
        Configuration:<br>
        pdf documentation: no<br>
        html documentation: no<br>
        man pages: no<br>
        Guile binding: no<br>
        Perl binding: yes<br>
        PHP binding: no<br>
        Python binding: yes<br>
        TCL binding: no<br>
        sysconfdir: /usr/local/etc<br>
        <br>
        So yes, python binding is there.<br>
        <br>
        It also apparently has Perl binding, so it might be an
        interesting experiment to see if I can gpib working in Perl. Its
        been a while since I last used Perl though and these days python
        seems to be the preferred scripting language.<br>
        <br>
        I note that the python stuff is very old, so maybe its not
        designed for python3?<br>
        <br>
        <br>
        <br>
        On 10/03/2026 07:42, Christian Grosz wrote:<br>
        <blockquote type=3D"cite">John,<br>
          <br>
          Did you check if the Python binding was enabled during
          configure? If not<br>
          python3-devel is probably missing.<br>
          <br>
          ----<br>
          ...<br>
          Configuration:<br>
          SGML Documentation: no<br>
          Guile binding: no<br>
          Perl binding: yes<br>
          PHP binding: no<br>
          Python binding: yes<br>
          TCL binding: no<br>
          sysconfdir: /etc<br>
          ...<br>
          ----<br>
          <br>
          Christian<br>
          <br>
          On Mon, March 9, 2026 11:15 pm, Siloam wrote:<br>
          <blockquote type=3D"cite">Christian,<br>
            <br>
            <br>
            Thanks, but I already have both of these packages installed.<b=
r>
            <br>
            <br>
            As it turns out, the drivers were getting copied into the
            kernel modules<br>
            directory anyway. I checked and since I didn't have secure
            boot enabled,<br>
            lsmod reported that the tnt4882 driver was actually getting
            loaded. After<br>
            building and installing the user packages, and following
            that running<br>
            ldconfig, I was able to connect to my HP DMM with ibterm:<br>
            <br>
            $ ibterm -d 22<br>
            Attempting to open /dev/gpib0<br>
            pad =3D 22, sad =3D 0, timeout =3D 10, send_eoi =3D 1, eos_mod=
e =3D
            0x0000<br>
            ibterm&gt;*idn? HEWLETT-PACKARD,34401A,0,10-5-2<br>
            ibterm&gt;<br>
            <br>
            So far, so good. The hardware and driver appear to work.<br>
            <br>
            <br>
            However, I can't get the python stuff to work. I ran make
            and make<br>
            install, but python3 still does not find the module. I have
            to create a<br>
            .toml file to get rid of the deprectation message, but the
            gpib module<br>
            is still not being found.<br>
            <br>
            I was hoping that ibterm could do a bit more like read from
            secondary<br>
            addresses for example, but at least it can do a basic
            connection and read.<br>
            Python would be more flexible if I can get it to work:<br>
            <br>
            <br>
            $ python3 test_gpib.py<br>
            Traceback (most recent call last):<br>
            =C2=A0 File "/home/johnc/Test/linux-gpib/test_gpib.py", line 1=
,
            in &lt;module&gt;<br>
            =C2=A0 =C2=A0 import gpib<br>
            ModuleNotFoundError: No module named 'gpib'<br>
            <br>
            <br>
            This is my test_gpib.py:<br>
            <br>
            <br>
            import gpib<br>
            <br>
            # GPIB interface 0, address 22<br>
            con =3D None try:<br>
            =C2=A0 =C2=A0 con =3D gpib.dev(0,22)<br>
            except gpib.GpibError as e: =C2=A0 =C2=A0 print(e)<br>
            =C2=A0 =C2=A0 exit()<br>
            <br>
            <br>
            status =3D gpib.write(con, "*IDN?") deviceID =3D gpib.read(con=
,
            1000).decode()<br>
            print("found device: " + deviceID)<br>
            <br>
            John.<br>
          </blockquote>
          <br>
        </blockquote>
        <pre class=3D"moz-signature">--=20
John.

</pre>
      </div>
      <br>
      <fieldset class=3D"moz-mime-attachment-header"></fieldset>
      <br>
      <fieldset class=3D"moz-mime-attachment-header"></fieldset>
      <pre wrap=3D"" class=3D"moz-quote-pre">_____________________________=
__________________
Linux-gpib-general mailing list
<a class=3D"moz-txt-link-abbreviated" href=3D"mailto:Linux-gpib-general@li=
sts.sourceforge.net">[email protected]</a>
<a class=3D"moz-txt-link-freetext" href=3D"https://lists.sourceforge.net/l=
ists/listinfo/linux-gpib-general">https://lists.sourceforge.net/lists/list=
info/linux-gpib-general</a>
</pre>
    </blockquote>
    <pre class=3D"moz-signature" cols=3D"72">--=20
John.</pre>
  </body>
</html>

--------------8YrDxqH1OvJvNhxwAJejOw6t--


--===============3237828547452318847==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3237828547452318847==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general

--===============3237828547452318847==--