Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

linux usb serial user

I have two USB serial ports, /dev/ttyUSB0 and 1.  They are virtual, i.e. they go away and return depending on whether the device is plugged in or not.  I modified the rules so they are created with the correct read/write permissions.  I have run AddUsbRawPermissions.sh and this found the files in /proc/bus/usb to make read/write.

 

I still must run NIvisaic as root to see these devices in the configuration and do test reads/writes.  If, in visaconf as a regular user, I configure the ports as static, they still do not appear in NIvisaic as a regular user.

 

As a regular user, I can use a serial console program, cutecom, to read/write to these USB serial ports.  So, without NI-VISA, these ports are configured properly and working.

 

How can I use these without being a superuser?

 

thanks, Dan

0 Kudos
Message 1 of 3
(3,445 Views)

Hi Dan,

What version and distribution of linux are you using? Also, what version of NI-VISA? I’m not super familiar with linux, does it work when you have super user rights?

Best Regards,

Matt

 

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,418 Views)
Hi Matt, Essentially using Redhat EL5 workstation with NI-VISA 4.5 installed. I never did figure out why NIvisaic run as a normal user does not show the configured serial ports. However, I stepped through the basic serial read write vi slowly and got my expected return message. Turns out that there is far more wait time needed (10s or 100s times more) before the read is requested than I would normally have used with my console program. There is probably a better way, e.g. changing a timeout parameter in the serial read function, but I haven't looked for it. Any way, I'm satisfied that I can communicate with the device at the other end of the serial port. thanks, Dan
0 Kudos
Message 3 of 3
(3,416 Views)