mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-13 10:26:04 +00:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
424c74d006 | ||
|
|
a7143d3cd0 | ||
|
|
019d698126 | ||
|
|
a686277c72 | ||
|
|
683f140739 | ||
|
|
5e40d92400 | ||
|
|
bb2cb9d54b | ||
|
|
b9423b25b6 | ||
|
|
069f5cd857 | ||
|
|
c90b207803 | ||
|
|
985694175d | ||
|
|
ac8a4e7297 | ||
|
|
e16d0e1330 | ||
|
|
e6fdf8fcad | ||
|
|
cdd77a447d | ||
|
|
7f696801ae | ||
|
|
d16eb314ed | ||
|
|
27bd2f6dd1 | ||
|
|
8803f923f9 | ||
|
|
ecea734b97 | ||
|
|
0c34c64a16 | ||
|
|
0a038223d0 | ||
|
|
5e6b10cd9e | ||
|
|
b6f238c0f2 | ||
|
|
c27fe60a25 | ||
|
|
a1ea63f777 | ||
|
|
c7930b0b22 | ||
|
|
17ce7740e5 | ||
|
|
d06259f348 | ||
|
|
6c646c35b9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -67,7 +67,6 @@ doc/manuals/generated/
|
|||||||
doc/manuals/vty/osmotrx-*-vty-reference.xml
|
doc/manuals/vty/osmotrx-*-vty-reference.xml
|
||||||
doc/manuals/vty/osmotrx-*-vty-reference.xml.inc.gen
|
doc/manuals/vty/osmotrx-*-vty-reference.xml.inc.gen
|
||||||
doc/manuals/vty/osmotrx-*-vty-reference.xml.inc.merged
|
doc/manuals/vty/osmotrx-*-vty-reference.xml.inc.merged
|
||||||
doc/manuals/osmomsc-usermanual.xml
|
|
||||||
doc/manuals/common
|
doc/manuals/common
|
||||||
doc/manuals/build
|
doc/manuals/build
|
||||||
|
|
||||||
|
|||||||
@@ -50,19 +50,19 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LOG(level) \
|
#define LOG(level) \
|
||||||
Log(DMAIN, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
|
Log(DMAIN, LOGL_##level, __BASE_FILE__, __LINE__).get()
|
||||||
|
|
||||||
#define LOGC(category, level) \
|
#define LOGC(category, level) \
|
||||||
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
|
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get()
|
||||||
|
|
||||||
#define LOGLV(category, level) \
|
#define LOGLV(category, level) \
|
||||||
Log(category, level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
|
Log(category, level, __BASE_FILE__, __LINE__).get()
|
||||||
|
|
||||||
#define LOGSRC(category, level, file, line) \
|
#define LOGSRC(category, level, file, line) \
|
||||||
Log(category, level, file, line).get() << "[tid=" << pthread_self() << "] "
|
Log(category, level, file, line).get()
|
||||||
|
|
||||||
#define LOGCHAN(chan, category, level) \
|
#define LOGCHAN(chan, category, level) \
|
||||||
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "][chan=" << chan << "] "
|
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[chan=" << chan << "] "
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A C++ stream-based thread-safe logger.
|
A C++ stream-based thread-safe logger.
|
||||||
|
|||||||
@@ -12,10 +12,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PRBS_H
|
#ifndef PRBS_H
|
||||||
|
|||||||
@@ -32,7 +32,9 @@
|
|||||||
#include "Timeval.h"
|
#include "Timeval.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include <osmocom/core/thread.h>
|
#include <osmocom/core/thread.h>
|
||||||
|
}
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -47,7 +49,7 @@ void lockCout()
|
|||||||
{
|
{
|
||||||
gStreamLock.lock();
|
gStreamLock.lock();
|
||||||
Timeval entryTime;
|
Timeval entryTime;
|
||||||
cout << entryTime << " " << pthread_self() << ": ";
|
cout << entryTime << " " << osmo_gettid() << ": ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -62,7 +64,7 @@ void lockCerr()
|
|||||||
{
|
{
|
||||||
gStreamLock.lock();
|
gStreamLock.lock();
|
||||||
Timeval entryTime;
|
Timeval entryTime;
|
||||||
cerr << entryTime << " " << pthread_self() << ": ";
|
cerr << entryTime << " " << osmo_gettid() << ": ";
|
||||||
}
|
}
|
||||||
|
|
||||||
void unlockCerr()
|
void unlockCerr()
|
||||||
|
|||||||
@@ -12,10 +12,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -12,10 +12,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ struct trx_cfg {
|
|||||||
double offset;
|
double offset;
|
||||||
double freq_offset_khz;
|
double freq_offset_khz;
|
||||||
double rssi_offset;
|
double rssi_offset;
|
||||||
|
int ul_fn_offset;
|
||||||
bool force_rssi_offset; /* Force value set in VTY? */
|
bool force_rssi_offset; /* Force value set in VTY? */
|
||||||
bool swap_channels;
|
bool swap_channels;
|
||||||
bool ext_rach;
|
bool ext_rach;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <osmocom/core/logging.h>
|
#include <osmocom/core/logging.h>
|
||||||
#include <osmocom/core/thread.h>
|
|
||||||
|
|
||||||
extern const struct log_info log_info;
|
extern const struct log_info log_info;
|
||||||
|
|
||||||
@@ -19,10 +18,6 @@ enum {
|
|||||||
DCTR,
|
DCTR,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CLOGC(category, level, fmt, args...) do { \
|
|
||||||
LOGP(category, level, "[tid=%ld] " fmt, (long int) osmo_gettid(), ##args); \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
#define CLOGCHAN(chan, category, level, fmt, args...) do { \
|
#define CLOGCHAN(chan, category, level, fmt, args...) do { \
|
||||||
LOGP(category, level, "[tid=%ld][chan=%zu] " fmt, (long int) osmo_gettid(), chan, ##args); \
|
LOGP(category, level, "[chan=%zu] " fmt, chan, ##args); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|||||||
@@ -147,17 +147,17 @@ static int dev_rate_ctr_timerfd_cb(struct osmo_fd *ofd, unsigned int what) {
|
|||||||
if (dev_ctrs_pending[chan].chan == PENDING_CHAN_NONE)
|
if (dev_ctrs_pending[chan].chan == PENDING_CHAN_NONE)
|
||||||
continue;
|
continue;
|
||||||
LOGCHAN(chan, DCTR, DEBUG) << "rate_ctr update";
|
LOGCHAN(chan, DCTR, DEBUG) << "rate_ctr update";
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_DEV_RX_OVERRUNS];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_DEV_RX_OVERRUNS);
|
||||||
rate_ctr_add(ctr, dev_ctrs_pending[chan].rx_overruns - ctr->current);
|
rate_ctr_add(ctr, dev_ctrs_pending[chan].rx_overruns - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_DEV_TX_UNDERRUNS];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_DEV_TX_UNDERRUNS);
|
||||||
rate_ctr_add(ctr, dev_ctrs_pending[chan].tx_underruns - ctr->current);
|
rate_ctr_add(ctr, dev_ctrs_pending[chan].tx_underruns - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_DEV_RX_DROP_EV];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_DEV_RX_DROP_EV);
|
||||||
rate_ctr_add(ctr, dev_ctrs_pending[chan].rx_dropped_events - ctr->current);
|
rate_ctr_add(ctr, dev_ctrs_pending[chan].rx_dropped_events - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_DEV_RX_DROP_SMPL];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_DEV_RX_DROP_SMPL);
|
||||||
rate_ctr_add(ctr, dev_ctrs_pending[chan].rx_dropped_samples - ctr->current);
|
rate_ctr_add(ctr, dev_ctrs_pending[chan].rx_dropped_samples - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_DEV_TX_DROP_EV];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_DEV_TX_DROP_EV);
|
||||||
rate_ctr_add(ctr, dev_ctrs_pending[chan].tx_dropped_events - ctr->current);
|
rate_ctr_add(ctr, dev_ctrs_pending[chan].tx_dropped_events - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_DEV_TX_DROP_SMPL];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_DEV_TX_DROP_SMPL);
|
||||||
rate_ctr_add(ctr, dev_ctrs_pending[chan].tx_dropped_samples - ctr->current);
|
rate_ctr_add(ctr, dev_ctrs_pending[chan].tx_dropped_samples - ctr->current);
|
||||||
|
|
||||||
/* Mark as done */
|
/* Mark as done */
|
||||||
@@ -178,21 +178,21 @@ static int trx_rate_ctr_timerfd_cb(struct osmo_fd *ofd, unsigned int what) {
|
|||||||
if (trx_ctrs_pending[chan].chan == PENDING_CHAN_NONE)
|
if (trx_ctrs_pending[chan].chan == PENDING_CHAN_NONE)
|
||||||
continue;
|
continue;
|
||||||
LOGCHAN(chan, DCTR, DEBUG) << "rate_ctr update";
|
LOGCHAN(chan, DCTR, DEBUG) << "rate_ctr update";
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TX_STALE_BURSTS];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_TX_STALE_BURSTS);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_stale_bursts - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_stale_bursts - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TX_UNAVAILABLE_BURSTS];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_TX_UNAVAILABLE_BURSTS);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_unavailable_bursts - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_unavailable_bursts - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TRXD_FN_REPEATED];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_TRXD_FN_REPEATED);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_repeated - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_repeated - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TRXD_FN_OUTOFORDER];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_TRXD_FN_OUTOFORDER);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_outoforder - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_outoforder - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TRXD_FN_SKIPPED];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_TRXD_FN_SKIPPED);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_skipped - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_skipped - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_RX_EMPTY_BURST];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_RX_EMPTY_BURST);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_empty_burst - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_empty_burst - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_RX_CLIPPING];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_RX_CLIPPING);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_clipping - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_clipping - ctr->current);
|
||||||
ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_RX_NO_BURST_DETECTED];
|
ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], TRX_CTR_TRX_RX_NO_BURST_DETECTED);
|
||||||
rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_no_burst_detected - ctr->current);
|
rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_no_burst_detected - ctr->current);
|
||||||
/* Mark as done */
|
/* Mark as done */
|
||||||
trx_ctrs_pending[chan].chan = PENDING_CHAN_NONE;
|
trx_ctrs_pending[chan].chan = PENDING_CHAN_NONE;
|
||||||
@@ -214,6 +214,7 @@ static int device_sig_cb(unsigned int subsys, unsigned int signal,
|
|||||||
struct timespec next_sched = {.tv_sec = 0, .tv_nsec = 20*1000*1000};
|
struct timespec next_sched = {.tv_sec = 0, .tv_nsec = 20*1000*1000};
|
||||||
/* no automatic re-trigger */
|
/* no automatic re-trigger */
|
||||||
struct timespec intv_sched = {.tv_sec = 0, .tv_nsec = 0};
|
struct timespec intv_sched = {.tv_sec = 0, .tv_nsec = 0};
|
||||||
|
char err_buf[256];
|
||||||
|
|
||||||
switch (signal) {
|
switch (signal) {
|
||||||
case S_DEVICE_COUNTER_CHANGE:
|
case S_DEVICE_COUNTER_CHANGE:
|
||||||
@@ -222,7 +223,8 @@ static int device_sig_cb(unsigned int subsys, unsigned int signal,
|
|||||||
dev_rate_ctr_mutex.lock();
|
dev_rate_ctr_mutex.lock();
|
||||||
dev_ctrs_pending[dev_ctr->chan] = *dev_ctr;
|
dev_ctrs_pending[dev_ctr->chan] = *dev_ctr;
|
||||||
if (osmo_timerfd_schedule(&dev_rate_ctr_timerfd, &next_sched, &intv_sched) < 0) {
|
if (osmo_timerfd_schedule(&dev_rate_ctr_timerfd, &next_sched, &intv_sched) < 0) {
|
||||||
LOGC(DCTR, ERROR) << "Failed to schedule timerfd: " << errno << " = "<< strerror(errno);
|
LOGC(DCTR, ERROR) << "Failed to schedule timerfd: " << errno
|
||||||
|
<< " = "<< strerror_r(errno, err_buf, sizeof(err_buf));
|
||||||
}
|
}
|
||||||
dev_rate_ctr_mutex.unlock();
|
dev_rate_ctr_mutex.unlock();
|
||||||
break;
|
break;
|
||||||
@@ -232,7 +234,8 @@ static int device_sig_cb(unsigned int subsys, unsigned int signal,
|
|||||||
trx_rate_ctr_mutex.lock();
|
trx_rate_ctr_mutex.lock();
|
||||||
trx_ctrs_pending[trx_ctr->chan] = *trx_ctr;
|
trx_ctrs_pending[trx_ctr->chan] = *trx_ctr;
|
||||||
if (osmo_timerfd_schedule(&trx_rate_ctr_timerfd, &next_sched, &intv_sched) < 0) {
|
if (osmo_timerfd_schedule(&trx_rate_ctr_timerfd, &next_sched, &intv_sched) < 0) {
|
||||||
LOGC(DCTR, ERROR) << "Failed to schedule timerfd: " << errno << " = "<< strerror(errno);
|
LOGC(DCTR, ERROR) << "Failed to schedule timerfd: " << errno
|
||||||
|
<< " = "<< strerror_r(errno, err_buf, sizeof(err_buf));
|
||||||
}
|
}
|
||||||
trx_rate_ctr_mutex.unlock();
|
trx_rate_ctr_mutex.unlock();
|
||||||
break;
|
break;
|
||||||
@@ -263,7 +266,7 @@ static void threshold_timer_cb(void *data)
|
|||||||
|
|
||||||
llist_for_each_entry(ctr_thr, &threshold_list, list) {
|
llist_for_each_entry(ctr_thr, &threshold_list, list) {
|
||||||
for (chan = 0; chan < chan_len; chan++) {
|
for (chan = 0; chan < chan_len; chan++) {
|
||||||
rate_ctr = &rate_ctrs[chan]->ctr[ctr_thr->ctr_id];
|
rate_ctr = rate_ctr_group_get_ctr(rate_ctrs[chan], ctr_thr->ctr_id);
|
||||||
LOGCHAN(chan, DCTR, INFO) << "checking threshold: " << ctr_threshold_2_vty_str(ctr_thr)
|
LOGCHAN(chan, DCTR, INFO) << "checking threshold: " << ctr_threshold_2_vty_str(ctr_thr)
|
||||||
<< " ("<< rate_ctr->intv[ctr_thr->intv].rate << " vs " << ctr_thr->val << ")";
|
<< " ("<< rate_ctr->intv[ctr_thr->intv].rate << " vs " << ctr_thr->val << ")";
|
||||||
if (rate_ctr->intv[ctr_thr->intv].rate >= ctr_thr->val) {
|
if (rate_ctr->intv[ctr_thr->intv].rate >= ctr_thr->val) {
|
||||||
|
|||||||
@@ -271,6 +271,20 @@ DEFUN(cfg_rssi_offset, cfg_rssi_offset_cmd,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DEFUN_ATTR(cfg_ul_fn_offset, cfg_ul_fn_offset_cmd,
|
||||||
|
"ul-fn-offset <-10-10>",
|
||||||
|
"Adjusts the uplink frame FN by the specified amount\n"
|
||||||
|
"Frame Number offset\n",
|
||||||
|
CMD_ATTR_HIDDEN)
|
||||||
|
{
|
||||||
|
struct trx_ctx *trx = trx_from_vty(vty);
|
||||||
|
|
||||||
|
trx->cfg.ul_fn_offset = atoi(argv[0]);
|
||||||
|
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN(cfg_swap_channels, cfg_swap_channels_cmd,
|
DEFUN(cfg_swap_channels, cfg_swap_channels_cmd,
|
||||||
"swap-channels (disable|enable)",
|
"swap-channels (disable|enable)",
|
||||||
"Swap primary and secondary channels of the PHY (if any)\n"
|
"Swap primary and secondary channels of the PHY (if any)\n"
|
||||||
@@ -624,6 +638,8 @@ static int config_write_trx(struct vty *vty)
|
|||||||
vty_out(vty, " filler access-burst-delay %u%s", trx->cfg.rach_delay, VTY_NEWLINE);
|
vty_out(vty, " filler access-burst-delay %u%s", trx->cfg.rach_delay, VTY_NEWLINE);
|
||||||
if (trx->cfg.stack_size != 0)
|
if (trx->cfg.stack_size != 0)
|
||||||
vty_out(vty, " stack-size %u%s", trx->cfg.stack_size, VTY_NEWLINE);
|
vty_out(vty, " stack-size %u%s", trx->cfg.stack_size, VTY_NEWLINE);
|
||||||
|
if (trx->cfg.ul_fn_offset != 0)
|
||||||
|
vty_out(vty, " ul-fn-offset %d%s", trx->cfg.ul_fn_offset, VTY_NEWLINE);
|
||||||
trx_rate_ctr_threshold_write_config(vty, " ");
|
trx_rate_ctr_threshold_write_config(vty, " ");
|
||||||
|
|
||||||
for (i = 0; i < trx->cfg.num_chans; i++) {
|
for (i = 0; i < trx->cfg.num_chans; i++) {
|
||||||
@@ -787,6 +803,7 @@ int trx_vty_init(struct trx_ctx* trx)
|
|||||||
install_element(TRX_NODE, &cfg_stack_size_cmd);
|
install_element(TRX_NODE, &cfg_stack_size_cmd);
|
||||||
|
|
||||||
install_element(TRX_NODE, &cfg_chan_cmd);
|
install_element(TRX_NODE, &cfg_chan_cmd);
|
||||||
|
install_element(TRX_NODE, &cfg_ul_fn_offset_cmd);
|
||||||
install_node(&chan_node, dummy_config_write);
|
install_node(&chan_node, dummy_config_write);
|
||||||
install_element(CHAN_NODE, &cfg_chan_rx_path_cmd);
|
install_element(CHAN_NODE, &cfg_chan_rx_path_cmd);
|
||||||
install_element(CHAN_NODE, &cfg_chan_tx_path_cmd);
|
install_element(CHAN_NODE, &cfg_chan_tx_path_cmd);
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _RESAMPLER_H_
|
#ifndef _RESAMPLER_H_
|
||||||
|
|||||||
@@ -649,7 +649,7 @@ int Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set time and determine correlation type */
|
/* Set time and determine correlation type */
|
||||||
burstTime = radio_burst->getTime();
|
burstTime = radio_burst->getTime() + cfg->ul_fn_offset;
|
||||||
CorrType type = expectedCorrType(burstTime, chan);
|
CorrType type = expectedCorrType(burstTime, chan);
|
||||||
|
|
||||||
/* Initialize struct bi */
|
/* Initialize struct bi */
|
||||||
@@ -1003,7 +1003,7 @@ int Transceiver::ctrl_sock_handle_rx(int chan)
|
|||||||
LOGCHAN(chan, DTRXCTRL, INFO) << "BTS requests TRXD version switch: " << version_recv;
|
LOGCHAN(chan, DTRXCTRL, INFO) << "BTS requests TRXD version switch: " << version_recv;
|
||||||
if (version_recv > TRX_DATA_FORMAT_VER) {
|
if (version_recv > TRX_DATA_FORMAT_VER) {
|
||||||
LOGCHAN(chan, DTRXCTRL, INFO) << "rejecting TRXD version " << version_recv
|
LOGCHAN(chan, DTRXCTRL, INFO) << "rejecting TRXD version " << version_recv
|
||||||
<< "in favor of " << TRX_DATA_FORMAT_VER;
|
<< " in favor of " << TRX_DATA_FORMAT_VER;
|
||||||
sprintf(response, "RSP SETFORMAT %u %u", TRX_DATA_FORMAT_VER, version_recv);
|
sprintf(response, "RSP SETFORMAT %u %u", TRX_DATA_FORMAT_VER, version_recv);
|
||||||
} else {
|
} else {
|
||||||
LOGCHAN(chan, DTRXCTRL, NOTICE) << "switching to TRXD version " << version_recv;
|
LOGCHAN(chan, DTRXCTRL, NOTICE) << "switching to TRXD version " << version_recv;
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "convert.h"
|
#include "convert.h"
|
||||||
|
|||||||
@@ -13,10 +13,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -100,12 +100,14 @@ IPCDevice::~IPCDevice()
|
|||||||
int IPCDevice::ipc_shm_connect(const char *shm_name)
|
int IPCDevice::ipc_shm_connect(const char *shm_name)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
char err_buf[256];
|
||||||
size_t shm_len;
|
size_t shm_len;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
LOGP(DDEV, LOGL_NOTICE, "Opening shm path %s\n", shm_name);
|
LOGP(DDEV, LOGL_NOTICE, "Opening shm path %s\n", shm_name);
|
||||||
if ((fd = shm_open(shm_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) {
|
if ((fd = shm_open(shm_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) < 0) {
|
||||||
LOGP(DDEV, LOGL_ERROR, "shm_open %d: %s\n", errno, strerror(errno));
|
LOGP(DDEV, LOGL_ERROR, "shm_open %d: %s\n", errno,
|
||||||
|
strerror_r(errno, err_buf, sizeof(err_buf)));
|
||||||
rc = -errno;
|
rc = -errno;
|
||||||
goto err_shm_open;
|
goto err_shm_open;
|
||||||
}
|
}
|
||||||
@@ -113,7 +115,8 @@ int IPCDevice::ipc_shm_connect(const char *shm_name)
|
|||||||
// Get size of the allocated memory
|
// Get size of the allocated memory
|
||||||
struct stat shm_stat;
|
struct stat shm_stat;
|
||||||
if (fstat(fd, &shm_stat) < 0) {
|
if (fstat(fd, &shm_stat) < 0) {
|
||||||
LOGP(DDEV, LOGL_ERROR, "fstat %d: %s\n", errno, strerror(errno));
|
LOGP(DDEV, LOGL_ERROR, "fstat %d: %s\n", errno,
|
||||||
|
strerror_r(errno, err_buf, sizeof(err_buf)));
|
||||||
rc = -errno;
|
rc = -errno;
|
||||||
goto err_mmap;
|
goto err_mmap;
|
||||||
}
|
}
|
||||||
@@ -122,7 +125,8 @@ int IPCDevice::ipc_shm_connect(const char *shm_name)
|
|||||||
|
|
||||||
LOGP(DDEV, LOGL_NOTICE, "mmaping shared memory fd %d (size=%zu)\n", fd, shm_len);
|
LOGP(DDEV, LOGL_NOTICE, "mmaping shared memory fd %d (size=%zu)\n", fd, shm_len);
|
||||||
if ((shm = mmap(NULL, shm_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
|
if ((shm = mmap(NULL, shm_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
|
||||||
LOGP(DDEV, LOGL_ERROR, "mmap %d: %s\n", errno, strerror(errno));
|
LOGP(DDEV, LOGL_ERROR, "mmap %d: %s\n", errno,
|
||||||
|
strerror_r(errno, err_buf, sizeof(err_buf)));
|
||||||
rc = -errno;
|
rc = -errno;
|
||||||
goto err_mmap;
|
goto err_mmap;
|
||||||
}
|
}
|
||||||
@@ -835,6 +839,7 @@ void IPCDevice::manually_poll_sock_fds()
|
|||||||
{
|
{
|
||||||
struct timeval wait = { 0, 100000 };
|
struct timeval wait = { 0, 100000 };
|
||||||
fd_set crfds, cwfds;
|
fd_set crfds, cwfds;
|
||||||
|
char err_buf[256];
|
||||||
int max_fd = 0;
|
int max_fd = 0;
|
||||||
|
|
||||||
FD_ZERO(&crfds);
|
FD_ZERO(&crfds);
|
||||||
@@ -849,7 +854,11 @@ void IPCDevice::manually_poll_sock_fds()
|
|||||||
FD_SET(curr_fd->fd, &cwfds);
|
FD_SET(curr_fd->fd, &cwfds);
|
||||||
}
|
}
|
||||||
|
|
||||||
select(max_fd + 1, &crfds, &cwfds, 0, &wait);
|
if (select(max_fd + 1, &crfds, &cwfds, 0, &wait) < 0) {
|
||||||
|
LOGP(DDEV, LOGL_ERROR, "select() failed: %s\n",
|
||||||
|
strerror_r(errno, err_buf, sizeof(err_buf)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < chans; i++) {
|
for (unsigned int i = 0; i < chans; i++) {
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|||||||
@@ -32,11 +32,12 @@ bin_PROGRAMS = ipc-driver-test
|
|||||||
ipc_driver_test_SOURCES = ipc-driver-test.c uhdwrap.cpp ipc_shm.c ipc_chan.c ipc_sock.c uhddev_ipc.cpp
|
ipc_driver_test_SOURCES = ipc-driver-test.c uhdwrap.cpp ipc_shm.c ipc_chan.c ipc_sock.c uhddev_ipc.cpp
|
||||||
ipc_driver_test_LDADD = \
|
ipc_driver_test_LDADD = \
|
||||||
shm.lo \
|
shm.lo \
|
||||||
|
$(top_builddir)/Transceiver52M/device/common/libdevice_common.la \
|
||||||
|
$(COMMON_LA)
|
||||||
$(LIBOSMOCORE_LIBS) \
|
$(LIBOSMOCORE_LIBS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
ipc_driver_test_CXXFLAGS = $(AM_CXXFLAGS) $(UHD_CFLAGS)
|
ipc_driver_test_CXXFLAGS = $(AM_CXXFLAGS) $(UHD_CFLAGS)
|
||||||
ipc_driver_test_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS)
|
ipc_driver_test_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS)
|
||||||
ipc_driver_test_CFLAGS = $(AM_CFLAGS) $(UHD_CFLAGS)
|
ipc_driver_test_CFLAGS = $(AM_CFLAGS) $(UHD_CFLAGS)
|
||||||
ipc_driver_test_LDFLAGS = $(AM_LDFLAGS) $(UHD_LIBS)
|
ipc_driver_test_LDFLAGS = $(AM_LDFLAGS) $(UHD_LIBS)
|
||||||
ipc_driver_test_LDADD += $(top_builddir)/Transceiver52M/device/common/libdevice_common.la $(top_builddir)/CommonLibs/libcommon.la
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ LMSDevice::LMSDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t c
|
|||||||
const std::vector<std::string>& tx_paths,
|
const std::vector<std::string>& tx_paths,
|
||||||
const std::vector<std::string>& rx_paths):
|
const std::vector<std::string>& rx_paths):
|
||||||
RadioDevice(tx_sps, rx_sps, iface, chan_num, lo_offset, tx_paths, rx_paths),
|
RadioDevice(tx_sps, rx_sps, iface, chan_num, lo_offset, tx_paths, rx_paths),
|
||||||
m_lms_dev(NULL), started(false), band((enum gsm_band)0), m_dev_type(LMS_DEV_UNKNOWN)
|
m_lms_dev(NULL), started(false), band_ass_curr_sess(false), band((enum gsm_band)0),
|
||||||
|
m_dev_type(LMS_DEV_UNKNOWN)
|
||||||
{
|
{
|
||||||
LOGC(DDEV, INFO) << "creating LMS device...";
|
LOGC(DDEV, INFO) << "creating LMS device...";
|
||||||
|
|
||||||
@@ -240,14 +241,17 @@ void LMSDevice::assign_band_desc(enum gsm_band req_band)
|
|||||||
|
|
||||||
bool LMSDevice::set_band(enum gsm_band req_band)
|
bool LMSDevice::set_band(enum gsm_band req_band)
|
||||||
{
|
{
|
||||||
if (band != 0 && req_band != band) {
|
if (band_ass_curr_sess && req_band != band) {
|
||||||
LOGC(DDEV, ALERT) << "Requesting band " << gsm_band_name(req_band)
|
LOGC(DDEV, ALERT) << "Requesting band " << gsm_band_name(req_band)
|
||||||
<< " different from previous band " << gsm_band_name(band);
|
<< " different from previous band " << gsm_band_name(band);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (req_band != band) {
|
||||||
band = req_band;
|
band = req_band;
|
||||||
assign_band_desc(band);
|
assign_band_desc(band);
|
||||||
|
}
|
||||||
|
band_ass_curr_sess = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,11 +277,12 @@ int LMSDevice::open(const std::string &args, int ref, bool swap_channels)
|
|||||||
|
|
||||||
LMS_RegisterLogHandler(&lms_log_callback);
|
LMS_RegisterLogHandler(&lms_log_callback);
|
||||||
|
|
||||||
if ((n = LMS_GetDeviceList(NULL)) < 0)
|
if ((rc = LMS_GetDeviceList(NULL)) < 0)
|
||||||
LOGC(DDEV, ERROR) << "LMS_GetDeviceList(NULL) failed";
|
LOGC(DDEV, ERROR) << "LMS_GetDeviceList(NULL) failed";
|
||||||
LOGC(DDEV, INFO) << "Devices found: " << n;
|
LOGC(DDEV, INFO) << "Devices found: " << rc;
|
||||||
if (n < 1)
|
if (rc < 1)
|
||||||
return -1;
|
return -1;
|
||||||
|
n = rc;
|
||||||
|
|
||||||
info_list = new lms_info_str_t[n];
|
info_list = new lms_info_str_t[n];
|
||||||
|
|
||||||
@@ -464,6 +469,8 @@ bool LMSDevice::stop()
|
|||||||
LMS_DestroyStream(m_lms_dev, &m_lms_stream_rx[i]);
|
LMS_DestroyStream(m_lms_dev, &m_lms_stream_rx[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
band_ass_curr_sess = false;
|
||||||
|
|
||||||
started = false;
|
started = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1013,25 +1020,38 @@ bool LMSDevice::setTxFreq(double wFreq, size_t chan)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (band != 0 && req_band != band) {
|
if (!set_band(req_band))
|
||||||
LOGCHAN(chan, DDEV, ALERT) << "Requesting Tx Frequency " << wFreq
|
|
||||||
<< " Hz different from previous band " << gsm_band_name(band);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if (LMS_SetLOFrequency(m_lms_dev, LMS_CH_TX, chan, wFreq) < 0) {
|
if (LMS_SetLOFrequency(m_lms_dev, LMS_CH_TX, chan, wFreq) < 0) {
|
||||||
LOGCHAN(chan, DDEV, ERROR) << "Error setting Tx Freq to " << wFreq << " Hz";
|
LOGCHAN(chan, DDEV, ERROR) << "Error setting Tx Freq to " << wFreq << " Hz";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
band = req_band;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LMSDevice::setRxFreq(double wFreq, size_t chan)
|
bool LMSDevice::setRxFreq(double wFreq, size_t chan)
|
||||||
{
|
{
|
||||||
|
uint16_t req_arfcn;
|
||||||
|
enum gsm_band req_band;
|
||||||
|
|
||||||
LOGCHAN(chan, DDEV, NOTICE) << "Setting Rx Freq to " << wFreq << " Hz";
|
LOGCHAN(chan, DDEV, NOTICE) << "Setting Rx Freq to " << wFreq << " Hz";
|
||||||
|
|
||||||
|
req_arfcn = gsm_freq102arfcn(wFreq / 1000 / 100, 1);
|
||||||
|
if (req_arfcn == 0xffff) {
|
||||||
|
LOGCHAN(chan, DDEV, ALERT) << "Unknown ARFCN for Rx Frequency " << wFreq / 1000 << " kHz";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (gsm_arfcn2band_rc(req_arfcn, &req_band) < 0) {
|
||||||
|
LOGCHAN(chan, DDEV, ALERT) << "Unknown GSM band for Rx Frequency " << wFreq
|
||||||
|
<< " Hz (ARFCN " << req_arfcn << " )";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!set_band(req_band))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (LMS_SetLOFrequency(m_lms_dev, LMS_CH_RX, chan, wFreq) < 0) {
|
if (LMS_SetLOFrequency(m_lms_dev, LMS_CH_RX, chan, wFreq) < 0) {
|
||||||
LOGCHAN(chan, DDEV, ERROR) << "Error setting Rx Freq to " << wFreq << " Hz";
|
LOGCHAN(chan, DDEV, ERROR) << "Error setting Rx Freq to " << wFreq << " Hz";
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ private:
|
|||||||
TIMESTAMP ts_initial, ts_offset;
|
TIMESTAMP ts_initial, ts_offset;
|
||||||
|
|
||||||
std::vector<double> tx_gains, rx_gains;
|
std::vector<double> tx_gains, rx_gains;
|
||||||
|
bool band_ass_curr_sess; /* true if "band" was set after last POWEROFF */
|
||||||
enum gsm_band band;
|
enum gsm_band band;
|
||||||
struct dev_band_desc band_desc;
|
struct dev_band_desc band_desc;
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ uhd_device::uhd_device(size_t tx_sps, size_t rx_sps,
|
|||||||
const std::vector<std::string>& tx_paths,
|
const std::vector<std::string>& tx_paths,
|
||||||
const std::vector<std::string>& rx_paths)
|
const std::vector<std::string>& rx_paths)
|
||||||
: RadioDevice(tx_sps, rx_sps, iface, chan_num, lo_offset, tx_paths, rx_paths),
|
: RadioDevice(tx_sps, rx_sps, iface, chan_num, lo_offset, tx_paths, rx_paths),
|
||||||
rx_gain_min(0.0), rx_gain_max(0.0),
|
rx_gain_min(0.0), rx_gain_max(0.0), band_ass_curr_sess(false),
|
||||||
band((enum gsm_band)0), tx_spp(0), rx_spp(0),
|
band((enum gsm_band)0), tx_spp(0), rx_spp(0),
|
||||||
started(false), aligned(false), drop_cnt(0),
|
started(false), aligned(false), drop_cnt(0),
|
||||||
prev_ts(0,0), ts_initial(0), ts_offset(0), async_event_thrd(NULL)
|
prev_ts(0,0), ts_initial(0), ts_offset(0), async_event_thrd(NULL)
|
||||||
@@ -258,14 +258,17 @@ void uhd_device::assign_band_desc(enum gsm_band req_band)
|
|||||||
|
|
||||||
bool uhd_device::set_band(enum gsm_band req_band)
|
bool uhd_device::set_band(enum gsm_band req_band)
|
||||||
{
|
{
|
||||||
if (band != 0 && req_band != band) {
|
if (band_ass_curr_sess && req_band != band) {
|
||||||
LOGC(DDEV, ALERT) << "Requesting band " << gsm_band_name(req_band)
|
LOGC(DDEV, ALERT) << "Requesting band " << gsm_band_name(req_band)
|
||||||
<< " different from previous band " << gsm_band_name(band);
|
<< " different from previous band " << gsm_band_name(band);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (req_band != band) {
|
||||||
band = req_band;
|
band = req_band;
|
||||||
assign_band_desc(band);
|
assign_band_desc(band);
|
||||||
|
}
|
||||||
|
band_ass_curr_sess = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,6 +551,7 @@ void uhd_device::set_channels(bool swap)
|
|||||||
int uhd_device::open(const std::string &args, int ref, bool swap_channels)
|
int uhd_device::open(const std::string &args, int ref, bool swap_channels)
|
||||||
{
|
{
|
||||||
const char *refstr;
|
const char *refstr;
|
||||||
|
int clock_lock_attempts = 15;
|
||||||
|
|
||||||
/* Register msg handler. Different APIs depending on UHD version */
|
/* Register msg handler. Different APIs depending on UHD version */
|
||||||
#ifdef USE_UHD_3_11
|
#ifdef USE_UHD_3_11
|
||||||
@@ -620,6 +624,19 @@ int uhd_device::open(const std::string &args, int ref, bool swap_channels)
|
|||||||
|
|
||||||
usrp_dev->set_clock_source(refstr);
|
usrp_dev->set_clock_source(refstr);
|
||||||
|
|
||||||
|
std::vector<std::string> sensor_names = usrp_dev->get_mboard_sensor_names();
|
||||||
|
if (std::find(sensor_names.begin(), sensor_names.end(), "ref_locked") != sensor_names.end()) {
|
||||||
|
LOGC(DDEV, INFO) << "Waiting for clock reference lock (max " << clock_lock_attempts << "s)..." << std::flush;
|
||||||
|
while (!usrp_dev->get_mboard_sensor("ref_locked", 0).to_bool() && clock_lock_attempts--)
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
|
if (!clock_lock_attempts) {
|
||||||
|
LOGC(DDEV, ALERT) << "Locking to external 10Mhz failed!";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LOGC(DDEV, INFO) << "Selected clock source is " << usrp_dev->get_clock_source(0);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
set_rates();
|
set_rates();
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
@@ -779,6 +796,8 @@ bool uhd_device::stop()
|
|||||||
for (size_t i = 0; i < rx_buffers.size(); i++)
|
for (size_t i = 0; i < rx_buffers.size(); i++)
|
||||||
rx_buffers[i]->reset();
|
rx_buffers[i]->reset();
|
||||||
|
|
||||||
|
band_ass_curr_sess = false;
|
||||||
|
|
||||||
started = false;
|
started = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1088,12 +1107,29 @@ bool uhd_device::setTxFreq(double wFreq, size_t chan)
|
|||||||
|
|
||||||
bool uhd_device::setRxFreq(double wFreq, size_t chan)
|
bool uhd_device::setRxFreq(double wFreq, size_t chan)
|
||||||
{
|
{
|
||||||
|
uint16_t req_arfcn;
|
||||||
|
enum gsm_band req_band;
|
||||||
|
|
||||||
if (chan >= rx_freqs.size()) {
|
if (chan >= rx_freqs.size()) {
|
||||||
LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
|
LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ScopedLock lock(tune_lock);
|
ScopedLock lock(tune_lock);
|
||||||
|
|
||||||
|
req_arfcn = gsm_freq102arfcn(wFreq / 1000 / 100, 1);
|
||||||
|
if (req_arfcn == 0xffff) {
|
||||||
|
LOGCHAN(chan, DDEV, ALERT) << "Unknown ARFCN for Rx Frequency " << wFreq / 1000 << " kHz";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (gsm_arfcn2band_rc(req_arfcn, &req_band) < 0) {
|
||||||
|
LOGCHAN(chan, DDEV, ALERT) << "Unknown GSM band for Rx Frequency " << wFreq
|
||||||
|
<< " Hz (ARFCN " << req_arfcn << " )";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!set_band(req_band))
|
||||||
|
return false;
|
||||||
|
|
||||||
return set_freq(wFreq, chan, false);
|
return set_freq(wFreq, chan, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ protected:
|
|||||||
|
|
||||||
std::vector<double> tx_gains, rx_gains;
|
std::vector<double> tx_gains, rx_gains;
|
||||||
std::vector<double> tx_freqs, rx_freqs;
|
std::vector<double> tx_freqs, rx_freqs;
|
||||||
|
bool band_ass_curr_sess; /* true if "band" was set after last POWEROFF */
|
||||||
enum gsm_band band;
|
enum gsm_band band;
|
||||||
struct dev_band_desc band_desc;
|
struct dev_band_desc band_desc;
|
||||||
size_t tx_spp, rx_spp;
|
size_t tx_spp, rx_spp;
|
||||||
|
|||||||
@@ -12,10 +12,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "Resampler.h"
|
#include "Resampler.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#include <osmocom/core/panic.h>
|
||||||
#include "convolve.h"
|
#include "convolve.h"
|
||||||
#include "scale.h"
|
#include "scale.h"
|
||||||
#include "mult.h"
|
#include "mult.h"
|
||||||
@@ -1460,25 +1461,30 @@ static signalVector *downsampleBurst(const signalVector &burst)
|
|||||||
* It is computed from the training sequence of each received burst,
|
* It is computed from the training sequence of each received burst,
|
||||||
* by comparing the "ideal" training sequence with the actual one.
|
* by comparing the "ideal" training sequence with the actual one.
|
||||||
*/
|
*/
|
||||||
static float computeCI(const signalVector *burst, CorrelationSequence *sync,
|
static float computeCI(const signalVector *burst, const CorrelationSequence *sync,
|
||||||
float toa, int start, complex xcorr)
|
float toa, int start, const complex &xcorr)
|
||||||
{
|
{
|
||||||
|
const int N = sync->sequence->size();
|
||||||
float S, C;
|
float S, C;
|
||||||
int ps;
|
|
||||||
|
|
||||||
/* Integer position where the sequence starts */
|
/* Integer position where the sequence starts */
|
||||||
ps = start + 1 - sync->sequence->size() + (int)roundf(toa);
|
const int ps = start + 1 - N + (int)roundf(toa);
|
||||||
|
|
||||||
/* Estimate Signal power */
|
/* Estimate Signal power */
|
||||||
S = 0.0f;
|
S = 0.0f;
|
||||||
for (int i=0, j=ps; i<(int)sync->sequence->size(); i++,j++)
|
for (int i=0, j=ps; i<(int)N; i++,j++)
|
||||||
S += (*burst)[j].norm2();
|
S += (*burst)[j].norm2();
|
||||||
S /= sync->sequence->size();
|
S /= N;
|
||||||
|
|
||||||
/* Esimate Carrier power */
|
/* Esimate Carrier power */
|
||||||
C = xcorr.norm2() / ((sync->sequence->size() - 1) * sync->gain.abs());
|
C = xcorr.norm2() / ((N - 1) * sync->gain.abs());
|
||||||
|
|
||||||
/* Interference = Signal - Carrier, so C/I = C / (S - C) */
|
/* Interference = Signal - Carrier, so C/I = C / (S - C).
|
||||||
|
* Calculated in dB:
|
||||||
|
* C/I_dB = 10 * log10(C/I)
|
||||||
|
* C/I_dB = 10 * (1/log2(10)) * log2(C/I)
|
||||||
|
* C/I_dB = 10 * 0.30103 * log2(C/I)
|
||||||
|
* C/I_dB = 3.0103 * log2(C/I)
|
||||||
|
*/
|
||||||
return 3.0103f * log2f(C / (S - C));
|
return 3.0103f * log2f(C / (S - C));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1491,7 +1497,7 @@ static float computeCI(const signalVector *burst, CorrelationSequence *sync,
|
|||||||
* and we run full interpolating peak detection.
|
* and we run full interpolating peak detection.
|
||||||
*/
|
*/
|
||||||
static int detectBurst(const signalVector &burst,
|
static int detectBurst(const signalVector &burst,
|
||||||
signalVector &corr, CorrelationSequence *sync,
|
signalVector &corr, const CorrelationSequence *sync,
|
||||||
float thresh, int sps, int start, int len,
|
float thresh, int sps, int start, int len,
|
||||||
struct estim_burst_params *ebp)
|
struct estim_burst_params *ebp)
|
||||||
{
|
{
|
||||||
@@ -1500,12 +1506,18 @@ static int detectBurst(const signalVector &burst,
|
|||||||
complex xcorr;
|
complex xcorr;
|
||||||
int rc = 1;
|
int rc = 1;
|
||||||
|
|
||||||
if (sps == 4) {
|
switch (sps) {
|
||||||
|
case 1:
|
||||||
|
corr_in = &burst;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
dec = downsampleBurst(burst);
|
dec = downsampleBurst(burst);
|
||||||
|
/* Running at the downsampled rate at this point: */
|
||||||
corr_in = dec;
|
corr_in = dec;
|
||||||
sps = 1;
|
sps = 1;
|
||||||
} else {
|
break;
|
||||||
corr_in = &burst;
|
default:
|
||||||
|
osmo_panic("%s:%d SPS %d not supported! Only 1 or 4 supported", __FILE__, __LINE__, sps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Correlate */
|
/* Correlate */
|
||||||
@@ -1515,9 +1527,6 @@ static int detectBurst(const signalVector &burst,
|
|||||||
goto del_ret;
|
goto del_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Running at the downsampled rate at this point */
|
|
||||||
sps = 1;
|
|
||||||
|
|
||||||
/* Peak detection - place restrictions at correlation edges */
|
/* Peak detection - place restrictions at correlation edges */
|
||||||
ebp->amp = fastPeakDetect(corr, &ebp->toa);
|
ebp->amp = fastPeakDetect(corr, &ebp->toa);
|
||||||
|
|
||||||
@@ -1586,7 +1595,7 @@ static int detectGeneralBurst(const signalVector &rxBurst, float thresh, int sps
|
|||||||
// and only report clipping if we can't demod.
|
// and only report clipping if we can't demod.
|
||||||
float maxAmpl = maxAmplitude(rxBurst);
|
float maxAmpl = maxAmplitude(rxBurst);
|
||||||
if (maxAmpl > CLIP_THRESH) {
|
if (maxAmpl > CLIP_THRESH) {
|
||||||
LOG(DEBUG) << "max burst amplitude: " << maxAmpl << " is above the clipping threshold: " << CLIP_THRESH << std::endl;
|
LOG(INFO) << "max burst amplitude: " << maxAmpl << " is above the clipping threshold: " << CLIP_THRESH << std::endl;
|
||||||
clipping = true;
|
clipping = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1862,7 +1871,7 @@ static float computeEdgeCI(const signalVector *rot)
|
|||||||
* delay filters. Symbol rotation and after always operates at 1 SPS.
|
* delay filters. Symbol rotation and after always operates at 1 SPS.
|
||||||
*
|
*
|
||||||
* Allow 1 SPS demodulation here, but note that other parts of the
|
* Allow 1 SPS demodulation here, but note that other parts of the
|
||||||
* transceiver restrict EDGE operatoin to 4 SPS - 8-PSK distortion
|
* transceiver restrict EDGE operation to 4 SPS - 8-PSK distortion
|
||||||
* through the fractional delay filters at 1 SPS renders signal
|
* through the fractional delay filters at 1 SPS renders signal
|
||||||
* nearly unrecoverable.
|
* nearly unrecoverable.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -82,10 +82,10 @@ AC_TYPE_SIZE_T
|
|||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.5.0)
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.6.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.5.0)
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.6.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.5.0)
|
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.6.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.5.0)
|
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.6.0)
|
||||||
|
|
||||||
AC_ARG_ENABLE(sanitize,
|
AC_ARG_ENABLE(sanitize,
|
||||||
[AS_HELP_STRING(
|
[AS_HELP_STRING(
|
||||||
|
|||||||
@@ -115,9 +115,4 @@ fi
|
|||||||
|
|
||||||
$MAKE $PARALLEL_MAKE maintainer-clean
|
$MAKE $PARALLEL_MAKE maintainer-clean
|
||||||
|
|
||||||
# Verify distro-specific package patches apply:
|
|
||||||
for patch in debian/patches/*.patch; do
|
|
||||||
patch --dry-run -p1 < "$patch"
|
|
||||||
done
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
osmo-clean-workspace.sh
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ BuildRequires: pkgconfig(LimeSuite)
|
|||||||
BuildRequires: pkgconfig(usrp) >= 3.3
|
BuildRequires: pkgconfig(usrp) >= 3.3
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig(fftw3f)
|
BuildRequires: pkgconfig(fftw3f)
|
||||||
BuildRequires: pkgconfig(libosmocoding) >= 1.5.0
|
BuildRequires: pkgconfig(libosmocoding) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(libosmocore) >= 1.5.0
|
BuildRequires: pkgconfig(libosmocore) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0
|
BuildRequires: pkgconfig(libosmoctrl) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(libosmovty) >= 1.5.0
|
BuildRequires: pkgconfig(libosmovty) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(libusb-1.0)
|
BuildRequires: pkgconfig(libusb-1.0)
|
||||||
BuildRequires: pkgconfig(uhd)
|
BuildRequires: pkgconfig(uhd)
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|||||||
40
debian/changelog
vendored
40
debian/changelog
vendored
@@ -1,3 +1,43 @@
|
|||||||
|
osmo-trx (1.4.0) unstable; urgency=medium
|
||||||
|
|
||||||
|
[ Pau Espin Pedrol ]
|
||||||
|
* Threads.cpp: Fix missing extern C around libosmocore include
|
||||||
|
* Drop logging pthread ID
|
||||||
|
* Threads: Avoid printing pthread_self()
|
||||||
|
* ipc: Makefile.am: Clean LDADD variable
|
||||||
|
* Use new stat item/ctr getter APIs
|
||||||
|
* detectBurst(): Clear downsampling code path
|
||||||
|
* detectBurst(): constify parameter
|
||||||
|
* computeCI(): Constify param and pass it as reference
|
||||||
|
* computeCI(): Rename verbose repeated getter to constant
|
||||||
|
* computeCI(): Constify read-only variable
|
||||||
|
* detectGeneralBurst(): Increase log level about clipping to INFO
|
||||||
|
* cosmetic: Fix typo in comment
|
||||||
|
* computeCI: Document hardcoded multiplier
|
||||||
|
* lms: Drop duplicated check
|
||||||
|
* lms,uhd: Validate band of RxFreq too
|
||||||
|
* lms,uhd: Skip re-assigning same band
|
||||||
|
* lms,uhd: Allow changing band between poweroff & poweron
|
||||||
|
|
||||||
|
[ Vadim Yanitskiy ]
|
||||||
|
* gitignore: remove non-existing 'doc/manuals/osmomsc-usermanual.xml'
|
||||||
|
* ctrl_sock_handle_rx(): fix missing space in LOGCHAN() statement
|
||||||
|
* trx_rate_ctr: use thread safe strerror() in device_sig_cb()
|
||||||
|
* IPCDevice: use thread safe strerror_r() instead of strerror()
|
||||||
|
* IPCDevice: check value returned from select()
|
||||||
|
* LMSDevice: LMS_GetDeviceList() may return a negative number
|
||||||
|
|
||||||
|
[ Eric ]
|
||||||
|
* add hidden fn adjustment command
|
||||||
|
* uhd: ensure configured clock source is actually used
|
||||||
|
* vty: printing fn offset should be signed
|
||||||
|
* lms: init band
|
||||||
|
|
||||||
|
[ Oliver Smith ]
|
||||||
|
* d/patches/build-for-debian8.patch: remove
|
||||||
|
|
||||||
|
-- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 16 Nov 2021 16:27:26 +0100
|
||||||
|
|
||||||
osmo-trx (1.3.1) unstable; urgency=medium
|
osmo-trx (1.3.1) unstable; urgency=medium
|
||||||
|
|
||||||
* mark uhddev_ipc.cpp as BUILT_SOURCES
|
* mark uhddev_ipc.cpp as BUILT_SOURCES
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 9),
|
|||||||
libtalloc-dev,
|
libtalloc-dev,
|
||||||
libusrp-dev,
|
libusrp-dev,
|
||||||
liblimesuite-dev,
|
liblimesuite-dev,
|
||||||
libosmocore-dev (>= 1.5.0),
|
libosmocore-dev (>= 1.6.0),
|
||||||
osmo-gsm-manuals-dev
|
osmo-gsm-manuals-dev
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Vcs-Browser: http://cgit.osmocom.org/osmo-trx
|
Vcs-Browser: http://cgit.osmocom.org/osmo-trx
|
||||||
|
|||||||
60
debian/patches/build-for-debian8.patch
vendored
60
debian/patches/build-for-debian8.patch
vendored
@@ -1,60 +0,0 @@
|
|||||||
diff --git a/debian/control b/debian/control
|
|
||||||
index 12d9af5..27b9d60 100644
|
|
||||||
--- a/debian/control
|
|
||||||
+++ b/debian/control
|
|
||||||
@@ -13,7 +13,6 @@ Build-Depends: debhelper (>= 9),
|
|
||||||
libfftw3-dev,
|
|
||||||
libtalloc-dev,
|
|
||||||
libusrp-dev,
|
|
||||||
- liblimesuite-dev,
|
|
||||||
libosmocore-dev (>= 1.5.0),
|
|
||||||
osmo-gsm-manuals-dev
|
|
||||||
Standards-Version: 3.9.6
|
|
||||||
@@ -30,7 +29,7 @@ Package: osmo-trx-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
-Depends: osmo-trx-uhd (= ${binary:Version}), osmo-trx-usrp1 (= ${binary:Version}), osmo-trx-lms (= ${binary:Version}), osmo-trx-ipc (= ${binary:Version}), ${misc:Depends}
|
|
||||||
+Depends: osmo-trx-uhd (= ${binary:Version}), osmo-trx-usrp1 (= ${binary:Version}), osmo-trx-ipc (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the osmo-trx-*
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
@@ -72,25 +71,6 @@ Description: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1)
|
|
||||||
between different telecommunication associations for developing new
|
|
||||||
generations of mobile phone networks. (post-2G/GSM)
|
|
||||||
|
|
||||||
-Package: osmo-trx-lms
|
|
||||||
-Architecture: any
|
|
||||||
-Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
-Description: SDR transceiver that implements Layer 1 of a GSM BTS (LimeSuite)
|
|
||||||
- OsmoTRX is a software-defined radio transceiver that implements the Layer 1
|
|
||||||
- physical layer of a BTS comprising the following 3GPP specifications:
|
|
||||||
- .
|
|
||||||
- TS 05.01 "Physical layer on the radio path"
|
|
||||||
- TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
|
|
||||||
- TS 05.04 "Modulation"
|
|
||||||
- TS 05.10 "Radio subsystem synchronization"
|
|
||||||
- .
|
|
||||||
- In this context, BTS is "Base transceiver station". It's the stations that
|
|
||||||
- connect mobile phones to the mobile network.
|
|
||||||
- .
|
|
||||||
- 3GPP is the "3rd Generation Partnership Project" which is the collaboration
|
|
||||||
- between different telecommunication associations for developing new
|
|
||||||
- generations of mobile phone networks. (post-2G/GSM)
|
|
||||||
-
|
|
||||||
Package: osmo-trx-ipc
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
diff --git a/debian/rules b/debian/rules
|
|
||||||
index 5795643..5937c17 100755
|
|
||||||
--- a/debian/rules
|
|
||||||
+++ b/debian/rules
|
|
||||||
@@ -9,7 +9,7 @@ override_dh_shlibdeps:
|
|
||||||
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
- dh_auto_configure -- --with-uhd --with-usrp1 --with-lms --with-ipc --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
|
|
||||||
+ dh_auto_configure -- --with-uhd --with-usrp1 --with-ipc --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
|
|
||||||
|
|
||||||
override_dh_strip:
|
|
||||||
dh_strip --dbg-package=osmo-trx-dbg
|
|
||||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -1 +0,0 @@
|
|||||||
# build-for-debian8.patch
|
|
||||||
@@ -12,10 +12,6 @@
|
|||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PRBS.h"
|
#include "PRBS.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user