From d4f487af3fc04a4cd3685f454988f86650e2ef46 Mon Sep 17 00:00:00 2001 From: Neel Pandeya Date: Thu, 25 Sep 2014 16:17:43 -0700 Subject: B200: added support for reading the exact product name from EEPROM for B200 and B210 --- host/lib/usrp/b200/b200_impl.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 7f92ae33a..1f1fda92f 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -123,6 +123,21 @@ static device_addrs_t b200_find(const device_addr_t &hint) new_addr["type"] = "b200"; new_addr["name"] = mb_eeprom["name"]; new_addr["serial"] = handle->get_serial(); + if (not mb_eeprom["product"].empty()) + { + switch (boost::lexical_cast(mb_eeprom["product"])) + { + case 0x0001: + case 0x7737: + new_addr["product"] = "B200"; + break; + case 0x7738: + case 0x0002: + new_addr["product"] = "B210"; + break; + default: UHD_MSG(error) << "B200 unknown product code: " << mb_eeprom["product"] << std::endl; + } + } //this is a found b200 when the hint serial and name match or blank if ( (not hint.has_key("name") or hint["name"] == new_addr["name"]) and -- cgit v1.2.3