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
wangjie
OpenXG-RAN
Commits
332dec60
Commit
332dec60
authored
Apr 14, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE: Print all SIB1 decoded PLMNs
parent
a1f77198
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
31 deletions
+30
-31
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+30
-31
No files found.
openair2/RRC/LTE/rrc_UE.c
View file @
332dec60
...
@@ -2794,44 +2794,43 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
...
@@ -2794,44 +2794,43 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
LTE_SystemInformationBlockType1_t
*
sib1
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
sib1
[
eNB_index
];
LTE_SystemInformationBlockType1_t
*
sib1
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
sib1
[
eNB_index
];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1
,
VCD_FUNCTION_IN
);
LOG_I
(
RRC
,
"[UE %d] : Dumping SIB 1
\n
"
,
ctxt_pP
->
module_id
);
LOG_I
(
RRC
,
"[UE %d] : Dumping SIB 1
\n
"
,
ctxt_pP
->
module_id
);
LTE_PLMN_Identity_t
*
PLMN_identity
=
&
sib1
->
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
array
[
0
]
->
plmn_Identity
;
const
int
n
=
sib1
->
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
count
;
int
mccdigits
=
PLMN_identity
->
mcc
->
list
.
count
;
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
int
mncdigits
=
PLMN_identity
->
mnc
.
list
.
count
;
LTE_PLMN_Identity_t
*
PLMN_identity
=
&
sib1
->
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
array
[
i
]
->
plmn_Identity
;
int
mcc
;
int
mccdigits
=
PLMN_identity
->
mcc
->
list
.
count
;
int
mncdigits
=
PLMN_identity
->
mnc
.
list
.
count
;
int
mcc
;
if
(
mccdigits
==
2
)
{
mcc
=
*
PLMN_identity
->
mcc
->
list
.
array
[
0
]
*
10
+
*
PLMN_identity
->
mcc
->
list
.
array
[
1
];
}
else
{
mcc
=
*
PLMN_identity
->
mcc
->
list
.
array
[
0
]
*
100
+
*
PLMN_identity
->
mcc
->
list
.
array
[
1
]
*
10
+
*
PLMN_identity
->
mcc
->
list
.
array
[
2
];
}
if
(
mccdigits
==
2
)
{
int
mnc
;
mcc
=
*
PLMN_identity
->
mcc
->
list
.
array
[
0
]
*
10
+
*
PLMN_identity
->
mcc
->
list
.
array
[
1
];
if
(
mncdigits
==
2
)
{
}
else
{
mnc
=
*
PLMN_identity
->
mnc
.
list
.
array
[
0
]
*
10
+
*
PLMN_identity
->
mnc
.
list
.
array
[
1
];
mcc
=
*
PLMN_identity
->
mcc
->
list
.
array
[
0
]
*
100
+
*
PLMN_identity
->
mcc
->
list
.
array
[
1
]
*
10
+
*
PLMN_identity
->
mcc
->
list
.
array
[
2
];
}
else
{
}
mnc
=
*
PLMN_identity
->
mnc
.
list
.
array
[
0
]
*
100
+
*
PLMN_identity
->
mnc
.
list
.
array
[
1
]
*
10
+
*
PLMN_identity
->
mnc
.
list
.
array
[
2
];
}
int
mnc
;
LOG_I
(
RRC
,
"PLMN %d MCC %0*d, MNC %0*d
\n
"
,
i
+
1
,
mccdigits
,
mcc
,
mncdigits
,
mnc
);
// search internal table for provider name
int
plmn_ind
=
0
;
if
(
mncdigits
==
2
)
{
while
(
plmn_data
[
plmn_ind
].
mcc
>
0
)
{
mnc
=
*
PLMN_identity
->
mnc
.
list
.
array
[
0
]
*
10
+
*
PLMN_identity
->
mnc
.
list
.
array
[
1
];
if
((
plmn_data
[
plmn_ind
].
mcc
==
mcc
)
&&
(
plmn_data
[
plmn_ind
].
mnc
==
mnc
))
{
}
else
{
LOG_I
(
RRC
,
"Found %s (name from internal table)
\n
"
,
plmn_data
[
plmn_ind
].
oper_short
);
mnc
=
*
PLMN_identity
->
mnc
.
list
.
array
[
0
]
*
100
+
*
PLMN_identity
->
mnc
.
list
.
array
[
1
]
*
10
+
*
PLMN_identity
->
mnc
.
list
.
array
[
2
]
;
break
;
}
}
LOG_I
(
RRC
,
"PLMN MCC %0*d, MNC %0*d, TAC 0x%04x
\n
"
,
mccdigits
,
mcc
,
mncdigits
,
mnc
,
plmn_ind
++
;
}
}
LOG_I
(
RRC
,
"TAC 0x%04x
\n
"
,
((
sib1
->
cellAccessRelatedInfo
.
trackingAreaCode
.
size
==
2
)
?
((
sib1
->
cellAccessRelatedInfo
.
trackingAreaCode
.
buf
[
0
]
<<
8
)
+
sib1
->
cellAccessRelatedInfo
.
trackingAreaCode
.
buf
[
1
])
:
0
));
((
sib1
->
cellAccessRelatedInfo
.
trackingAreaCode
.
size
==
2
)
?
((
sib1
->
cellAccessRelatedInfo
.
trackingAreaCode
.
buf
[
0
]
<<
8
)
+
sib1
->
cellAccessRelatedInfo
.
trackingAreaCode
.
buf
[
1
])
:
0
));
LOG_I
(
RRC
,
"cellReservedForOperatorUse : raw:%ld decoded:%s
\n
"
,
sib1
->
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
array
[
0
]
->
cellReservedForOperatorUse
,
LOG_I
(
RRC
,
"cellReservedForOperatorUse : raw:%ld decoded:%s
\n
"
,
sib1
->
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
array
[
0
]
->
cellReservedForOperatorUse
,
SIBreserved
(
sib1
->
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
array
[
0
]
->
cellReservedForOperatorUse
)
);
SIBreserved
(
sib1
->
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
array
[
0
]
->
cellReservedForOperatorUse
)
);
// search internal table for provider name
int
plmn_ind
=
0
;
while
(
plmn_data
[
plmn_ind
].
mcc
>
0
)
{
if
((
plmn_data
[
plmn_ind
].
mcc
==
mcc
)
&&
(
plmn_data
[
plmn_ind
].
mnc
==
mnc
))
{
LOG_I
(
RRC
,
"Found %s (name from internal table)
\n
"
,
plmn_data
[
plmn_ind
].
oper_short
);
break
;
}
plmn_ind
++
;
}
if
(
plmn_data
[
plmn_ind
].
mcc
<
0
)
{
LOG_I
(
RRC
,
"Found Unknown operator (no entry in internal table)
\n
"
);
}
LOG_I
(
RRC
,
"cellAccessRelatedInfo.cellIdentity : raw:%"
PRIu32
" decoded:%02x.%02x.%02x.%02x
\n
"
,
LOG_I
(
RRC
,
"cellAccessRelatedInfo.cellIdentity : raw:%"
PRIu32
" decoded:%02x.%02x.%02x.%02x
\n
"
,
BIT_STRING_to_uint32
(
&
sib1
->
cellAccessRelatedInfo
.
cellIdentity
),
BIT_STRING_to_uint32
(
&
sib1
->
cellAccessRelatedInfo
.
cellIdentity
),
...
...
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