mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-02 21:23:16 +00:00
Compare commits
25 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 |
@@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -48,6 +48,7 @@ struct trx_cfg {
|
||||
double offset;
|
||||
double freq_offset_khz;
|
||||
double rssi_offset;
|
||||
int ul_fn_offset;
|
||||
bool force_rssi_offset; /* Force value set in VTY? */
|
||||
bool swap_channels;
|
||||
bool ext_rach;
|
||||
|
||||
@@ -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)
|
||||
continue;
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
||||
/* 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)
|
||||
continue;
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
/* Mark as done */
|
||||
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};
|
||||
/* no automatic re-trigger */
|
||||
struct timespec intv_sched = {.tv_sec = 0, .tv_nsec = 0};
|
||||
char err_buf[256];
|
||||
|
||||
switch (signal) {
|
||||
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_ctrs_pending[dev_ctr->chan] = *dev_ctr;
|
||||
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();
|
||||
break;
|
||||
@@ -232,7 +234,8 @@ static int device_sig_cb(unsigned int subsys, unsigned int signal,
|
||||
trx_rate_ctr_mutex.lock();
|
||||
trx_ctrs_pending[trx_ctr->chan] = *trx_ctr;
|
||||
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();
|
||||
break;
|
||||
@@ -263,7 +266,7 @@ static void threshold_timer_cb(void *data)
|
||||
|
||||
llist_for_each_entry(ctr_thr, &threshold_list, list) {
|
||||
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)
|
||||
<< " ("<< rate_ctr->intv[ctr_thr->intv].rate << " vs " << 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;
|
||||
}
|
||||
|
||||
|
||||
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,
|
||||
"swap-channels (disable|enable)",
|
||||
"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);
|
||||
if (trx->cfg.stack_size != 0)
|
||||
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, " ");
|
||||
|
||||
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_chan_cmd);
|
||||
install_element(TRX_NODE, &cfg_ul_fn_offset_cmd);
|
||||
install_node(&chan_node, dummy_config_write);
|
||||
install_element(CHAN_NODE, &cfg_chan_rx_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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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_
|
||||
|
||||
@@ -649,7 +649,7 @@ int Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
|
||||
}
|
||||
|
||||
/* Set time and determine correlation type */
|
||||
burstTime = radio_burst->getTime();
|
||||
burstTime = radio_burst->getTime() + cfg->ul_fn_offset;
|
||||
CorrType type = expectedCorrType(burstTime, chan);
|
||||
|
||||
/* 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;
|
||||
if (version_recv > TRX_DATA_FORMAT_VER) {
|
||||
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);
|
||||
} else {
|
||||
LOGCHAN(chan, DTRXCTRL, NOTICE) << "switching to TRXD version " << version_recv;
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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"
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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>
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -100,12 +100,14 @@ IPCDevice::~IPCDevice()
|
||||
int IPCDevice::ipc_shm_connect(const char *shm_name)
|
||||
{
|
||||
int fd;
|
||||
char err_buf[256];
|
||||
size_t shm_len;
|
||||
int rc;
|
||||
|
||||
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) {
|
||||
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;
|
||||
goto err_shm_open;
|
||||
}
|
||||
@@ -113,7 +115,8 @@ int IPCDevice::ipc_shm_connect(const char *shm_name)
|
||||
// Get size of the allocated memory
|
||||
struct stat shm_stat;
|
||||
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;
|
||||
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);
|
||||
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;
|
||||
goto err_mmap;
|
||||
}
|
||||
@@ -835,6 +839,7 @@ void IPCDevice::manually_poll_sock_fds()
|
||||
{
|
||||
struct timeval wait = { 0, 100000 };
|
||||
fd_set crfds, cwfds;
|
||||
char err_buf[256];
|
||||
int max_fd = 0;
|
||||
|
||||
FD_ZERO(&crfds);
|
||||
@@ -849,7 +854,11 @@ void IPCDevice::manually_poll_sock_fds()
|
||||
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++) {
|
||||
int flags = 0;
|
||||
|
||||
@@ -134,8 +134,9 @@ static enum lms_dev_type parse_dev_type(lms_device_t *m_lms_dev)
|
||||
LMSDevice::LMSDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t chan_num, double lo_offset,
|
||||
const std::vector<std::string>& tx_paths,
|
||||
const std::vector<std::string>& 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)
|
||||
RadioDevice(tx_sps, rx_sps, iface, chan_num, lo_offset, tx_paths, rx_paths),
|
||||
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...";
|
||||
|
||||
@@ -240,14 +241,17 @@ void LMSDevice::assign_band_desc(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)
|
||||
<< " different from previous band " << gsm_band_name(band);
|
||||
return false;
|
||||
}
|
||||
|
||||
band = req_band;
|
||||
assign_band_desc(band);
|
||||
if (req_band != band) {
|
||||
band = req_band;
|
||||
assign_band_desc(band);
|
||||
}
|
||||
band_ass_curr_sess = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -273,11 +277,12 @@ int LMSDevice::open(const std::string &args, int ref, bool swap_channels)
|
||||
|
||||
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, INFO) << "Devices found: " << n;
|
||||
if (n < 1)
|
||||
LOGC(DDEV, INFO) << "Devices found: " << rc;
|
||||
if (rc < 1)
|
||||
return -1;
|
||||
n = rc;
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
band_ass_curr_sess = false;
|
||||
|
||||
started = false;
|
||||
return true;
|
||||
}
|
||||
@@ -1013,25 +1020,38 @@ bool LMSDevice::setTxFreq(double wFreq, size_t chan)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (band != 0 && req_band != band) {
|
||||
LOGCHAN(chan, DDEV, ALERT) << "Requesting Tx Frequency " << wFreq
|
||||
<< " Hz different from previous band " << gsm_band_name(band);
|
||||
if (!set_band(req_band))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LMS_SetLOFrequency(m_lms_dev, LMS_CH_TX, chan, wFreq) < 0) {
|
||||
LOGCHAN(chan, DDEV, ERROR) << "Error setting Tx Freq to " << wFreq << " Hz";
|
||||
return false;
|
||||
}
|
||||
|
||||
band = req_band;
|
||||
return true;
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
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) {
|
||||
LOGCHAN(chan, DDEV, ERROR) << "Error setting Rx Freq to " << wFreq << " Hz";
|
||||
return false;
|
||||
|
||||
@@ -87,6 +87,7 @@ private:
|
||||
TIMESTAMP ts_initial, ts_offset;
|
||||
|
||||
std::vector<double> tx_gains, rx_gains;
|
||||
bool band_ass_curr_sess; /* true if "band" was set after last POWEROFF */
|
||||
enum gsm_band band;
|
||||
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>& 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),
|
||||
started(false), aligned(false), drop_cnt(0),
|
||||
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)
|
||||
{
|
||||
if (band != 0 && req_band != band) {
|
||||
if (band_ass_curr_sess && req_band != band) {
|
||||
LOGC(DDEV, ALERT) << "Requesting band " << gsm_band_name(req_band)
|
||||
<< " different from previous band " << gsm_band_name(band);
|
||||
return false;
|
||||
}
|
||||
|
||||
band = req_band;
|
||||
assign_band_desc(band);
|
||||
if (req_band != band) {
|
||||
band = req_band;
|
||||
assign_band_desc(band);
|
||||
}
|
||||
band_ass_curr_sess = 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)
|
||||
{
|
||||
const char *refstr;
|
||||
int clock_lock_attempts = 15;
|
||||
|
||||
/* Register msg handler. Different APIs depending on UHD version */
|
||||
#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);
|
||||
|
||||
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 {
|
||||
set_rates();
|
||||
} catch (const std::exception &e) {
|
||||
@@ -779,6 +796,8 @@ bool uhd_device::stop()
|
||||
for (size_t i = 0; i < rx_buffers.size(); i++)
|
||||
rx_buffers[i]->reset();
|
||||
|
||||
band_ass_curr_sess = false;
|
||||
|
||||
started = false;
|
||||
return true;
|
||||
}
|
||||
@@ -1088,12 +1107,29 @@ bool uhd_device::setTxFreq(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()) {
|
||||
LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
|
||||
return false;
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ protected:
|
||||
|
||||
std::vector<double> tx_gains, rx_gains;
|
||||
std::vector<double> tx_freqs, rx_freqs;
|
||||
bool band_ass_curr_sess; /* true if "band" was set after last POWEROFF */
|
||||
enum gsm_band band;
|
||||
struct dev_band_desc band_desc;
|
||||
size_t tx_spp, rx_spp;
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "Resampler.h"
|
||||
|
||||
extern "C" {
|
||||
#include <osmocom/core/panic.h>
|
||||
#include "convolve.h"
|
||||
#include "scale.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,
|
||||
* by comparing the "ideal" training sequence with the actual one.
|
||||
*/
|
||||
static float computeCI(const signalVector *burst, CorrelationSequence *sync,
|
||||
float toa, int start, complex xcorr)
|
||||
static float computeCI(const signalVector *burst, const CorrelationSequence *sync,
|
||||
float toa, int start, const complex &xcorr)
|
||||
{
|
||||
const int N = sync->sequence->size();
|
||||
float S, C;
|
||||
int ps;
|
||||
|
||||
/* 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 */
|
||||
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 /= sync->sequence->size();
|
||||
S /= N;
|
||||
|
||||
/* 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));
|
||||
}
|
||||
|
||||
@@ -1491,7 +1497,7 @@ static float computeCI(const signalVector *burst, CorrelationSequence *sync,
|
||||
* and we run full interpolating peak detection.
|
||||
*/
|
||||
static int detectBurst(const signalVector &burst,
|
||||
signalVector &corr, CorrelationSequence *sync,
|
||||
signalVector &corr, const CorrelationSequence *sync,
|
||||
float thresh, int sps, int start, int len,
|
||||
struct estim_burst_params *ebp)
|
||||
{
|
||||
@@ -1500,12 +1506,18 @@ static int detectBurst(const signalVector &burst,
|
||||
complex xcorr;
|
||||
int rc = 1;
|
||||
|
||||
if (sps == 4) {
|
||||
dec = downsampleBurst(burst);
|
||||
corr_in = dec;
|
||||
sps = 1;
|
||||
} else {
|
||||
switch (sps) {
|
||||
case 1:
|
||||
corr_in = &burst;
|
||||
break;
|
||||
case 4:
|
||||
dec = downsampleBurst(burst);
|
||||
/* Running at the downsampled rate at this point: */
|
||||
corr_in = dec;
|
||||
sps = 1;
|
||||
break;
|
||||
default:
|
||||
osmo_panic("%s:%d SPS %d not supported! Only 1 or 4 supported", __FILE__, __LINE__, sps);
|
||||
}
|
||||
|
||||
/* Correlate */
|
||||
@@ -1515,9 +1527,6 @@ static int detectBurst(const signalVector &burst,
|
||||
goto del_ret;
|
||||
}
|
||||
|
||||
/* Running at the downsampled rate at this point */
|
||||
sps = 1;
|
||||
|
||||
/* Peak detection - place restrictions at correlation edges */
|
||||
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.
|
||||
float maxAmpl = maxAmplitude(rxBurst);
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1862,7 +1871,7 @@ static float computeEdgeCI(const signalVector *rot)
|
||||
* delay filters. Symbol rotation and after always operates at 1 SPS.
|
||||
*
|
||||
* 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
|
||||
* nearly unrecoverable.
|
||||
*/
|
||||
|
||||
@@ -82,10 +82,10 @@ AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.5.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.5.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.5.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.5.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.6.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.6.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.6.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.6.0)
|
||||
|
||||
AC_ARG_ENABLE(sanitize,
|
||||
[AS_HELP_STRING(
|
||||
|
||||
@@ -115,9 +115,4 @@ fi
|
||||
|
||||
$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
|
||||
|
||||
@@ -34,10 +34,10 @@ BuildRequires: pkgconfig(LimeSuite)
|
||||
BuildRequires: pkgconfig(usrp) >= 3.3
|
||||
%endif
|
||||
BuildRequires: pkgconfig(fftw3f)
|
||||
BuildRequires: pkgconfig(libosmocoding) >= 1.5.0
|
||||
BuildRequires: pkgconfig(libosmocore) >= 1.5.0
|
||||
BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0
|
||||
BuildRequires: pkgconfig(libosmovty) >= 1.5.0
|
||||
BuildRequires: pkgconfig(libosmocoding) >= 1.6.0
|
||||
BuildRequires: pkgconfig(libosmocore) >= 1.6.0
|
||||
BuildRequires: pkgconfig(libosmoctrl) >= 1.6.0
|
||||
BuildRequires: pkgconfig(libosmovty) >= 1.6.0
|
||||
BuildRequires: pkgconfig(libusb-1.0)
|
||||
BuildRequires: pkgconfig(uhd)
|
||||
%{?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
|
||||
|
||||
* 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,
|
||||
libusrp-dev,
|
||||
liblimesuite-dev,
|
||||
libosmocore-dev (>= 1.5.0),
|
||||
libosmocore-dev (>= 1.6.0),
|
||||
osmo-gsm-manuals-dev
|
||||
Standards-Version: 3.9.6
|
||||
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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* 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"
|
||||
|
||||
Reference in New Issue
Block a user