USRP Driver Installation
We now need to install the Ettus UHD driver to properly access the USRP devices.These need to be rebuilt for the ARM platform.
The installation guide aims to be self-contained. However, the following resources are useful for troubleshooting and developers working with the Ettus UHD driver:
Note
This is also achieved using the scriptscripts/install-usrp.sh
Prerequisites
We need to install the following packages to build the UHD driver.
sudoapt-getinstall\autoconfautomakebuild-essentialccachecmakecpufrequtils\doxygenethtoolg++gitinetutils-toolslibboost-all-dev\libncurses5libncurses5-devlibusb-1.0-0libusb-1.0-0-dev\libusb-devpython3-devpython3-makopython3-numpypython3-requests\python3-scipypython3-setuptoolspython3-ruamel.yamlninja-build
Note
DPDK support is disabled by default.
Building UHD
For arm64, we need to build the UHD driver from source.
Get source code:
gitclonehttps://github.com/EttusResearch/uhd.gitcduhd/hostConfigure and build:
mkdirbuild&&cdbuildcmake-DCMAKE_POLICY_DEFAULT_CMD0167=NEW-GNinja..ninjaninjatestsudoninjainstall
Download FPGA images:
sudo/usr/local/lib/uhd/utils/uhd_images_downloader.py
Post-build Configuration
We now need to access the configuration files to properly configure the USRP devices and grant access to the USB devices.
Re-build the linker cache:
sudoldconfig
Set up USB permissions for non-root users:
sudocp/usr/local/lib/uhd/utils/uhd-usrp.rules/etc/udev/rules.d/sudoudevadmcontrol--reload-rulessudoudevadmtrigger
Testing Installation
We can now verify the installation and access the USRP serial number.
Check USB device detection:
lsusbBus001Device001:ID1d6b:0002LinuxFoundation2.0roothub...Bus001Device067:ID2500:0020EttusResearchLLCUSRPB210
Search for UHD devices:
uhd_find_devices[INFO][UHD]linux;GNUC++version14.1.120240720;Boost_108300;UHD_4.7.0.0-0-ga5ed1872----------------------------------------------------UHDDevice0--------------------------------------------------DeviceAddress:serial:32FCXXXname:MyB210product:B210type:b200
Note
Please notice the serial number. It will be used to identify the USRP device in the 5G stack.
Get device details:
sudouhd_usrp_probe[INFO][UHD]linux;GNUC++version14.1.120240720;Boost_108300;UHD_4.7.0.0-0-ga5ed1872[INFO][B200]Loadingfirmwareimage:/usr/local/share/uhd/images/usrp_b200_fw.hex......[INFO][B200]Actuallygotclockrate16.000000MHz....|Device:B-SeriesDevice|_____________________________________________________|/||Mboard:B210||serial:32FCXXX||name:MyB210||product:2||revision:4||FWVersion:8.0||FPGAVersion:16.0||||Timesources:none,internal,external,gpsdo||Clocksources:internal,external,gpsdo||Sensors:ref_locked...
And run a final performance test:
/usr/local/lib/uhd/examples/benchmark_rate--rx_rate10e6--tx_rate10e6[INFO][UHD]linux;GNUC++version14.1.120240720;Boost_108300;UHD_4.7.0.0-0-ga5ed1872...Benchmarkratesummary:Numreceivedsamples:100235043Numdroppedsamples:0Numoverrunsdetected:0Numtransmittedsamples:100062000Numsequenceerrors(Tx):0Numsequenceerrors(Rx):0Numunderrunsdetected:0Numlatecommands:0Numtimeouts(Tx):0Numtimeouts(Rx):0Done!