This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.
Adrian Musceac kantooon at gmail.comHello, I am interested in the sdr_phy work being done currently, and I'm trying to get it set up on my computer. I built osmo-trx from the ms branch and implemented a crude power measurement command. When running trxcon everything works fine, I get power indications for channels, and then when the mobile app is trying to sync to an ARFCN I start having issues. The FCCH bursts are decoded fine, and so are the SCH bursts (which I can also see in the osmo-trx terminal). I had to change the code of trxcon in order for SCH to work, because the bit values were inverted (0 was 1 and viceversa). I am attaching the changes at the end of the message. Unfortunately, the BCCH and CCCH bursts are not decoded: <0006> sched_lchan_sch.c:98 Received SCH: bsic=30, fn=1116799, sched_fn=1116798 <0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116800 ts=0 bid=0 <0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116801 ts=0 bid=1 <0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116802 ts=0 bid=2 <0006> sched_lchan_xcch.c:69 Data received on BCCH: fn=1116803 ts=0 bid=3 <0006> sched_lchan_xcch.c:117 Received bad data frame at fn=1116800 (2/51) for BCCH with 66 errors It appears as if the deinterleaving in gsm0503_xcch_decode does not work... could be the order of bursts? I'd appreciate any help here. I'm also ready to share the changes I've made to osmo-trx/ms and trxcon. Best regards, Adrian diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c index 6a84af6..def571c 100644 --- a/src/host/trxcon/trx_if.c +++ b/src/host/trxcon/trx_if.c @@ -325,6 +325,11 @@ int trx_if_cmd_setslot(struct trx_instance *trx, uint8_t tn, uint8_t type) return trx_ctrl_cmd(trx, 1, "SETSLOT", "%d %d", tn, type); } +int trx_if_cmd_sync(struct trx_instance *trx, uint8_t type) +{ + return trx_ctrl_cmd(trx, 1, "SYNC", "%d", type); +} + /* * Tuning Control * @@ -392,7 +397,7 @@ int trx_if_cmd_measure(struct trx_instance *trx, LOGP(DTRX, LOGL_ERROR, "ARFCN %d not defined\n", arfcn_start); return -ENOTSUP; } - + trx_ctrl_cmd(trx, 1, "RXTUNE", "%d", freq10 * 100); return trx_ctrl_cmd(trx, 1, "MEASURE", "%d", freq10 * 100); } @@ -421,6 +426,7 @@ static void trx_if_measure_rsp_cb(struct trx_instance *trx, char *resp) arfcn == trx->pm_arfcn_stop); /* Schedule a next measurement */ + usleep(50000); if (arfcn != trx->pm_arfcn_stop) trx_if_cmd_measure(trx, ++arfcn, trx->pm_arfcn_stop); } @@ -558,9 +564,9 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what) /* Copy and convert bits {254..0} to sbits {-127..127} */ for (i = 0; i < 148; i++) { if (buf[8 + i] == 255) - bits[i] = -127; + bits[i] = 127; else - bits[i] = 127 - buf[8 + i]; + bits[i] = -127 + buf[8 + i]; }