Linux Users

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

I then installed pyvisa, and when I tried to import it says:

"OSError: /usr/local/vxipnp/linux/bin/libvisa.so.7: cannot open shared object file: No such file or directory"

Unfortunately pyvisa depends on NI-VISA (which will provide that shared object file).  If you aren't already aware VISA is essentially a bus abstraction layer that allows you to communicate over a variety of buses using essentially the same API.  NI-VISA supports each of these buses with plugins called "passports".  NI-VISA does have a GPIB passport, but it depends on the NI-488.2 driver not the open source driver.

The good news is that you don't need to use VISA or pyvisa to use your device.  The open source driver provides a C API and provides a Python interface.  I haven't used the Python interface so it may not be quite as easy to use as pyvisa but at least you will be able to use your device.

--

Shawn

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 11 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

Dear Shawn

Thank you again.  I must say I'm still quite moved by the claim in the NI GPIB-USB-HS brochure that Linux is a supported operating system.

It seems that I'm not the only one having these problems:

http://decibel.ni.com/content/thread/4231

http://forums.ni.com/ni/board/message?board.id=140&thread.id=32485

It's a bit frustrating - I unfortunately don't have days and days to get this running.  Do you think it's possible that the reason your market is mostly windows is because users eventually throw up their hands and go back there?  Two years of saying, "maybe, one day NI will support Debian" is starting to sound like we're being fobbed off.

Anyway, I don't want to take out my frustrations on you, because you're at least trying to help on the forums, which I appreciate.

Regarding the python interface I see the documentation for the Linux-GPIB here:

http://linux-gpib.sourceforge.net/doc_html/index.html

but there is nothing about python, and stuff that is far to abstruse for me regarding API.  Can you share your source of info about the python interface?  I saw there was a file in the repos, which I installed, but unfortunately it didn't download the knowledge of how to use it into my brain...

0 Kudos
Message 12 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

By the way, how can I get a copy of the NI-488.2 software for Linux (779705-01) according to the brochure?

0 Kudos
Message 13 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

Can you tell me:  am I just banging my head against a wall futilely because NI kernel support has lagged behind linux kernel development?

0 Kudos
Message 14 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

Hey glenton,

I should mention that I don't work for NI (anymore).  I can't even be considered a NI customer as I don't own or use any of their hardware or software.  But since I used to work there I just happen to know a bit more than the average customer and help out when I can.

Now about the open source gpib drivers and Python.  I've never used it, but their front page says they provide a Python interface.  My next step was to download the source from their page and run:

find . -name "*.py"
./language/python/gpibtest.py
./language/python/setup.py
./language/python/Gpib.py

So there you have it.  I see several Python files and I'm guessing it shouldn't be too hard to figure out how to use them.  You mentioned you installed from the deb package in your distribution.  I'm sure you can list the files it installed to see if there are any Python files.

As far as your questions about why you are having difficulties in general.  NI doesn't claim to support "Linux".  They support a couple Linux distributions and only specific versions of those distributions.  And they have to do it that way because the open source nature of Linux means that each distribution can be different and that things change often.  If you pick an old Linux distribution like RHEL 5 (or CentOS 5 if you don't want to pay), the NI drivers should work fine.

Now you specifically asked about lagging behind Linux kernel development.  That is part of the problem, but the real issue is that the NI drivers are not GPL Licensed, and aren't in the upstream kernel.  If they were open source anyone could fix them and it would be much easier to not lag behind (This is why the open source GPIB driver actually works).  But more importantly the reason your USB devices doesn't work with the NI drivers on kernels 2.6.25+ is simply because of a license conflict (they are not GPL licensed).  So if I were a NI customer I would use the open source GPIB driver and/or the open source DAQ drivers (COMEDI) since they would allow me to be confident that things are more likely to keep working on a larger variety of distributions and kernels.  If the open source drivers are lacking a feature you need ask I would ask for the feature on the projects mailing list.  You can also talk to your local NI sales rep and explain your Linux requirements.

--

Shawn

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 15 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

Dear Shawn-

I would just like to respond to your comment: "They support a couple Linux distributions and only specific versions of those distributions.  And they have to do it that way because the open source nature of Linux means that each distribution can be different and that things change often."

