usrp_hwd runs all gRPC greenlets on a single gevent hub, so any non-yielding C call blocks every other RPC. Under a uhd_find_devices discovery flood, the GetDeviceInfo interface enumeration run long enough And may starve most claimed RPC past its default 2s client deadline, causing "Deadline Exceeded" failures. Three places that this commit optimizes, all in net.py: - get_local_ip_addrs() used pyroute2 IPDB, which spawns helper threads and mirrors the full link/addr/route/neighbour tables on every call (~100s of ms, non-yielding) --> Replace it with a single stateless IPRoute get_addr() dump. Keep IFA_LOCAL (falling back to IFA_ADDRESS) so the returned set matches IPDB's behaviour, including point-to-point links. - get_link_speed() used to create a new pyudev.Context() per interface, which forks on creation, tripping gRPC's fork handlers. gRPC then freezes all workder threads and restarts after fork is done. Fix is to reuse one PID-guarded pyudev context per process. - get_valid_interfaces() did an O(N) netlink round-trip per interface. This stalls gRPC server. --> Dump all links and IPv4 addresses once and filter in Python. IPRoute stays per-call: it opens its own netlink socket and does not fork, so there is no shared state to lock. |
||
|---|---|---|
| .ci | ||
| .github | ||
| firmware | ||
| fpga | ||
| host | ||
| images | ||
| mpm | ||
| tools | ||
| .clang-format | ||
| .clang-format-ignore | ||
| .clang-tidy | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .pre-commit-config.yaml | ||
| .readthedocs.yaml | ||
| CHANGELOG | ||
| CODING.md | ||
| CONTRIBUTING.md | ||
| LICENSE.md | ||
| README.md | ||
USRP Hardware Driver (UHD™) Software
Welcome to the UHD™ software distribution! UHD is the free & open-source software driver and API for the Universal Software Radio Peripheral (USRP™) SDR platform, created and sold by Ettus Research.
UHD supports all Ettus Research USRP™ hardware, including all motherboards and daughterboards, and the combinations thereof.
Documentation
For technical documentation related to USRP™ hardware or UHD system design, check out the UHD and USRP Manual. That is where you can find Installation Instructions, help on how to build UHD from source on different platforms, development guidelines and reference documentation as well as device usage guidance.
Additionally, be sure to check out the Ettus Research FAQ, and the Knowledge Base for useful application notes and tutorials.
OS Support
UHD is primarily developed on Linux, but we also test and support the following operating systems.
- Linux (Fedora and Ubuntu)
- Mac OS X
- Windows 11
Other operating systems will most likely work, too, but are not officially supported.
Applications
UHD can be used to build stand-alone applications with USRP™ hardware, or with third-party applications. Some common toolkits / frameworks are:
- GNU Radio
- RFNoC OOT Blocks
- NI LabVIEW - UHD RFNoC
- NI LabVIEW
- MathWorks Matlab and Simulink
- REDHAWK
- OpenBTS GSM
- Osmocom GSM
- Amarisoft LTE
- Software Radio Systems srsRAN
- Eurecom OpenAirInterface
Directories
host/
The source code for the user-space driver.
mpm/
The source code for the module peripheral manager (MPM). This is code that is run on embedded devices.
firmware/
The source code for all microprocessors in USRP hardware.
fpga/
The source code for the UHD FPGA images.
images/
This contains the package builder for FPGA and firmware images. We provide other tools to download image packages, the scripts in here are mainly relevant for UHD maintainers and -developers.
tools/
Additional tools, mainly for debugging purposes. See the readme-file in that directory for more details on the individual tools.