aboutsummaryrefslogtreecommitdiffstats
path: root/src/bsc_hack.c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2008-12-28 16:32:42 +0000
committerHolger Freyther <zecke@selfish.org>2008-12-28 16:32:42 +0000
commit4d505470e87341f220b65a744c3caa8405aa31fe (patch)
tree63e95bd81e0397db960469c680b1492a74cdd8e2 /src/bsc_hack.c
parent24287b6bb2ab10622b63a1aeb989e80e06d5ff81 (diff)
[bsc_hack] Start to understand the SI packages we send
Add comments in front of the bytes to define where they are coming from.
Diffstat (limited to 'src/bsc_hack.c')
-rw-r--r--src/bsc_hack.c45
1 files changed, 31 insertions, 14 deletions
diff --git a/src/bsc_hack.c b/src/bsc_hack.c
index f673fd1ae..1f454e419 100644
--- a/src/bsc_hack.c
+++ b/src/bsc_hack.c
@@ -359,9 +359,11 @@ SYSTEM INFORMATION TYPE 1
Access Control Class = 0000
*/
static const u_int8_t si1[] = {
- 0x55, 0x06, 0x19, 0x04 /*0x00*/, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /*0x01*/,0xD5,
- 0x00, 0x00, 0x2B
+ /* header */0x55, 0x06, 0x19,
+ /* ccdesc */0x04 /*0x00*/, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /*0x01*/,
+ /* rach */0xD5, 0x00, 0x00,
+ /* s1 reset*/0x2B
};
/*
@@ -380,9 +382,11 @@ static const u_int8_t si1[] = {
Access Control Class = 0000
*/
static const u_int8_t si2[] = {
- 0x59, 0x06, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xD5, 0x00,
- 0x00
+ /* header */0x59, 0x06, 0x1A,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* ncc */0xFF,
+ /* rach*/0xD5, 0x00, 0x00
};
/*
@@ -424,9 +428,14 @@ SYSTEM INFORMATION TYPE 3
Scheduling Information is not sent in SYSTEM INFORMATION TYPE 9 on the BCCH
*/
unsigned char si3[] = {
- 0x49, 0x06, 0x1B, 0x00, 0x01, 0x00, 0xF1, 0x10, 0x00, 0x01,
- 0x01, 0x03, 0x00, 0x28, 0x62, 0x00, 0xD5, 0x00, 0x00, 0x80,
- 0x00, 0x00, 0x2B
+ /* header */0x49, 0x06, 0x1B,
+ /* cell */0x00, 0x01,
+ /* lai */0x00, 0xF1, 0x10, 0x00, 0x01,
+ /* desc */0x01, 0x03, 0x00,
+ /* option*/0x28,
+ /* selection*/0x62, 0x00,
+ /* rach */0xD5, 0x00, 0x00,
+ /* reset*/0x80, 0x00, 0x00, 0x2B
};
/*
@@ -459,8 +468,11 @@ SYSTEM INFORMATION TYPE 4
Penalty Time = 20 s
*/
static const u_int8_t si4[] = {
- 0x41, 0x06, 0x1C, 0x00, 0xF1, 0x10, 0x00, 0x01, 0x62, 0x00,
- 0xD5, 0x00, 0x00, 0x64, 0x30, 0xE0, HARDCODED_ARFCN/*0x01*/, 0x80, 0x00, 0x00,
+ /* header */0x41, 0x06, 0x1C,
+ /* lai */0x00, 0xF1, 0x10, 0x00, 0x01,
+ /* sel */0x62, 0x00,
+ /* rach*/0xD5, 0x00, 0x00,
+ /* var */0x64, 0x30, 0xE0, HARDCODED_ARFCN/*0x01*/, 0x80, 0x00, 0x00,
0x2B, 0x2B, 0x2B
};
@@ -474,8 +486,9 @@ static const u_int8_t si4[] = {
*/
static const u_int8_t si5[] = {
- 0x06, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* header without l2 len*/0x06, 0x1D,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
// SYSTEM INFORMATION TYPE 6
@@ -499,7 +512,11 @@ SYSTEM INFORMATION TYPE 6
*/
static const u_int8_t si6[] = {
- 0x06, 0x1E, 0x00, 0x01, 0x00, 0xF1, 0x10, 0x00, 0x01, 0x28, 0xFF,
+ /* header */0x06, 0x1E,
+ /* cell id*/ 0x00, 0x01,
+ /* lai */ 0x00, 0xF1, 0x10, 0x00, 0x01,
+ /* options */ 0x28,
+ /* ncc */ 0xFF,
};