diff options
-rw-r--r-- | host/docs/ni_rio_kernel.dox | 146 |
1 files changed, 100 insertions, 46 deletions
diff --git a/host/docs/ni_rio_kernel.dox b/host/docs/ni_rio_kernel.dox index 960426e73..eabed00c6 100644 --- a/host/docs/ni_rio_kernel.dox +++ b/host/docs/ni_rio_kernel.dox @@ -4,87 +4,141 @@ \section linux_rio Linux NI RIO Installation and Usage +\subsection linux_overview Overview + +UHD can communicate with USRP X300 / X310 devices using the PCIe transport +connection. The ni-usrp-rio package in the NI Linux Device Drivers repository +includes the infrastructure to enable this functionality. This package is only +intended for UHD PCIe transport support. This does not include NI-USRP API support +on Linux. + \subsection linux_requirements Requirements In order to use the PCIe transport connection on the USRP X300 / X310 devices, you must install the NI USRP RIO driver stack. These include kernel modules -which must be loaded. +which are loaded using DKMS. Kernel headers are required to build these +modules. Only x86_64/AMD64 kernels are supported. -Your kernel version must be supported by the kernel modules. Only 64-bit kernels -are supported. +\subsection linux_installation Installing the Drivers in Linux -<b>Currently, the latest supported kernel version is 4.2.x.</b> +The NI Linux Device Driver repository can be found at <a +href=https://www.ni.com/en-us/support/downloads/drivers/download.ni-linux-device-drivers.html>NI Linux Device Drivers</a>. -\subsection linux_installation Installing the Drivers in Linux +Note: This guide was written for the NI Linux Device Drivers 2020 release. + +<b>Download the corresponding repository rpm or deb for your platform.</b> + +For Fedora 31, download the EL8 repository. + +For Ubuntu 18.04, download the Bionic repository. + +<b>Install the repository rpm or deb:</b> + +Fedora + + rpm -i {ni drivers repository}.rpm + +Ubuntu + + dpkg -i {ni drivers repository}.deb + +<b>Update package information:</b> + +Fedora + + dnf check-update +Ubuntu + + apt update + +<b>Install kernel-headers:</b> + +Fedora + + dnf install kernel-devel -The NI USRP RIO installer can be found <a -href=http://files.ettus.com/binaries/niusrprio/niusrprio-installer-18.0.0.tar.gz>here</a>. +Ubuntu -Download the installer and extract it with the following command: + apt install linux-headers-$(uname -r) - tar zxf niusrprio-installer-18.0.0.tar.gz +Note: You must ensure that the kernel header version is the same as the system kernel version. +You can check the system kernel version by running: -The files will be extracted into a directory called <b>niusrprio-installer</b>. + uname -r -To install the NI USRPRIO kernel modules and RPC server, run the following -command: +<b>Install ni-usrp-rio:</b> - sudo niusrprio-installer/INSTALL +Fedora -Select 'y' for each prompt, and the script will install all necessary -components. This script will automatically load all necessary kernel modules -for the duration of the session. + dnf install ni-usrp-rio + +Ubuntu + + apt install ni-usrp-rio + +<b>Build kernel modules using DKMS:</b> + + dkms autoinstall + +If you run into build errors, ensure the kernel headers are installed for +your current kernel. + +<b>Reboot:</b> + + reboot + +<b>Run UHD application:</b> + +At this point, the connected PCIe device should be visible from UHD. To verify this run: + + uhd_find_devices +or + + uhd_usrp_probe \subsection linux_enabling Enabling and Disabling Usage -Once everything is installed, run the following commands to enable use of the -X300/X310 over PCI Express: +The package installers automatically starts the niusrpriorpc service on boot. This service is required to +communicate with UHD. + +To start the service: - sudo /usr/local/bin/niusrprio_pcie start + systemctl start niusrpriorpc.service -To stop these processes, run the following command: +To stop the service: - sudo /usr/local/bin/niusrprio_pcie stop + systemctl stop niusrpriorpc.service -To check if the kernel modules are loaded and if the RPC server is running, run -the following command: +To disable the service on boot: - /usr/local/bin/niusrprio_pcie status + systemctl disable niusrpriorpc.service -<b>NOTE:</b> niusrprio_pcie start does not run when the host system is booted. -If you would like the USRP PCIe device to be available automatically after -a system restart, please create an init.d script that runs niusrprio_pcie start. +To reenable the service on boot: + + systemctl enable niusrpriorpc.service \subsection linux_swapping Hot-Plugging and Power-Cycling The USRP X3x0, NI USRP-294x and NI USRP-295x devices <b>cannot</b> be hot-swapped when connected over PCI Express. -Unplugging the PCI Express connection or powering the device should be done only after disabling the device or -powering off the host computer. - -<b>WARNING:</b> If the device is unplugged without running the `niusrprio_pcie stop` command, the system could become unstable. +Unplugging the PCI Express connection or powering the device should be done only after powering off the host computer. \subsection linux_upgrades Upgrading Kernels -The NI USRPRIO kernel modules are built for a specific kernel version. If the -kernel version is changed, the modules must be rebuilt for the current kernel. -The `niusrprio_pcie start` command checks for the necessary modules and rebuilds -them if necessary. - -If it ever becomes necessary to rebuild the modules manually, run the following: - - sudo /usr/local/bin/niusrprio_pcie stop - sudo /usr/local/bin/updateNIDrivers --no-prompt - sudo /usr/local/bin/niusrprio_pcie start +DKMS will automatically rebuild the kernel modules when updating kernels. Ensure that the +appropriate kernel headers are installed when updating kernel versions. -\subsection linux_uninstalling Uninstalling in Linux +\subsection linux_uninstalling Uninstalling the Driver in Linux -To uninstall the NI USRP RIO kernel modules and RPC server, run the following -command: +To uninstall ni-usrp-rio, run the following commands: - sudo /usr/local/bin/niusrprio_uninstall +Fedora: -Select y at the prompt, and the script will uninstall all installed components. + dnf remove ni-usrp-rio +Ubuntu: + + apt remove ni-usrp-rio + apt autoremove \section windows_rio Windows NI RIO Installation and Usage |