Error -1073807192 When Accessing the Serial Port Using NI-VISA on a LinuxRT Target

Updated Jul 29, 2019

Reported In


  • NI-9147

Issue Details

I am working with a system which requires that I remotely access a device's serial port. For example, my system could involve a CompactRIO controller communicating via ethernet with a RIO expansion chassis which contains an NI 9870 serial module. I would like to access one of the 9870's serial ports from my CompactRIO controller, but when I attempt to do so I receive the following error from NI-VISA:

Error -1073807192: "Access to the resource or remote machine is denied. This is due to lack of sufficient privileges for the current user or machine."

This error is shown in the following dialog box.

Why is my access to the remote serial port denied, and how can I gain access?


This error occurs due to a known issue with the LinuxRT implementation of NI-VISA's remote passport, which is a library that NI-VISA loads to communicate with remote devices. With the current implementation, LinuxRT targets are unable to resolve their own hostnames into their IP addresses if using a static IP address. Therefore, the underlying problem is one of network communication between the devices, rather than a permissions problem. The current workaround to resolve this issue is to open the etc/hosts file and edit it to include the hostname and IP address of the target. This can be accomplished manually by accessing the file system on the target. Please see the Related Links section below to assess a few different methods of doing this.

Alternatively, you can deploy 'Set Hosts File on LinuxRT Target with Static' attached to this KnowledgeBase to your LinuxRT target, which will automatically edit the hosts file accordingly.