aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/USRPDevice.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-02-05 13:05:06 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-02-07 13:43:42 +0100
commit77ce99ac6720896f504a0581a5c57b2929a13cef (patch)
tree8124086d3ab9bc1742acb928253889090a3783e7 /Transceiver52M/USRPDevice.h
parentf58cd8ac837d13237cf88e93e45550b90d085b15 (diff)
Add support to set Rx/TxAntenna
Some devices have different Rx or Tx ports with different RF characteristics. For instance LimeSDR has H (High), L (Low) and W (Wide) band Rx ports, each of one being more suitable to a specific range of frequencies. In case one wants to support several GSM bands, the best option is to use the WideBand port and connect the antenna physically to that port in the board. Then the firmware must be instructed ro read from that port. Support for Rx/Tx port configuration is already in there for all the layers (Limesuite, SoapySDR, SoapyUHD, UHD), but we are missing the required bits in osmo-trx to make use of the available UHD API. This commit addresses it. Before this patch, the Rx/Tx paths configured could be changed by means of the LimeSuiteGUI app, but after running osmo-trx, the values were changed to the default ones. One can now start using osmo-trx with 1 channel and specific Rx/Tx ports by using for instance: osmo-trx -c 1 -y BAND1 -z LNAW Default behaviour if no specific path or an empry path is passed ("") is to do the same as preiously, ie. nothing by not calling the set{T,R}xAntenna APIs. One can also configure only specific channels, for instance to configure only the first Tx channel and the second Rx channel: osmo-trx -c 2 -y BAND1, -z ,LNAW Change-Id: I1735e6ab05a05b0312d6d679b16ebd4a2260fa23
Diffstat (limited to 'Transceiver52M/USRPDevice.h')
-rw-r--r--Transceiver52M/USRPDevice.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Transceiver52M/USRPDevice.h b/Transceiver52M/USRPDevice.h
index 3cbf672..f5fbe85 100644
--- a/Transceiver52M/USRPDevice.h
+++ b/Transceiver52M/USRPDevice.h
@@ -179,6 +179,18 @@ private:
/** return minimum Rx Gain **/
double minTxGain(void);
+ /** sets the RX path to use, returns true if successful and false otherwise */
+ bool setRxAntenna(const std::string &ant, size_t chan = 0);
+
+ /* return the used RX path */
+ std::string getRxAntenna(size_t chan = 0);
+
+ /** sets the RX path to use, returns true if successful and false otherwise */
+ bool setTxAntenna(const std::string &ant, size_t chan = 0);
+
+ /* return the used RX path */
+ std::string getTxAntenna(size_t chan = 0);
+
/** Return internal status values */
inline double getTxFreq(size_t chan = 0) { return 0; }
inline double getRxFreq(size_t chan = 0) { return 0; }