| 1 | == USRP-2974 (Krypton) driver install and usage == |
| 2 | |
| 3 | == Description == |
| 4 | A quick walk thru on how to install the PCIe driver for Krypton and start using the device. |
| 5 | |
| 6 | === Installation of PCIe driver === |
| 7 | 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. |
| 8 | {{{ |
| 9 | console> omf load -i baseline-uhd-1804.ndz -t sdr2-lg1.sb1.cosmos-lab.org |
| 10 | console> omf tell -a on -t sdr2-lg1.sb1.cosmos-lab.org |
| 11 | }}} |
| 12 | |
| 13 | 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. |
| 14 | {{{ |
| 15 | root@sdr2-lg1:~# lspci |
| 16 | }}} |
| 17 | |
| 18 | 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]. |
| 19 | {{{ |
| 20 | root@sdr2-lg1:~# wget http://files.ettus.com/binaries/niusrprio/niusrprio-installer-18.0.0.tar.gz |
| 21 | root@sdr2-lg1:~# tar -zxf niusrprio-installer-18.0.0.tar.gz |
| 22 | root@sdr2-lg1:~# sudo niusrprio-installer/INSTALL |
| 23 | }}} |
| 24 | |
| 25 | After the installation is complete start the driver by loading it into the kernel modules. |
| 26 | {{{ |
| 27 | root@sdr2-lg1:~# /usr/local/bin/niusrprio_pcie start |
| 28 | Making sure drivers are up to date... |
| 29 | Module nikal is up-to-date |
| 30 | Module nistreamk is up-to-date |
| 31 | Module nibds is up-to-date |
| 32 | Module niusrpriok is up-to-date |
| 33 | Module NiRioSrv is up-to-date |
| 34 | Loading: NiRioSrv niusrpriok |
| 35 | Starting: niusrpriorpc |
| 36 | }}} |
| 37 | |
| 38 | At this point use ''uhd_find_devices'' and ''uhd_usrp_probe'' query the radio. |
| 39 | {{{ |
| 40 | root@sdr2-lg1:~# uhd_find_devices --args="type=x300" |
| 41 | [INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501; UHD_3.14.0.HEAD-0-g6875d061 |
| 42 | -------------------------------------------------- |
| 43 | -- UHD Device 0 |
| 44 | -------------------------------------------------- |
| 45 | Device Address: |
| 46 | serial: 31557B9 |
| 47 | fpga: HG |
| 48 | name: |
| 49 | product: X310 |
| 50 | resource: RIO0 |
| 51 | type: x300 |
| 52 | |
| 53 | }}} |
| 54 | |
| 55 | |
| 56 | === Trouble shooting === |
| 57 | 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: |
| 58 | {{{ |
| 59 | [ERROR] [0/DmaFIFO_0] Major compat number mismatch for noc_shell: Expecting 5, got 2. |
| 60 | [INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,time_source=internal,mgmt_addr=10.115.2.1,product=n310'. |
| 61 | [ERROR] [MPMD] Failure during block enumeration: RuntimeError: FPGA component `noc_shell' is revision 2 and UHD supports revision 5. Please either up. |
| 62 | Error: RuntimeError: Failed to run enumerate_rfnoc_blocks() |
| 63 | }}} |
| 64 | |
| 65 | |
| 66 | To update the FPGA following these steps. |
| 67 | {{{ |
| 68 | root@sdr2-lg1:~# /usr/local/lib/uhd/utils/uhd_images_downloader.py |
| 69 | root@sdr2-lg1:~# uhd_image_loader --args "type=x300" |
| 70 | root@sdr2-lg1:~# restart |
| 71 | }}} |
| 72 | |
| 73 | |
| 74 | === Most importantly if you made it this far === |
| 75 | 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. |
| 76 | {{{ |
| 77 | root@sdr2-lg1:~# /usr/local/bin/niusrprio_pcie start |
| 78 | }}} |