Transceiver52M: Add UmTRX support
Requires Fairwaves UHD driver.
https://github.com/chemeris/UHD-Fairwaves.git
Signed-off-by: Thomas Tsou <tom@tsou.cc>
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index 261a32f..8206d3a 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -42,6 +42,7 @@
USRP1,
USRP2,
B100,
+ UMTRX,
NUM_USRP_TYPES,
};
@@ -71,6 +72,9 @@
{ B100, 1, 9.4778e-5 },
{ B100, 2, 5.1100e-5 },
{ B100, 4, 2.9418e-5 },
+ { UMTRX, 1, 9.4778e-5 },
+ { UMTRX, 2, 0.0 },
+ { UMTRX, 4, 0.0 },
};
static double get_dev_offset(enum uhd_dev_type type, int sps)
@@ -106,9 +110,10 @@
switch (type) {
case USRP2:
return USRP2_BASE_RT * sps;
- break;
case B100:
- return B100_BASE_RT * sps;
+ case UMTRX:
+ return GSMRATE * sps;
+ default:
break;
}
@@ -466,7 +471,7 @@
{
std::string mboard_str, dev_str;
uhd::property_tree::sptr prop_tree;
- size_t usrp1_str, usrp2_str, b100_str;
+ size_t usrp1_str, usrp2_str, b100_str, umtrx_str;
prop_tree = usrp_dev->get_device()->get_tree();
dev_str = prop_tree->access<std::string>("/name").get();
@@ -475,6 +480,7 @@
usrp1_str = dev_str.find("USRP1");
usrp2_str = dev_str.find("USRP2");
b100_str = mboard_str.find("B100");
+ umtrx_str = dev_str.find("UmTRX");
if (usrp1_str != std::string::npos) {
LOG(ALERT) << "USRP1 is not supported using the UHD driver";
@@ -491,6 +497,8 @@
return true;
} else if (usrp2_str != std::string::npos) {
dev_type = USRP2;
+ } else if (umtrx_str != std::string::npos) {
+ dev_type = UMTRX;
} else {
LOG(ALERT) << "Unknown UHD device type";
return false;