summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-02-27 12:04:27 +0100
committerSteve Markgraf <steve@steve-m.de>2021-10-23 18:51:19 +0200
commit2318cc993d88f66670f9b1dfe2e40e7b3736bd09 (patch)
treefe4012e2190235d9bc0fba64345c51a43802ca2d
parent5f71fbcb706388a64a167265f0cf249cbf0a708b (diff)
Tansceiver checks quality of RACH, before forwarding it to TRX interface
By checking peak level of RACH's training sequence, only peaks that are good enough are forwarded to the TRX interface. If any received noise would be forwarded, there would be too many false detection, due to weak CRC protection of RACH.
-rw-r--r--src/host/layer23/src/transceiver/demod.c4
-rw-r--r--src/host/layer23/src/transceiver/l1ctl.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/src/host/layer23/src/transceiver/demod.c b/src/host/layer23/src/transceiver/demod.c
index 45b0570a..c7a2d15f 100644
--- a/src/host/layer23/src/transceiver/demod.c
+++ b/src/host/layer23/src/transceiver/demod.c
@@ -64,6 +64,10 @@ gsm_ab_ind_process(struct app_state *as,
if (rv)
goto err;
+ /* Check for a significant peak */
+ if (cabsf(chan) < 0.5)
+ goto err;
+
printf("TOA : %f\n", toa);
printf("chan : (%f %f) => %f\n", crealf(chan), cimagf(chan), cabsf(chan));
diff --git a/src/host/layer23/src/transceiver/l1ctl.c b/src/host/layer23/src/transceiver/l1ctl.c
index 96ca869b..afdeb171 100644
--- a/src/host/layer23/src/transceiver/l1ctl.c
+++ b/src/host/layer23/src/transceiver/l1ctl.c
@@ -233,12 +233,15 @@ _l1ctl_rx_bts_burst_ab_ind(struct app_state *as, struct msgb *msg)
fn = ntohl(bi->fn);
- LOGP(DL1C, LOGL_INFO, "Access Burst Indication (fn=%d iq toa=%f)\n", fn, bi->toa);
+ rc = gsm_ab_ind_process(as, bi, data, &toa);
+ if (rc < 0)
+ goto exit;
- gsm_ab_ind_process(as, bi, data, &toa);
toa += bi->toa;
- trx_data_ind(as->trx, fn, 0, data, toa, 0);
+ LOGP(DL1C, LOGL_INFO, "Access Burst Indication (fn=%d iq toa=%f)\n", fn, toa);
+
+ trx_data_ind(as->trx, fn, 0, data, toa, 0);
exit:
msgb_free(msg);