diff options
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/n230/n230_resource_manager.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/host/lib/usrp/n230/n230_resource_manager.cpp b/host/lib/usrp/n230/n230_resource_manager.cpp index 340bc7c6c..d3d272354 100644 --- a/host/lib/usrp/n230/n230_resource_manager.cpp +++ b/host/lib/usrp/n230/n230_resource_manager.cpp @@ -88,12 +88,19 @@ n230_resource_manager::n230_resource_manager( n230_eth_conn_t conn_iface; conn_iface.ip_addr = addr; - boost::uint32_t iface_id = usrp3::usrp3_fw_ctrl_iface::get_iface_id( - conn_iface.ip_addr, BOOST_STRINGIZE(N230_FW_COMMS_UDP_PORT), N230_FW_PRODUCT_ID); + boost::uint32_t iface_id = 0xFFFFFFFF; + try { + iface_id = usrp3::usrp3_fw_ctrl_iface::get_iface_id( + conn_iface.ip_addr, BOOST_STRINGIZE(N230_FW_COMMS_UDP_PORT), N230_FW_PRODUCT_ID); + } catch (uhd::io_error&) { + throw uhd::io_error(str(boost::format( + "Could not communicate with the device over address %s") % + conn_iface.ip_addr)); + } switch (iface_id) { case N230_ETH0_IFACE_ID: conn_iface.type = ETH0; break; case N230_ETH1_IFACE_ID: conn_iface.type = ETH1; break; - default: throw uhd::runtime_error("N230 Initialization Error: Could not detect iface.)"); + default: throw uhd::runtime_error("N230 Initialization Error: Could not detect ethernet port number.)"); } _eth_conns.push_back(conn_iface); } |