Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
promise
OpenXG-RAN
Commits
aae1ac05
Commit
aae1ac05
authored
Dec 25, 2019
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recovery attach complete & Can receive one ping
parent
584bad45
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
14 deletions
+77
-14
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c
+53
-5
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation_NB_IoT.c
+1
-1
openair2/LAYER2/MAC/defs_NB_IoT.h
openair2/LAYER2/MAC/defs_NB_IoT.h
+2
-1
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
+4
-7
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
+17
-0
No files found.
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c
View file @
aae1ac05
...
...
@@ -1569,18 +1569,30 @@ break;
}
}
unsigned
char
sample_security
[
10
]
=
{
0x3d
,
0x03
,
0x00
,
0xa0
,
0x01
,
0x30
,
0x0b
,
0x07
,
0x53
,
0x08
};
unsigned
char
auth_rsp
[
10
]
=
{
0x3d
,
0x03
,
0x00
,
0xa0
,
0x01
,
0x30
,
0x0b
,
0x07
,
0x53
,
0x08
};
unsigned
char
attach_complete
[
8
]
=
{
0x01
,
0x07
,
0x43
,
0x00
,
0x03
,
0x52
,
0x00
,
0xc2
};
int
cnt
=
0
;
int
correct_bit
=
0
;
int
correct_bit_attach
=
0
;
for
(
cnt
=
0
;
cnt
<
10
;
cnt
++
)
{
if
(
sample_security
[
cnt
]
==
decoded_bytes
[
cnt
])
if
(
auth_rsp
[
cnt
]
==
decoded_bytes
[
cnt
])
{
//printf("correct_bit++\n");
correct_bit
++
;
}
}
for
(
cnt
=
10
;
cnt
<
18
;
cnt
++
)
{
if
(
attach_complete
[
cnt
-
10
]
==
decoded_bytes
[
cnt
])
{
//printf("correct_bit_attach++\n");
correct_bit_attach
++
;
}
}
// check status on output
if
(
iteration_cnt
>
1
)
{
oldcrc
=
*
((
unsigned
int
*
)(
&
decoded_bytes
[(
n
>>
3
)
-
crc_len
]));
...
...
@@ -1588,7 +1600,7 @@ break;
switch
(
crc_type
)
{
case
CRC24_A
:
if
(
correct_bit
<
10
)
if
(
(
correct_bit
<
10
)
&&
(
correct_bit_attach
<
8
)
)
{
oldcrc
&=
0x00ffffff
;
crc
=
crc24a
(
&
decoded_bytes
[
F
>>
3
],
...
...
@@ -1597,7 +1609,7 @@ break;
((
uint8_t
*
)
&
crc
)[
2
]
=
((
uint8_t
*
)
&
crc
)[
0
];
((
uint8_t
*
)
&
crc
)[
0
]
=
temp
;
break
;
}
else
}
else
if
(
correct_bit
==
10
)
{
printf
(
"Try to recovery authentication response
\n
"
);
...
...
@@ -1755,6 +1767,42 @@ break;
decoded_bytes
[
11
]
=
decoded_bytes
[
11
]
-
0x08
;
decoded_bytes
[
17
]
=
decoded_bytes
[
17
]
-
0x08
;
break
;
}
else
if
(
correct_bit_attach
==
8
)
{
printf
(
"Try to recovery attach complete
\n
"
);
// the first case, didn't change anything
oldcrc
&=
0x00ffffff
;
crc
=
0
;
crc
=
crc24a
(
&
decoded_bytes
[
F
>>
3
],
n
-
24
-
F
)
>>
8
;
temp
=
((
uint8_t
*
)
&
crc
)[
2
];
((
uint8_t
*
)
&
crc
)[
2
]
=
((
uint8_t
*
)
&
crc
)[
0
];
((
uint8_t
*
)
&
crc
)[
0
]
=
temp
;
//printf("oldcrc %x, crc %x\n",oldcrc,crc);
if
(
crc
==
oldcrc
)
{
return
iteration_cnt
;
}
// Add 1st byte for 00001000 (0x08)
decoded_bytes
[
7
]
=
decoded_bytes
[
7
]
+
0x08
;
//oldcrc&=0x00ffffff;
crc
=
0
;
crc
=
crc24a
(
&
decoded_bytes
[
F
>>
3
],
n
-
24
-
F
)
>>
8
;
temp
=
((
uint8_t
*
)
&
crc
)[
2
];
((
uint8_t
*
)
&
crc
)[
2
]
=
((
uint8_t
*
)
&
crc
)[
0
];
((
uint8_t
*
)
&
crc
)[
0
]
=
temp
;
//printf("oldcrc %x, crc %x\n",oldcrc,crc);
if
(
crc
==
oldcrc
)
{
return
iteration_cnt
;
}
decoded_bytes
[
7
]
=
decoded_bytes
[
7
]
-
0x08
;
break
;
}
case
CRC24_B
:
oldcrc
&=
0x00ffffff
;
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation_NB_IoT.c
View file @
aae1ac05
...
...
@@ -1682,7 +1682,7 @@ uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB *eNB,
if
(
ulsch_harq
->
b
[
14
]
==
0x00
&&
ulsch_harq
->
b
[
15
]
==
0x07
&&
ulsch_harq
->
b
[
16
]
==
0x5e
)
{
printf
(
"
t
ry to recovery Security mode complete, show the 11 th byte : %02x
\n
"
,
ulsch_harq
->
b
[
11
]);
printf
(
"
T
ry to recovery Security mode complete, show the 11 th byte : %02x
\n
"
,
ulsch_harq
->
b
[
11
]);
//ulsch_harq->b[11] = ulsch_harq->b[11] + 0x08;
ulsch_harq
->
b
[
17
]
=
0x00
;
fill_crc_indication_NB_IoT
(
eNB
,
0
,
rx_frame
,
rx_subframe
,
1
);
// indicate ACK to MAC
...
...
openair2/LAYER2/MAC/defs_NB_IoT.h
View file @
aae1ac05
...
...
@@ -103,7 +103,8 @@ typedef enum rach_state_e
{
initial_access
=
0
,
rach_for_auth_rsp
,
rach_for_next
,
rach_for_TAU
,
rach_for_next
}
rach_state_t
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
View file @
aae1ac05
...
...
@@ -100,10 +100,7 @@ int schedule_UL_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst,UE_TEMPLATE_NB_IoT *UE_info
mcs
=
mapped_mcs
[
UE_info
->
CE_level
][
mappedMcsIndex
];
if
((
UE_state_machine
==
rach_for_next
)
&&
(
UE_info
->
ul_total_buffer
==
22
))
{
mcs
=
6
;
}
//mcs = 2;
while
((
TBS
<
UE_info
->
ul_total_buffer
)
&&
(
Iru
<=
7
))
...
...
@@ -159,7 +156,7 @@ int schedule_UL_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst,UE_TEMPLATE_NB_IoT *UE_info
UE_sched_ctrl_info
->
NPUSCH_sf_start
=
NPUSCH_info
->
sf_start
;
//UE_sched_ctrl_info->resent_flag = 1;
LOG_N
(
MAC
,
"Key resent
\n
"
);
UE_sched_ctrl_info
->
dci_n0_index_ndi
=
1
;
UE_sched_ctrl_info
->
dci_n0_index_ndi
=
0
;
}
else
{
...
...
@@ -260,7 +257,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
PHR
=
((
payload_ptr
[
0
]
>>
5
)
&
0x01
)
*
2
+
((
payload_ptr
[
0
]
>>
4
)
&
0x01
);
DVI_index
=
(
payload_ptr
[
0
]
>>
3
&
0x01
)
*
8
+
(
payload_ptr
[
0
]
>>
2
&
0x01
)
*
4
+
(
payload_ptr
[
0
]
>>
1
&
0x01
)
*
2
+
(
payload_ptr
[
0
]
>>
0
&
0x01
);
ul_total_buffer
=
DV_table
[
DVI_index
];
LOG_
D
(
MAC
,
"PHR = %d, ul_total_buffer = %d
\n
"
,
PHR
,
ul_total_buffer
);
LOG_
I
(
MAC
,
"PHR = %d, ul_total_buffer = %d
\n
"
,
PHR
,
ul_total_buffer
);
// go to payload
payload_ptr
+=
1
;
// Note that the first 6 byte (48 bits) of this CCCH SDU should be encoded in the MSG4 for contention resolution
...
...
@@ -310,7 +307,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
//UE_info->direction = 1; //1 for DL scheduler
LOG_I
(
MAC
,
"After receive Msg5, change the UE scheduling direction to DL
\n
"
);
}
}
else
if
(
UE_state_machine
==
rach_for_auth_rsp
)
}
else
if
(
UE_state_machine
==
rach_for_auth_rsp
||
UE_state_machine
==
rach_for_TAU
)
{
LOG_N
(
MAC
,
"Here we are for the DCI N0 generating
\n
"
);
if
(
UE_info
!=
NULL
)
...
...
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
View file @
aae1ac05
...
...
@@ -5,6 +5,7 @@
int
tmp
=
0
;
//int block_rach = 0;
int
first_msg4
=
0
;
int
rach_count
=
0
;
void
simulate_preamble
(
UL_IND_NB_IoT_t
*
UL_INFO
,
int
CE
,
int
sc
)
{
...
...
@@ -118,6 +119,22 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
);
//block_rach = 2;
}
else
if
(
UE_state_machine
==
rach_for_next
||
UE_state_machine
==
rach_for_TAU
)
{
rach_count
++
;
if
(
rach_count
==
4
)
{
LOG_N
(
MAC
,
"It is the third time that this UE try to rach
\n
"
);
init_RA_NB_IoT
(
mac_inst
,
(
UL_INFO
->
nrach_ind
.
nrach_pdu_list
+
i
)
->
nrach_indication_rel13
.
initial_sc
,
(
UL_INFO
->
nrach_ind
.
nrach_pdu_list
+
i
)
->
nrach_indication_rel13
.
nrach_ce_level
,
UL_INFO
->
frame
,
//timing_offset = Timing_advance * 16
(
UL_INFO
->
nrach_ind
.
nrach_pdu_list
+
i
)
->
nrach_indication_rel13
.
timing_advance
*
16
);
UE_state_machine
=
rach_for_TAU
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment