aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200/b200_impl.cpp
diff options
context:
space:
mode:
authorNeel Pandeya <neel.pandeya@ettus.com>2014-09-25 16:17:43 -0700
committerNeel Pandeya <neel.pandeya@ettus.com>2014-09-25 16:17:43 -0700
commitd4f487af3fc04a4cd3685f454988f86650e2ef46 (patch)
tree9e5187167feef74865aab6975f6a527fdf18657e /host/lib/usrp/b200/b200_impl.cpp
parent8995533832f685c4fae388c52e52b06c25a82a2b (diff)
downloaduhd-d4f487af3fc04a4cd3685f454988f86650e2ef46.tar.gz
uhd-d4f487af3fc04a4cd3685f454988f86650e2ef46.tar.bz2
uhd-d4f487af3fc04a4cd3685f454988f86650e2ef46.zip
B200: added support for reading the exact product name from EEPROM for B200 and B210
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.cpp')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp15
1 files changed, 15 insertions, 0 deletions
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<boost::uint16_t>(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