aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-06-23 19:35:56 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-06-23 19:35:56 +0200
commitfe411b3cfde8122719b274ff4f334239940dd018 (patch)
treeca8774f8b8fa80857cf32cb039ad44dd6ade39a4
parent0aed654ac735749be31e4119336808596136aac3 (diff)
Hack to slow down uplink transfer
-rw-r--r--src/gprs_bssgp_pcu.h10
-rw-r--r--src/gprs_rlcmac.cpp14
2 files changed, 14 insertions, 10 deletions
diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h
index 02d85ce9..07f11736 100644
--- a/src/gprs_bssgp_pcu.h
+++ b/src/gprs_bssgp_pcu.h
@@ -49,11 +49,11 @@ struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei);
#define BLOCK_DATA_LEN 20
#define BLOCK_LEN 23
-#define CELL_ID 3
-#define MNC 55
-#define MCC 905
-#define PCU_LAC 1000
-#define PCU_RAC 1
+#define CELL_ID 0
+#define MNC 1
+#define MCC 001
+#define PCU_LAC 1
+#define PCU_RAC 0
extern struct bssgp_bvc_ctx *bctx;
diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp
index c50e7aec..51237711 100644
--- a/src/gprs_rlcmac.cpp
+++ b/src/gprs_rlcmac.cpp
@@ -253,7 +253,7 @@ void write_packet_uplink_assignment(bitvec * dest, uint8_t tfi, uint32_t tlli)
bitvec_write_field(dest, wp,0x0,1); // Dynamic Allocation
bitvec_write_field(dest, wp,0x0,1); // P0 = off
- bitvec_write_field(dest, wp,0x1,1); // USF_GRANULARITY
+ bitvec_write_field(dest, wp,0x1,0); // USF_GRANULARITY
bitvec_write_field(dest, wp,0x1,1); // switch TFI : on
bitvec_write_field(dest, wp,tfi,5);// TFI
@@ -338,7 +338,7 @@ int write_immediate_assignment(bitvec * dest, uint8_t downlink, uint8_t ra, uint
bitvec_write_field(dest, wp, 0, 1); // POLLING
bitvec_write_field(dest, wp, 0, 1); // ALLOCATION_TYPE: dynamic
bitvec_write_field(dest, wp, 1, 3); // USF
- bitvec_write_field(dest, wp, 1, 1); // USF_GRANULARITY
+ bitvec_write_field(dest, wp, 1, 0); // USF_GRANULARITY
bitvec_write_field(dest, wp, 0 , 1); // "0" power control: Not Present
bitvec_write_field(dest, wp, 0, 2); // CHANNEL_CODING_COMMAND
bitvec_write_field(dest, wp, 1, 1); // TLLI_BLOCK_CHANNEL_CODING
@@ -654,12 +654,16 @@ void gprs_rlcmac_rcv_block(bitvec *rlc_block)
}
}
-struct msgb *gen_dummy_msg(void)
+struct msgb *gen_dummy_msg(uint8_t usf)
{
struct msgb *msg = msgb_alloc(23, "rlcmac_dl_idle");
// RLC/MAC filler with USF=1
bitvec *filler = bitvec_alloc(23);
- bitvec_unhex(filler, "41942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+#warning HACK
+ if (usf == 1)
+ bitvec_unhex(filler, "41942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
+ else
+ bitvec_unhex(filler, "42942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b");
bitvec_pack(filler, msgb_put(msg, 23));
bitvec_free(filler);
return msg;
@@ -673,7 +677,7 @@ void gprs_rlcmac_rcv_rts_block(uint8_t trx, uint8_t ts, uint16_t arfcn,
set_current_fn(fn);
msg = msgb_dequeue(&block_queue);
if (!msg)
- msg = gen_dummy_msg();
+ msg = gen_dummy_msg(block_nr ? 2 : 1);
pcu_l1if_tx_pdtch(msg, trx, ts, arfcn, fn, block_nr);
}