I wrote some code for fun, that detects USRPs (both 1 and 2) and prints some info. Something similar is done by /usr/bin/usrp_probe and /usr/bin/usrp2_probe, as well as /usr/bin/usrp_print_db.py, but this is CLI and it tries to detect both, plus it looks up dboard names even with USRP2:


Two bugs I came across while writing this:

  1. The USRP2 returns usrp.daughterboard_id() == +1, not -1 when no dboard is connected, confusing it with the BasicRX. Seems to have to do with unsigned longs over TCP/IP, but I could be wrong
  2. The frequency ranges returned are often wrong, I found out they’re hard-coded in the daughterboard c++ drivers under usrp/host/lib/legacy (remove legacy if following the trunk)

Regarding the daughterboard frequency ranges, you can see those values hard-coded by going to your gnuradio source directory and running:

grep -r freq_max usrp/host/lib/*.cc -A 3

I have created a patch and opened a ticket: ticket #405