Tools Available for File Transfer/Access on NI Linux Real-Time Targets

Updated Apr 12, 2023

Environment

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

This article explains how to transfer files to/from a Linux Real-Time target, and how to programmatically transfer files from a Real-Time target to a host PC.

There are several ways of doing this: 

WebDAV

WebDAV is an HTTP extension that can be used to manually browse or to programmatically transfer files. See Using WebDAV to Transfer Files to Your Real-Time Target  for instructions on how to configure WebDAV for your target.


FTP 

It's  possible to use FTP to perform file transfers. This method is not secure and is not recommended. Note that the FTP server is not installed by default on NI Linux-Real Time devices. See Using FTP With an NI Linux Real-Time Target   for instructions on how to use FTP with a Linux Real-Time target. 

FileZilla via SFTP 

FileZilla is a free, open-source SFTP utility that provides an easy-to-navigate user interface for browsing and interacting with the file system on remote systems. SFTP, or SSH File Transfer Protocol, is an extension of SSH. As such, it is important that SSH is enabled on your remote system when using this method. To enable SSH on your device, do the following:

  1. Power on and connect your device to your network or directly to your development computer.
  2. Open NI MAX and find your device under Remote Systems.
  3. You may have to log in to your controller to access its settings (the default username is admin, and the default password is blank).
  4. Check the box by Enable Secure Shell Server (sshd) in the Startup Settings window.
  5. Save your changes and the target will reboot.

To connect to your target's file system using FileZilla:

  1. Open FileZilla.
  2. In the Host field, enter the IP address of your target, which can be found on the System Settings tab for your device in MAX.
  3. Enter your username and password into the corresponding fields.
  4. Enter 22 in the Port field. This is the default port for SFTP and SSH.
  5. Click Quickconnect.

You should now be able to interact with the file system on your NI Linux Real-Time target using FileZilla. 

Note: FileZilla is a 3rd party software product; as such, this product is not supported by NI Technical Support. For assistance with FileZilla, please post to the forums on FileZilla's website.

Web-based Configuration

File system access is also possible via the web configuration tool. This can be accessed by simply navigating to the IP address of the cRIO in the URL bar in Internet Explorer and selecting the Remote File Browser button, highlighted in the image below. A few items of note:

  • The Web-based Configuration and Monitoring software needs to be installed on the cRIO.
  • A non-blank password is required for the admin user on the cRIO.
  • File system access is done through the lvuser user account, not admin. Attempting to modify files that lvuser does not have access to will result in a "403: Forbidden" error message.

The buttons at the top of the file system window will allow you to navigate and manipulate the files on your Linux Real-Time target.

Note: Internet Explorer and Silverlight are no longer supported by Microsoft. This older version of the Web-Based Configuration and Monitoring tool relied on Microsoft Silverlight and is no longer supported by NI. A new Web-Based Configuration and Monitoring tool for NI Linux Real-Time targets was released with the NI Linux Real-Time System Image 21.0, but the new version of the tool does not include file access.
 

USB or SD Card

You also have the option of using a USB drive or SD Card for some Real-Time devices. For more information see Writing to a USB Drive or SD from NI Real-time Device

Access Files via The Linux Shell

If the characters in a file name are not valid on the operating systems it's involving, such an Linux and Windows, it can impede the file transfer process. You can rename files and manage them through Accessing the Shell on NI Linux Real-Time Devices . You will need to find the appropriate Linux commands in order to make the needed changes. 

Samba 

Samba is an implementation of a networking protocol known as SMB/CIFS, allowing file sharing between computers running Windows and computers running Unix-based operating systems, similar to Windows shared files and directories. Samba also allows for finer-grained control over file access permissions compared to the other options above but involves a higher initial investment of time to setup. See Getting the Most Out of your NI Linux Real Time Target for detailed instructions on how to configure Samba on your NI Linux Real Time target.

Note: Samba is a 3rd party software product and is not shipped as part of Linux Real-Time. As such, this product is not supported by NI Technical Support. For assistance with Samba on Linux Real-Time, see the NI Linux Real-Time Community Page for additional resources and forum support.