diff options
Diffstat (limited to 'Transceiver52M/osmo-trx.cpp')
-rw-r--r-- | Transceiver52M/osmo-trx.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index c8fd9a8..e7b2a16 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -81,6 +81,7 @@ struct trx_config { double offset; double rssi_offset; bool swap_channels; + bool edge; }; ConfigurationTable gConfig; @@ -130,7 +131,7 @@ bool testConfig() */ bool trx_setup_config(struct trx_config *config) { - std::string refstr, fillstr, divstr; + std::string refstr, fillstr, divstr, edgestr; if (!testConfig()) return false; @@ -170,6 +171,7 @@ bool trx_setup_config(struct trx_config *config) if (config->diversity) config->chans = 2; + edgestr = config->edge ? "Enabled" : "Disabled"; refstr = config->extref ? "Enabled" : "Disabled"; divstr = config->diversity ? "Enabled" : "Disabled"; switch (config->filler) { @@ -192,6 +194,7 @@ bool trx_setup_config(struct trx_config *config) ost << " TRX Address............. " << config->addr << std::endl; ost << " Channels................ " << config->chans << std::endl; ost << " Tx Samples-per-Symbol... " << config->tx_sps << std::endl; + ost << " EDGE support............ " << edgestr << std::endl; ost << " External Reference...... " << refstr << std::endl; ost << " C0 Filler Table......... " << fillstr << std::endl; ost << " Diversity............... " << divstr << std::endl; @@ -215,6 +218,10 @@ RadioInterface *makeRadioInterface(struct trx_config *config, { RadioInterface *radio = NULL; + if ((config->rx_sps != 1) && (type != RadioDevice::NORMAL)) { + LOG(ALERT) << "Unsupported radio interface configuration"; + } + switch (type) { case RadioDevice::NORMAL: radio = new RadioInterface(usrp, config->tx_sps, @@ -301,6 +308,7 @@ static void print_help() " -l Logging level (%s)\n" " -i IP address of GSM core\n" " -p Base port number\n" + " -e Enable EDGE receiver\n" " -d Enable dual channel diversity receiver\n" " -x Enable external 10 MHz reference\n" " -s Samples-per-symbol (1 or 4)\n" @@ -328,8 +336,9 @@ static void handle_options(int argc, char **argv, struct trx_config *config) config->offset = 0.0; config->rssi_offset = 0.0; config->swap_channels = false; + config->edge = false; - while ((option = getopt(argc, argv, "ha:l:i:p:c:dxfo:s:r:R:S")) != -1) { + while ((option = getopt(argc, argv, "ha:l:i:p:c:dxfo:s:r:R:Se")) != -1) { switch (option) { case 'h': print_help(); @@ -375,6 +384,10 @@ static void handle_options(int argc, char **argv, struct trx_config *config) case 'S': config->swap_channels = true; break; + case 'e': + config->edge = true; + config->rx_sps = 4; + break; default: print_help(); exit(0); @@ -387,6 +400,12 @@ static void handle_options(int argc, char **argv, struct trx_config *config) exit(0); } + if (config->edge && (config->tx_sps != 4)) { + printf("EDGE only supported at 4 samples per symbol\n\n"); + print_help(); + exit(0); + } + if (config->rtsc > 7) { printf("Invalid training sequence %i\n\n", config->rtsc); print_help(); |