Compare commits

...

2 Commits

Author SHA1 Message Date
Keith
3629017b0d Add 4/4 Tx/Rx SPS definition for OCR01 2020-03-23 14:22:36 -05:00
Keith
6d496c8e15 Add Device Definition for the OC Connect1 SDR
This patch forward ports the relevant parts of a patch
from OpenCellular for osmo-trx versions previous to commit
1fb0ce67d8
so that osmo-trx-uhd recognizes the hardware, somewhat documented here:

https://github.com/Telecominfraproject/OpenCellular/blob/master/electronics/radio/SDR/

Note: I'm not very familiar with the hardware. It requires a patch to the
Ettus UHD driver to load the correct FPGA fw in which one call to
check_fpga_compat() is commented.
Otherwise mostly changes identifiers and log messages to "OCR01".

The usb device is reported as Vid:2500 Pid:0020 (Ettus,B200) but
I'm not sure how compatible it is. The fpga FW is different.
2020-03-23 14:13:25 -05:00
2 changed files with 7 additions and 1 deletions

View File

@@ -121,6 +121,8 @@ static const std::map<dev_key, dev_desc> dev_param_map {
{ std::make_tuple(UMTRX, 4, 4), { 2, 0.0, GSMRATE, 5.1503e-5, "UmTRX 4 SPS" } }, { std::make_tuple(UMTRX, 4, 4), { 2, 0.0, GSMRATE, 5.1503e-5, "UmTRX 4 SPS" } },
{ std::make_tuple(LIMESDR, 4, 4), { 1, GSMRATE*32, GSMRATE, 8.9e-5, "LimeSDR 4 SPS" } }, { std::make_tuple(LIMESDR, 4, 4), { 1, GSMRATE*32, GSMRATE, 8.9e-5, "LimeSDR 4 SPS" } },
{ std::make_tuple(B2XX_MCBTS, 4, 4), { 1, 51.2e6, MCBTS_SPACING*4, B2XX_TIMING_MCBTS, "B200/B210 4 SPS Multi-ARFCN" } }, { std::make_tuple(B2XX_MCBTS, 4, 4), { 1, 51.2e6, MCBTS_SPACING*4, B2XX_TIMING_MCBTS, "B200/B210 4 SPS Multi-ARFCN" } },
{ std::make_tuple(OCR01, 4, 1), { 2, 26e6, GSMRATE, B2XX_TIMING_4SPS, "OCR01 4/1 Tx/Rx SPS"} },
{ std::make_tuple(OCR01, 4, 4), { 2, 26e6, GSMRATE, B2XX_TIMING_4_4SPS, "OCR01 4/4 Tx/Rx SPS"} },
}; };
void *async_event_loop(uhd_device *dev) void *async_event_loop(uhd_device *dev)
@@ -368,6 +370,7 @@ bool uhd_device::parse_dev_type()
{ "USRP2", { USRP2, TX_WINDOW_FIXED } }, { "USRP2", { USRP2, TX_WINDOW_FIXED } },
{ "UmTRX", { UMTRX, TX_WINDOW_FIXED } }, { "UmTRX", { UMTRX, TX_WINDOW_FIXED } },
{ "LimeSDR", { LIMESDR, TX_WINDOW_FIXED } }, { "LimeSDR", { LIMESDR, TX_WINDOW_FIXED } },
{ "OCR01", { OCR01, TX_WINDOW_USRP1 } },
}; };
// Compare UHD motherboard and device strings */ // Compare UHD motherboard and device strings */
@@ -409,7 +412,7 @@ static bool uhd_e3xx_version_chk()
void uhd_device::set_channels(bool swap) void uhd_device::set_channels(bool swap)
{ {
if (iface == MULTI_ARFCN) { if (iface == MULTI_ARFCN) {
if (dev_type != B200 && dev_type != B210) if (dev_type != B200 && dev_type != B210 && dev_type != OCR01)
throw std::invalid_argument("Device does not support MCBTS"); throw std::invalid_argument("Device does not support MCBTS");
dev_type = B2XX_MCBTS; dev_type = B2XX_MCBTS;
} }
@@ -421,6 +424,7 @@ void uhd_device::set_channels(bool swap)
switch (dev_type) { switch (dev_type) {
case B210: case B210:
case E3XX: case E3XX:
case OCR01:
if (chans == 1) if (chans == 1)
subdev_string = swap ? "A:B" : "A:A"; subdev_string = swap ? "A:B" : "A:A";
else if (chans == 2) else if (chans == 2)
@@ -582,6 +586,7 @@ int uhd_device::open(const std::string &args, int ref, bool swap_channels)
case E1XX: case E1XX:
case E3XX: case E3XX:
case LIMESDR: case LIMESDR:
case OCR01:
default: default:
break; break;
} }

View File

@@ -50,6 +50,7 @@ enum uhd_dev_type {
X3XX, X3XX,
UMTRX, UMTRX,
LIMESDR, LIMESDR,
OCR01,
}; };
/* /*