Don't you find it obvious that the problem here is NI, not the open source community?  If NI would just open-source their drivers and code, this would not be an issue.  And there's no reason not to do it.  the value-add proposition from National Instruments is in the equipment and in the LabView package... not some stupid drivers.  So for those of us who are just trying to use the equipment for a few small drivers, and don't need a massive package like LabView... this is important.

Unfortunately, my view right now is that National Instruments simply doesn't care about people trying to use their code, or their equipment.  And frankly, that's a shame.  Because one little guy who starts up a small project (in my case, for a big company) can turn into huge orders if successful.... and if not successful, due to difficulties with using NI code or tools... then nothing.  No money for NI, and no turning a small project into a big one.

Basically, until this is resolved, my view is that NI just doesn't care.

Message 16 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

NI has a lot of IP that we're trying to protect. IP and open-source just don't mix. Having said that, there is hope. Basically money talks. The real problem here is that we don't have enough data as to how much money/market-share there is out there for the open source solution. We have tried getting into the Linux support using the closed-source driver and that helped some. However, because of this, we have mostly data that supports the fact that big Linux customers don't really care about open source. We still don't have enough data that supports that supporting open-source driver will really be beneficial, so much so that it will override our letting-go-of-some-IP concerns. We can't just take gamble and take a leap of faith. Businesses can't survive well that way.

This is where you guys can help. If you care about NI open source driver, please talk to your NI representative in your area, so we have more data on how many customers and how many potentially big orders that we're losing for not supporting it.

NI is a business. We care about our customers, but we do have our limitations as to how we support certain customers (resources, IP concerns, etc) so we do need to be careful about where we would allocate our resources to tackle new market and support these customers.

0 Kudos
Message 17 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

Dear Shawn-

I would just like to respond to your comment: "They support a couple Linux distributions and only specific versions of those distributions.  And they have to do it that way because the open source nature of Linux means that each distribution can be different and that things change often."

Don't you find it obvious that the problem here is NI, not the open source community?  If NI would just open-source their drivers and code, this would not be an issue.  And there's no reason not to do it.  the value-add proposition from National Instruments is in the equipment and in the LabView package... not some stupid drivers.  So for those of us who are just trying to use the equipment for a few small drivers, and don't need a massive package like LabView... this is important.

Unfortunately, my view right now is that National Instruments simply doesn't care about people trying to use their code, or their equipment.  And frankly, that's a shame.  Because one little guy who starts up a small project (in my case, for a big company) can turn into huge orders if successful.... and if not successful, due to difficulties with using NI code or tools... then nothing.  No money for NI, and no turning a small project into a big one.

Basically, until this is resolved, my view is that NI just doesn't care.

I'll stand by my statement.  Even if National Instruments made all of their software and drivers open source they would be insane to "officially support" every Linux distribution that ever existed.  Instead they would do what they currently do and test their software on a few popular Linux distributions to ensure that everything works before claiming it is officially supported.  Now since you would have the source code you could always fix things yourself or pay a third party to provide whatever support you need.

Personally I wouldn't buy any National Instruments hardware unless there was an open source driver to support it.  Mostly because that is the only way I know I will always be able to use that hardware on new Linux versions in the future.  That may still mean that I have to fix the drivers myself or potentially pay a developer to do it for me.

The thing is that there are open source drivers for some National Instruments hardware.  So really the question is why aren't you using them?  That's not just a rhetorical question, I'm really curious why.

--

Shawn

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 18 of 35
(414 Views)
Highlighted

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

... because you can't use the open source drivers for GPIB cards with LabView / VISA.

If ni supported the open driver through VISA, that would make a lot of problems go away.

- Mike

0 Kudos
Message 19 of 35
(414 Views)

Re: How to Install GPIB driver NI-488.2 on Ubuntu 8.04

Unless the Open Source GPIB driver has a special exception clause that only would work if they made the whole VISA software open source. The Open source driver is GPL and without exception clause you can't link to GPL software without being GPL yourself.

It would appear to me that not every application out there using the Open Source GPIB driver is really GPL itself so they either are in violation of the GPL or there is an exception clause.

And of course you should be able to use the Open Source drivers with LabVIEW if you are not using VISA but the low level NI-488.2 nodes. The Open Source driver supposedly supports the NI-488.2 API last time I checked, the only problem is that it resides in a different shared library than the official NI lib. A soft link should be able to help with that. And of course you should be able to use the same trick even with VISA. If it all really works will mostly depend on how NI-488.2 compatible the Open Source GPIB driver API is.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 20 of 35
(418 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.