summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-02-27 12:04:27 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2013-02-27 12:04:27 +0100
commitcb68e647abc32b5f5e5faac22cadbd1e7895b1fc (patch)
treede740b32fd5183edba192b74a799fc7a11df960a
parentb8b00471d7cca7a237a758253b73e59124cb3ef6 (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);