Re: UHD/antennas/device names/etc

Josh,

No GRC. All C++. My C++ code is calling simple_usrp::make(dev).

–Bob

Bob,


So to make a device (lets say its at ip 192.168.10.2):

uhd::device_addr dev_addr;
dev_addr[“addr”] = “192.168.10.2”;
uhd::usrp::simple_usrp::sptr my_device =
uhd::usrp::simple_usrp::make(dev_addr);

– OR with a markup string –

uhd::usrp::simple_usrp::sptr my_device =
uhd::usrp::simple_usrp::make(“addr=192.168.10.2”);


To set the RX antenna (WBX or RFX):

my_device->set_rx_antenna(“RX2”);

– OR –

my_device->set_rx_antenna(“TX/RX”);

The error you got when setting the antenna indicates that you did
my_device->set_rx_antenna("");
However, a blank string is not a valid antenna name for those boards.
You may also query for a list of possible antenna names with:
std::vectorstd::string ants = my_device->get_rx_antenna_names();

-Josh