LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with raw usb access under linux

We are currently evaluating the VISA raw USB interface to interface a device with LabVIEW. Under Windows we didn't have any problems getting it work, but Linux is giving us a hard time. I'm testing on a SUSE 10.0 distribution with LabVIEW 8.2 and VISA 4.0 (NI-KAL 1.4). I read the requirements about the usbfs and the permissions to access a device. I'm getting the following results:
 
When I run labview as a normal user I don't see the USB device when I use VISA Find Resource. I did a chmod 666 for the device (002) under /proc/bus/usb/004. But that didn't help.
 
When I run labview as root I can see the device with VISA Find Resource: USB0::0x04B4::0x0002::NI-VISA-4002::RAW
But when I try to open the device with the returned string I get error 0xBFFF0000, Unknown system error (misellaneous error)
 
I also tried to mount the usbfs in devmode=0666 with mount -o remount,devmode=0666 usbfs but that didn't help either.
 
Does anyone have experience with this problem?
 
Theo
 
 
 
0 Kudos
Message 1 of 3
(3,033 Views)
When I run labview as a normal user I don't see the USB device when I use VISA Find Resource. I did a chmod 666 for the device (002) under /proc/bus/usb/004. But that didn't help.
I was able to fix this by executing:
cd /proc/bus/usb
chmod -R 777 *
cd .usbfs
chmod -R 777 *
When I run labview as root I can see the device with VISA Find Resource: USB0::0x04B4::0x0002::NI-VISA-4002::RAW But when I try to open the device with the returned string I get error 0xBFFF0000, Unknown system error (misellaneous error)
I have not been able to figure this out yet, if you have figured the problem out since you posted your message I would appreciate any help you can give me!
0 Kudos
Message 2 of 3
(3,000 Views)

cd /proc/bus/usb
chmod -R 777 *
cd .usbfs
chmod -R 777 *

I tried this, but it still doesn't work for me. I don't have the .usbfs directory on my suse 10 installation, but I have set all other files and dirs to 777.
When I run labview as root I can see the device with VISA Find Resource: USB0::0x04B4::0x0002::NI-VISA-4002::RAW But when I try to open the device with the returned string I get error 0xBFFF0000, Unknown system error (misellaneous error)

I have not been able to figure this out yet, if you have figured the problem out since you posted your message I would appreciate any help you can give me!

I solved the problem for my device. I tried to test the usb capabilities with an old usb kit from cypress. It included an usb device with an onboard temperature sensor. Apparently someone wrote a linux driver for it, because it was detected by the kernel. To test it with usb visa I simply removed the linux driver. But I wasn't able to open the device with visa. I finally used another usb device (usb can interface), which wasn't recoqnized by linux and it worked immediately.So my guess is is that the linux kernel shouldn't recoqnize your device otherwise the usbfs interface will not work.

 

 

0 Kudos
Message 3 of 3
(2,981 Views)