-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem decoding BCCH-DL-SCH-Message PER #61
Comments
Here's the output witht EMIT_ASN_DEBUG set to 1:
|
Ok, after more investigation I noticed that the binary file I used was mangled. It should be 49 bytes long, but was 64 bytes long. This is the debug output I'm getting when decoding it: $ ./progname -iper -oxer -dd ~/bcch-dl-sch.uper CHOICE BCCH-DL-SCH-MessageType got index 0 in range 1 (constr_CHOICE.c:864) CHOICE c1 got index 0 in range 1 (constr_CHOICE.c:864) CHOICE criticalExtensions got index 0 in range 1 (constr_CHOICE.c:864) Read in presence bitmap for SystemInformation-r8-IEs of 1 bits (0..) (constr_SEQUENCE.c:1073) Preparing to fetch 1+1 elements from sib-TypeAndInfo (constr_SET_OF.c:905) CHOICE CHOICE got index 0 in range 4 (constr_CHOICE.c:864) Read in presence bitmap for SystemInformationBlockType2 of 2 bits (0..) (constr_SEQUENCE.c:1073) Member SystemInformationBlockType2->ac-BarringInfo is optional, p=0 (1->2) (constr_SEQUENCE.c:1102) Decoding member rach-ConfigCommon in RadioResourceConfigCommonSIB (constr_SEQUENCE.c:1120) Decoding member preambleInfo in RACH-ConfigCommon (constr_SEQUENCE.c:1120) Read in presence bitmap for preambleInfo of 1 bits (80..) (constr_SEQUENCE.c:1073) Decoded numberOfRA-Preambles = 12 (NativeEnumerated.c:123) Member preambleInfo->preamblesGroupAConfig is optional, p=1 (1->1) (constr_SEQUENCE.c:1102) Decoding member sizeOfRA-PreamblesGroupA in preamblesGroupAConfig (constr_SEQUENCE.c:1120) Decoded sizeOfRA-PreamblesGroupA = 6 (NativeEnumerated.c:123) Decoded messageSizeGroupA = 0 (NativeEnumerated.c:123) Decoded messagePowerOffsetGroupB = 4 (NativeEnumerated.c:123) Decoded powerRampingStep = 1 (NativeEnumerated.c:123) Decoded preambleInitialReceivedTargetPower = 8 (NativeEnumerated.c:123) Decoded PreambleTransMax = 6 (NativeEnumerated.c:123) Decoded ra-ResponseWindowSize = 7 (NativeEnumerated.c:123) Decoded mac-ContentionResolutionTimer = 7 (NativeEnumerated.c:123) Got value 4 + low 1 (INTEGER.c:622) Decoded modificationPeriodCoeff = 0 (NativeEnumerated.c:123) Decoded defaultPagingCycle = 2 (NativeEnumerated.c:123) Decoded nB = 2 (NativeEnumerated.c:123) Got value 184 + low 0 (INTEGER.c:622) Got value 5 + low 0 (INTEGER.c:622) BOOLEAN decoded as FALSE (BOOLEAN.c:260) Got value 11 + low 0 (INTEGER.c:622) Got value 5 + low 0 (INTEGER.c:622) Got value 78 + low -60 (INTEGER.c:622) Got value 1 + low 0 (INTEGER.c:622) Got value 3 + low 1 (INTEGER.c:622) Decoded hoppingMode = 0 (NativeEnumerated.c:123) Got value 22 + low 0 (INTEGER.c:622) BOOLEAN decoded as TRUE (BOOLEAN.c:260) BOOLEAN decoded as FALSE (BOOLEAN.c:260) Got value 0 + low 0 (INTEGER.c:622) BOOLEAN decoded as FALSE (BOOLEAN.c:260) Got value 0 + low 0 (INTEGER.c:622) Decoded deltaPUCCH-Shift = 1 (NativeEnumerated.c:123) Got value 2 + low 0 (INTEGER.c:622) Got value 0 + low 0 (INTEGER.c:622) Got value 10 + low 0 (INTEGER.c:622) CHOICE SoundingRS-UL-ConfigCommon got index 1 in range 1 (constr_CHOICE.c:864) Read in presence bitmap for setup of 1 bits (0..) (constr_SEQUENCE.c:1073) Decoded srs-BandwidthConfig = 3 (NativeEnumerated.c:123) Decoded srs-SubframeConfig = 7 (NativeEnumerated.c:123) BOOLEAN decoded as TRUE (BOOLEAN.c:260) Member setup->srs-MaxUpPts is optional, p=0 (1->1) (constr_SEQUENCE.c:1102) Got value 59 + low -126 (INTEGER.c:622) Decoded Alpha-r12 = 4 (NativeEnumerated.c:123) Got value 22 + low -127 (INTEGER.c:622) Decoded deltaF-PUCCH-Format1 = 1 (NativeEnumerated.c:123) Decoded deltaF-PUCCH-Format1b = 1 (NativeEnumerated.c:123) Decoded deltaF-PUCCH-Format2 = 2 (NativeEnumerated.c:123) Decoded deltaF-PUCCH-Format2a = 2 (NativeEnumerated.c:123) Decoded deltaF-PUCCH-Format2b = 2 (NativeEnumerated.c:123) Got value 5 + low -1 (INTEGER.c:622) Decoded UL-CyclicPrefixLength = 0 (NativeEnumerated.c:123) Decoding member t300 in UE-TimersAndConstants (constr_SEQUENCE.c:1120) Decoded t300 = 1 (NativeEnumerated.c:123) Decoded t301 = 1 (NativeEnumerated.c:123) Decoded t310 = 5 (NativeEnumerated.c:123) Decoded n310 = 6 (NativeEnumerated.c:123) Decoded t311 = 3 (NativeEnumerated.c:123) Decoded n311 = 0 (NativeEnumerated.c:123) Read in presence bitmap for freqInfo of 2 bits (40..) (constr_SEQUENCE.c:1073) Member freqInfo->ul-CarrierFreq is optional, p=0 (1->2) (constr_SEQUENCE.c:1102) Member freqInfo->ul-Bandwidth is optional, p=1 (2->2) (constr_SEQUENCE.c:1102) Decoded ul-Bandwidth = 3 (NativeEnumerated.c:123) Got value 0 + low 1 (INTEGER.c:622) Member SystemInformationBlockType2->mbsfn-SubframeConfigList is optional, p=0 (2->2) (constr_SEQUENCE.c:1102) Decoded TimeAlignmentTimer = 6 (NativeEnumerated.c:123) CHOICE CHOICE got index 1 in range 4 (constr_CHOICE.c:864) Decoding member cellReselectionInfoCommon in SystemInformationBlockType3 (constr_SEQUENCE.c:1120) Read in presence bitmap for cellReselectionInfoCommon of 1 bits (80..) (constr_SEQUENCE.c:1073) Decoded q-Hyst = 6 (NativeEnumerated.c:123) Member cellReselectionInfoCommon->speedStateReselectionPars is optional, p=1 (1->1) (constr_SEQUENCE.c:1102) Decoded t-Evaluation = 1 (NativeEnumerated.c:123) Decoded t-HystNormal = 0 (NativeEnumerated.c:123) Got value 3 + low 1 (INTEGER.c:622) Got value 7 + low 1 (INTEGER.c:622) Decoded sf-Medium = 3 (NativeEnumerated.c:123) Decoded sf-High = 3 (NativeEnumerated.c:123) Read in presence bitmap for cellReselectionServingFreqInfo of 1 bits (80..) (constr_SEQUENCE.c:1073) Member cellReselectionServingFreqInfo->s-NonIntraSearch is optional, p=1 (1->1) (constr_SEQUENCE.c:1102) Got value 9 + low 0 (INTEGER.c:622) Got value 7 + low 0 (INTEGER.c:622) Got value 7 + low 0 (INTEGER.c:622) Read in presence bitmap for intraFreqCellReselectionInfo of 4 bits (50..) (constr_SEQUENCE.c:1073) Got value 6 + low -70 (INTEGER.c:622) Member intraFreqCellReselectionInfo->p-Max is optional, p=0 (1->4) (constr_SEQUENCE.c:1102) Member intraFreqCellReselectionInfo->s-IntraSearch is optional, p=1 (2->4) (constr_SEQUENCE.c:1102) Got value 29 + low 0 (INTEGER.c:622) Member intraFreqCellReselectionInfo->allowedMeasBandwidth is optional, p=0 (3->4) (constr_SEQUENCE.c:1102) PresenceAntennaPort1 decoded as FALSE (BOOLEAN.c:260) Decoding member t-ReselectionEUTRA in intraFreqCellReselectionInfo (constr_SEQUENCE.c:1120) Got value 1 + low 0 (INTEGER.c:622) Member intraFreqCellReselectionInfo->t-ReselectionEUTRA-SF is optional, p=1 (4->4) (constr_SEQUENCE.c:1102) Decoded sf-Medium = 3 (NativeEnumerated.c:123) Decoded sf-High = 2 (NativeEnumerated.c:123) l=2 (per_support.c:204) Read in extensions bitmap for SystemInformationBlockType3 of 2 bits (40..) (constr_SEQUENCE.c:1158) Decoding member s-IntraSearch-v920 in SystemInformationBlockType3 (nil) (constr_SEQUENCE.c:1186) Getting open type s-IntraSearch-v920 encoded in 4 bytes (per_opentype.c:96)
sib-TypeAndInfo SET OF CHOICE decoded 2, 0x1a5d990 (constr_SET_OF.c:928) It decodes SIB2 but fails at SIB3. |
Using ASN.1 from https://anonsvn.wireshark.org/wireshark/trunk/asn1/lte-rrc/EUTRA-RRC-Definitions.asn I generate file for the converter (with -gen-PER and -fcompound-names flags), then build converter sample with:
I try to decode data:
(binary file here: https://www.dropbox.com/s/o13dyoff18y0xnu/bcch-dl-sch.per?dl=0) by executing the resulting progname. I'm getting:
I investigated it a bit, and it fails in per_get_few_bits(), trying to read from data that has zero bits left. Stack at that point looks like:
So it looks like it tries to decode SIB17, however when I use http://www.marben-products.com/cgi-bin/asn1tools/free-online-asn1-decoder.pl (direct input), I get valid SIB2 and SIB3.
It looks like per_get_few_bits has read only 25 bits out of the 64-bit file. Could you help investigate whether the problem is in asn1c or the EUTRA-RRC-Definitions.asn code?
The text was updated successfully, but these errors were encountered: