Solution
The Linux kernel has built-in support for many types of devices including but not limited to USB storage devices and USB webcams. Since the NI Linux RTOS is based on the Linux kernel, support for these devices is included. There is no defined list of hardware that can be referenced for support purposes, but there are ways to determine if a device can be used with the NI Linux RTOS.
Note: The techniques discussed here will require the ability to log in to the NI Linux Real-Time target using a secure shell (SSH) or serial connection to the device. Documentation has been provided in the Related Links section that can assist with this.
Detecting Connected USB Devices:It is possible to verify that a USB device has been detected by the NI Linux RTOS when it is initially plugged into a USB port on the target. Once logged in to the Real-Time target, connect a USB device and issue the command
dmesg to the console, then press
enter. Information similar to that shown in Figure 1 will be displayed. You can search the information for text related to the device you have plugged into the target. This is a reliable method for determining if the NI Linux RTOS can identify your device. This does not guarantee that the device is usable with the target.
Figure 1. Typical dmseg Information About a USB Storage Drive
Determining if the Connected USB Device Is Usable by the Target:The current kernel that the NI Linux RTOS utilizes is the 3.14.40 Linux kernel. When the kernel detects a USB device that it can support, the kernel module (driver) is automatically loaded into memory and the device will become accessible to the user. An easy method to determine if a new kernel module has been loaded for a particular USB device is to issue the
lsmod command to the terminal before inserting the device, then issuing the same command after inserting the device. If a module has been loaded, comparing the lists of loaded modules will show the new module.
For most supported USB devices, a module will be automatically loaded for the kernel. There may be times that a module does not load automatically. To manually load a module for the kernel, issue the command
modprobe <module> to the terminal. For example, if the ftdi_sio module, a USB-to-Serial driver needs to be loaded, the command would be
modprobe ftdi_sio.
USB storage devices will be automatically mounted to the Real-Time target. These can be accessed in the
/media location and a shortcut to the drive will generally be mapped as
/U unless a folder with that name exists on the system. In such a case, the next available letter is used to map the USB storage device.