aboutsummaryrefslogtreecommitdiffstats
path: root/lib/receiver
diff options
context:
space:
mode:
authorYour Name <you@example.com>2016-07-12 17:23:13 +0430
committerYour Name <you@example.com>2016-07-12 17:23:13 +0430
commita7976a3b4258c2fdeba15832090dd46a7834026d (patch)
treefc30b39a9fa538efb1620cc824d6973a07896331 /lib/receiver
parentbd8a7163698f5986f48b25d2e4ea8799caf62579 (diff)
Dehopping for Uplink channels has been added.
Diffstat (limited to 'lib/receiver')
-rw-r--r--lib/receiver/cx_channel_hopper_impl.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/receiver/cx_channel_hopper_impl.cc b/lib/receiver/cx_channel_hopper_impl.cc
index 1fe15df..2818278 100644
--- a/lib/receiver/cx_channel_hopper_impl.cc
+++ b/lib/receiver/cx_channel_hopper_impl.cc
@@ -141,9 +141,21 @@ namespace gr {
{
pmt::pmt_t header_plus_burst = pmt::cdr(msg);
gsmtap_hdr *header = (gsmtap_hdr *)pmt::blob_data(header_plus_burst);
+ bool uplink_burst = (be16toh(header->arfcn) & 0x4000) ? true : false;
uint32_t frame_nr = be32toh(header->frame_number);
- uint16_t frame_ca = be16toh(header->arfcn);
+ uint16_t frame_ca;
+
+ // FIXED for uplink
+ if (uplink_burst)
+ {
+ frame_ca = be16toh(header->arfcn)-16384; //16384 = 0x4000
+ }
+ else
+ {
+ frame_ca = be16toh(header->arfcn);
+ }
+
int mai = calculate_ma_sfh(d_maio, d_hsn, d_narfcn, frame_nr);
if(d_ma[mai] == (int)frame_ca) {