From 2318cc993d88f66670f9b1dfe2e40e7b3736bd09 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Wed, 27 Feb 2013 12:04:27 +0100 Subject: 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. --- src/host/layer23/src/transceiver/demod.c | 4 ++++ src/host/layer23/src/transceiver/l1ctl.c | 9 ++++++--- 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); -- cgit v1.2.3