08-26-2011 05:22 AM
Having got visaconf launching I can not get it to see my scope at all. There is a serial section whih sees four ports ASRL1-4. There is no USB subsection at all.
lsusb does see the scope. In Passports libnivusb.so is ticked.
My windows machine will communicate with the scope. Looking at the readme file thre do seem to be some potential issues with permissions, but running visaconf as root doesn't help.
Is there something I have forgotten to do or will visaconf simply not talk to this scope?
Thanks!
08-29-2011 05:06 PM
On some Linux distributions, when using USB TMC (Test & Measurement Class)Instruments, they may not be accessible by a user other than 'root' if the
class of the instrument is defined at the interface level. If this is the case, access may be granted by using the "AddUsbRawPermissions.sh" script.
Try using that script to see if you can get the device to show up.
08-30-2011 05:02 AM
Thanks for the suggestion, Ox. I did try that, but it doesn't help. As I said even running as root it just doesn't see any USB devices and there's no USB subsection which seems odd.
08-30-2011 08:30 AM
Have you been following the other thread about USB and GPIB? I think you are in a similar situation.
https://decibel.ni.com/content/message/26180#26180
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
08-30-2011 08:44 AM
Unless things have changed NI-VISA supports USB devices with user-mode drivers and thus it isn't the same problem as with GPIB.
More likely the problem is that Linux now has a native usbtmc driver "/sbin/modinfo usbtmc". I'd bet that the native driver is claiming the device since NI-VISA normally only picks up unclaimed devices.
08-30-2011 10:57 AM
If that didn't work, then there is another use case I have run across. Some distributions use a default usbtmc driver.
There is a script I have been working on to include in the VISA installers, but have not got around to implementing it as of yet.
Give this a try and let me know how it goes.
if [ ! -e /lib/modules/`uname -r`/modules.usbmap ]; then
if [ "$1" == "-r" ]; then
rm -rf /etc/modprobe.d/98-visatest.conf
/sbin/modprobe usbtmc
echo "visatest.conf has been removed..."
else
rmmod usbtmc
echo "alias usb:v*p*d*dc*dsc*dp*icFEisc03ip01* usbtmc_disable" > /etc/modprobe.d/98-visatest.conf
echo "alias usb:v*p*d*dc*dsc*dp*icFEisc03ip00* usbtmc_disable" >> /etc/modprobe.d/98-visatest.conf
echo "install usbtmc_disable /bin/echo usbtmc module currently disabled by NI-VISA" >> /etc/modprobe.d/98-visatest.conf
echo "visatest.conf has been created..."
fi
fi
08-30-2011 11:08 AM
It doesn't output anything, so this line:
if [ ! -e /lib/modules/`uname -r`/modules.usbmap ]; then
Must be true.
I tried changing it to this:
echo "nivisa test"
if [ ! -e /lib/modules/`uname -r`/modules.usbmap ]; then
if [ "$1" == "-r" ]; then
rm -rf /etc/modprobe.d/98-visatest.conf
/sbin/modprobe usbtmc
echo "visatest.conf has been removed..."
else
rmmod usbtmc
echo "alias usb:v*p*d*dc*dsc*dp*icFEisc03ip01* usbtmc_disable" > /etc/modprobe.d/98-visatest.conf
echo "alias usb:v*p*d*dc*dsc*dp*icFEisc03ip00* usbtmc_disable" >> /etc/modprobe.d/98-visatest.conf
echo "install usbtmc_disable /bin/echo usbtmc module currently disabled by NI-VISA" >> /etc/modprobe.d/98-visatest.conf
echo "visatest.conf has been created..."
fi
else
echo "Didn't get past first if"
fi
And it does, indeed, say Didn't get past first if when I run the script.
08-30-2011 12:49 PM
What distro of Linux are you running?
08-30-2011 12:53 PM
Mandriva 2010.0 ( I know this isn't officially supported any more.) I tried Suse 11.2, but made even less progress with that as it's no longer supported by Suse!
08-30-2011 01:16 PM
Ok.. I am downloading Mandriva 2010.0 and will install it on my system and take a look at the default behavior ofthe usbtmc drivers and how the script works with this distro.