== USRP-2974 (Krypton) driver install and usage == == Description == A quick walk thru on how to install the PCIe driver for Krypton and start using the device. === Installation of PCIe driver === From the COSMOS console, load the image ''baseline-uhd-1804.ndz'' on Krypton host and turn on the device. This image has the comptible UHD & kernel driver already installed. {{{ console> omf load -i baseline-uhd-1804.ndz -t sdr2-lg1.sb1.cosmos-lab.org console> omf tell -a on -t sdr2-lg1.sb1.cosmos-lab.org }}} Now ssh into the Krypton host and verify it is able to detect the radio on the PCIe bus. Use ''lspci'' to list all the devices that are detected. {{{ root@sdr2-lg1:~# lspci }}} In the output of lspci, search for ''Signal processing controller: National Instruments PXIe/PCIe Device''. This means the host computer's PCIe controller sees the Krypton radio. Now download and install the PCIe driver so the UHD applications access the radio. Complete details on this driver is [https://files.ettus.com/manual/page_ni_rio_kernel.html here]. {{{ root@sdr2-lg1:~# wget http://files.ettus.com/binaries/niusrprio/niusrprio-installer-18.0.0.tar.gz root@sdr2-lg1:~# tar -zxf niusrprio-installer-18.0.0.tar.gz root@sdr2-lg1:~# sudo niusrprio-installer/INSTALL }}} After the installation is complete start the driver by loading it into the kernel modules. {{{ root@sdr2-lg1:~# /usr/local/bin/niusrprio_pcie start Making sure drivers are up to date... Module nikal is up-to-date Module nistreamk is up-to-date Module nibds is up-to-date Module niusrpriok is up-to-date Module NiRioSrv is up-to-date Loading: NiRioSrv niusrpriok Starting: niusrpriorpc }}} At this point use ''uhd_find_devices'' and ''uhd_usrp_probe'' query the radio. {{{ root@sdr2-lg1:~# uhd_find_devices --args="type=x300" [INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501; UHD_3.14.0.HEAD-0-g6875d061 -------------------------------------------------- -- UHD Device 0 -------------------------------------------------- Device Address: serial: 31557B9 fpga: HG name: product: X310 resource: RIO0 type: x300 }}} === Trouble shooting === If the above commands return with an error message stating an FPGA version mismatch, then we'll need to update the FPGA that is compatible with the current UHD version. The typical error message would be similar to the following: {{{ [ERROR] [0/DmaFIFO_0] Major compat number mismatch for noc_shell: Expecting 5, got 2. [INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,time_source=internal,mgmt_addr=10.115.2.1,product=n310'. [ERROR] [MPMD] Failure during block enumeration: RuntimeError: FPGA component `noc_shell' is revision 2 and UHD supports revision 5. Please either up. Error: RuntimeError: Failed to run enumerate_rfnoc_blocks() }}} To update the FPGA following these steps. {{{ root@sdr2-lg1:~# /usr/local/lib/uhd/utils/uhd_images_downloader.py root@sdr2-lg1:~# uhd_image_loader --args "type=x300" root@sdr2-lg1:~# restart }}} === Most importantly if you made it this far === If the Krypton host is rebooted, the driver modules are NOT automatically reloaded into the kernel. So the command ''/usr/local/bin/niusrprio_pcie start'' has to be run on the Krypton host everytime it is power-cycled or rebooted. {{{ root@sdr2-lg1:~# /usr/local/bin/niusrprio_pcie start }}}