LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using USB 6009 on Ubuntu 12.04

So I've read many forums on this and it seems to be a common issue, which no one has figured out (from what I've read so far). I need to have the USB 6009 working on Ubuntu 12.04 for some field experiments and I don't have alternatives / options.

 

I decided to go ahead and try installing the drives. I found this page (http://maztories.blogspot.sg/2013/03/ni-usb-6008-card-can-be-installed-in.html) which I thought explained the steps in a simple way. I was able to install the latest versions of NI-KAL and NI-VISA with the steps mentioned. But I had problems installing NI-DAQmx Base.

 

I reached this point (alien -k --scripts *.rpm) where I got the error, the rpm packages are 32-bit (i386) and cannot be extracted on a 64-bit machine. I started looking at alternative ways to convert the RPM files to DEB.

 

I tried the steps below mentioned in this link (http://askubuntu.com/questions/215624/alien-cannot-built-package-for-architecture-ubuntu-amd64) but was stuck again at "...labview2010 / 2011 / 2012..." RPM files, which didn't have an "install" folder.

 

alien --to-tgz --scripts file.i386.rpm
mkdir unpack
cd unpack
tar -xpzf ../file.tgz
mv install ..
cp -rv * /
cd ../install
./doinst.sh

 

I continued looking for alternatives and found this link

 

and I followed the steps below.

 

The process is quite easy, in short you need to modify the control file and that's it.

sudo alien -g package-name.rpm
cd package-dir/
sudo vi debian/control

Now change the architecture (i386 in my case) to be the one you need. For example, I added the amd64 archicture and this is how the line ended up:

Architecture: i386, amd64

Last step:

sudo debian/rules binary

This will produce the .deb file.

 

I was able to create the DEB files successfully. I tried the next step of installing DEB file (dpkg -i *.deb) and it worked! I followed the remaining steps until ./updateNIDrivers and everything worked fine.

 

After this, I updated the firmware on DAQ to that of DAQmx base since I had used it on windows machine with DAQmx earlier. I followed the steps in these links:

https://forums.ni.com/t5/Example-Code/How-to-Update-Firmware-on-the-NI-USB-6008-6009-for-Use-with-th...

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MetSAE&l=en-US

 

I went back to Linux and tried connecting the USB DAQ. The LED light on the DAQ blinks. I tried the lsusb command and I get the following:

 

$ lsusb
Bus 002 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 002 Device 004: ID 3923:717b National Instruments Corp.
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 05ca:1814 Ricoh Co., Ltd HD Webcam
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I see National Instruments Corp. as one device which means the DAQ is being recognized. But when I type lsdaq I get the following: 

 

/usr/local/natinst/nidaqmxbase/bin$ lsdaq
--------------------------------
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
/usr/local/bin/lsdaq: line 7: /etc/natinst/nidaqmxbase/bin/daqmxbase_listdevices: No such file or directory
--------------------------------

I'm not sure what to do after this point. Since the error says No such file or directory, I don't know if the NI DAQmx base installed properly. Are the steps that I followed correct? Is converting RPM to DEB in the way I mentioned the right way? 

 

Any suggestions would be greatly appreciated. I really need to get this working.

 

Thanks!

0 Kudos
Message 1 of 9
(5,463 Views)

Hi s.vignesh,

 

I'm trying to install the same device on the same version of Ubuntu. I've followed your instructions but something goes wrong because when I do from terminal "lsdaq" I have "command not found". Besides when I try to make the examples I have "gcc -O2 -m32 readWriteDigPort.c -lnidaqmxbase -o readWriteDigPort readWriteDigPort.c:35:25: fatal error: NIDAQmxBase.h: File or directory not exists".

How can I check if I have correctly installed NI-DAQmx Base?

When have you done

sudo alien -g package-name.rpm

have you put "--scripts" flag?

I hope to solve this problem so I can help you since we have the same device and the same OS.

Thanks!




0 Kudos
Message 2 of 9
(5,186 Views)

Hello all,

 

I am also having a problem getting this working. 

It was installed on an old i386 machine with Redhat, but I am now trying to move it to a new amd64 machine with Ubuntu as the old PC died.

 

I have used alien -g name.rpm and /debian/rules library to create the deb files.  dpkg -i installed them ok.


When I try to compile any code that has #INCLUDE "NIDAQmxBase.h" it gives a fatal error : No such file or directory.

I added the location of this file /usr/local/natinst/nidaqmxbase/include/ to the path but still got the same error when I run gcc.

 

I created a Makefile and added includes=I/usr/local/natinst/nidaqmxbase/include/

This has got me past the missing NIDAQmxBase.h problem but now it cannot find lnidamxbase lnidaqmxbaselv and llvrtdark

 

I tried adding nilibs=-lnidamxbase -lnidaqmxbaselv -llvrtdark to the makefile with out any luck. 

I do not know much about LD so I am not sure if I still have an issue there.

 

I also do not have the lsdaq command in the bin directory so I may not have successfully installed the ni software packages.

Has anyone managed to solve the USB6009 on a 64 bit Debian base at all?

I am running Ubuntu 12.04 64bit.

 

Hopefully between us all we can crack this for debian based machines.

 


s.vignesh  wrote:

 

I continued looking for alternatives and found this link

 

and I followed the steps below.

 

The process is quite easy, in short you need to modify the control file and that's it.

sudo alien -g package-name.rpm
cd package-dir/
sudo vi debian/control


 


s.vignesh, your link to these steps is not showing up.  Can you repost it.  I am not sure what other steps you did after the dpkg -i

Regards,

Phil

 

0 Kudos
Message 3 of 9
(5,039 Views)

@CDSCC-Phil wrote:
 

I have used alien -g name.rpm and /debian/rules library to create the deb files.  dpkg -i installed them ok.

 

 


I meant debian/rules binary here.

0 Kudos
Message 4 of 9
(5,032 Views)

Hi, did you succed ? I'm using ubuntu 14.10 and I wonder if it is a good idea to try it... some advice?

BoF
0 Kudos
Message 5 of 9
(4,859 Views)

No we did not suceed with this.  We are going to switch back to a Red Hat/Fedora release for the machine that needs to read the power meters as it was starting to waste to many man hours to fix this issue.  Good luck with your attempts though.

0 Kudos
Message 6 of 9
(4,778 Views)

http://www.ni.com/labview/os-support/ 

 

Is there anything that's forcing you to use an unsupported OS?  It's not surprising you're running into driver issues.

0 Kudos
Message 7 of 9
(4,748 Views)

Not really.  Work was attempting to migrate software from a very old pc that was used for Radio Astronomy support.  By the time I was asked to help, the new machine had been purchased and configured with Ubuntu at another persons request.


I eventually told them it was wasting my time trying to get this system working and if they wanted the power meters working again to look at rebuilding the machine with a supported OS.

0 Kudos
Message 8 of 9
(4,737 Views)

As NI still refuses to disclose any specs on their devices, nor the driver source code, they just can't (legally) support anything but extremly ancient kernels for USB devices.

 

Point is, aeons ago, the USB subsystem maintainers made clear they insist in the GPL and marked the symbols as gpl-only. So, proprietary kernel modules are not allowed to link against / use the usb subsystem anymore.

 

If you really want to use their proprietary and conceptionally broken NIKAL for USB devices, you'll have to go for an extremly old kernel, which likely lacks support for many many things (eg. non-ancient hardware) and is completely unmaintained / unsupported. And that would most likely imply an similarily ancient distro (as newer ones need newer kernel features), so you'll have to run an really ancient and completely unsupport system. A big security risk. Nobody will help you - you're completely alone in the dark.

 

Unless you're an Linux systems programming expert, just don't do it.

 

Don't blame the kernel community - they just enforce the license the linux kernel always had.

NI broke the rules.

 

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 9 of 9
(3,866 Views)