asn1c icon indicating copy to clipboard operation
asn1c copied to clipboard

Failure to decode extension Addition Group [[ .. ]] for ASN.1 PER bit aligned.

Open dbressan2 opened this issue 7 years ago • 3 comments

Hi

I am testing 0.9.28 I can generate LTE RRC decoder however all messages including extension Addition Group [[ ]]] fail decoding. Error looks like AD: Processing RRC_conn_setup.txt AD: Decoding 39 bytes AD: decode(0) consumed 0+0b (39), code 2 AD: Clean up partially decoded DL-CCCH-Message AD: ofp 1, no=0, oo=0, dbl=0 RRC_conn_setup.txt: Decode failed past byte 0: Input processing error

Now if I replace the [[ ]] construct with equivalent ASN.1 syntax extensionAdditionGroup SEQUENCE {}, decoding is successful.

Issue is not blocking but annoying as I cannot directly work from 3GPP ASN.1 syntax.

Example: original 3GPP ASN.1 (decoding fails): [[ -- DL configuration as well as configuration applicable for DL and UL csi-RS-ConfigNZPToReleaseList-r11 CSI-RS-ConfigNZPToReleaseList-r11 OPTIONAL, -- Need ON csi-RS-ConfigNZPToAddModList-r11 CSI-RS-ConfigNZPToAddModList-r11 OPTIONAL, -- Need ON csi-RS-ConfigZPToReleaseList-r11 CSI-RS-ConfigZPToReleaseList-r11 OPTIONAL, -- Need ON csi-RS-ConfigZPToAddModList-r11 CSI-RS-ConfigZPToAddModList-r11 OPTIONAL, -- Need ON epdcch-Config-r11 EPDCCH-Config-r11 OPTIONAL, -- Need ON pdsch-ConfigDedicated-v1130 PDSCH-ConfigDedicated-v1130 OPTIONAL, -- Need ON -- UL configuration cqi-ReportConfig-v1130 CQI-ReportConfig-v1130 OPTIONAL, -- Need ON pucch-ConfigDedicated-v1130 PUCCH-ConfigDedicated-v1130 OPTIONAL, -- Need ON pusch-ConfigDedicated-v1130 PUSCH-ConfigDedicated-v1130 OPTIONAL, -- Need ON uplinkPowerControlDedicated-v1130 UplinkPowerControlDedicated-v1130 OPTIONAL -- Need ON ]],

Modified 3GPP ASN.1 with equivalent construct (decoding works perfectly):

extensionAdditionGroup4 SEQUENCE {	-- DL configuration as well as configuration applicable for DL and UL
	csi-RS-ConfigNZPToReleaseList-r11
								CSI-RS-ConfigNZPToReleaseList-r11	OPTIONAL,		-- Need ON
	csi-RS-ConfigNZPToAddModList-r11
								CSI-RS-ConfigNZPToAddModList-r11	OPTIONAL,		-- Need ON
	csi-RS-ConfigZPToReleaseList-r11	
								CSI-RS-ConfigZPToReleaseList-r11	OPTIONAL,		-- Need ON
	csi-RS-ConfigZPToAddModList-r11	CSI-RS-ConfigZPToAddModList-r11	OPTIONAL,		-- Need ON
	epdcch-Config-r11				EPDCCH-Config-r11				OPTIONAL,		-- Need ON
	pdsch-ConfigDedicated-v1130		PDSCH-ConfigDedicated-v1130		OPTIONAL,		-- Need ON
-- UL configuration
	cqi-ReportConfig-v1130			CQI-ReportConfig-v1130			OPTIONAL,		-- Need ON
	pucch-ConfigDedicated-v1130		PUCCH-ConfigDedicated-v1130		OPTIONAL,		-- Need ON
	pusch-ConfigDedicated-v1130		PUSCH-ConfigDedicated-v1130		OPTIONAL,		-- Need ON
	uplinkPowerControlDedicated-v1130
								UplinkPowerControlDedicated-v1130	OPTIONAL		-- Need ON
},

Thank you very much for your help

Best regards

D. Bressanelli

dbressan2 avatar Sep 19 '17 14:09 dbressan2

@dbresan2, I submitted a pull request #238 to address this extension group [[...]] issue.

brchiu avatar Apr 03 '18 11:04 brchiu

hi @brchiu , Good day. I met the same issue. And with the fix #238, I still failed to decode extension Addition Group [[ .. ]] of RRC. I tried to decode LTE RRC DL_DCCH_Message 20 02 01 80 02 C2 00 08 20 C0 but return fail. There is some issue in handling extension Addition Group

asn: PhysicalConfigDedicated ::= SEQUENCE { pdsch-ConfigDedicated PDSCH-ConfigDedicated OPTIONAL, -- Need ON pucch-ConfigDedicated PUCCH-ConfigDedicated OPTIONAL, -- Need ON pusch-ConfigDedicated PUSCH-ConfigDedicated OPTIONAL, -- Need ON uplinkPowerControlDedicated UplinkPowerControlDedicated OPTIONAL, -- Need ON tpc-PDCCH-ConfigPUCCH TPC-PDCCH-Config OPTIONAL, -- Need ON tpc-PDCCH-ConfigPUSCH TPC-PDCCH-Config OPTIONAL, -- Need ON cqi-ReportConfig CQI-ReportConfig OPTIONAL, -- Cond CQI-r8 soundingRS-UL-ConfigDedicated SoundingRS-UL-ConfigDedicated OPTIONAL, -- Need ON antennaInfo CHOICE { explicitValue AntennaInfoDedicated, defaultValue NULL } OPTIONAL, -- Cond AI-r8 schedulingRequestConfig SchedulingRequestConfig OPTIONAL, -- Need ON ..., [[ cqi-ReportConfig-v920 CQI-ReportConfig-v920 OPTIONAL, -- Cond CQI-r8 antennaInfo-v920 AntennaInfoDedicated-v920 OPTIONAL -- Cond AI-r8 ]], [[ antennaInfo-r10 CHOICE { explicitValue-r10 AntennaInfoDedicated-r10, defaultValue NULL } OPTIONAL, -- Cond AI-r10 antennaInfoUL-r10 AntennaInfoUL-r10 OPTIONAL, -- Need ON cif-Presence-r10 BOOLEAN OPTIONAL, -- Need ON

log: //read the extensions bitmap correctly but did not handle it as extensions as I see: Extensions 12 present in PhysicalConfigDedicated (constr_SEQUENCE.c:1200) [PER got 12<=38 bits => span 54 +5[14..40]:c2 (26) => 0x80] (asn_bit_data.c:132) Read in extensions bitmap for PhysicalConfigDedicated of 12 bits (8..) (constr_SEQUENCE.c:1214) [PER got 1<=12 bits => span 1 +0[1..12]:08 (11) => 0x0] (asn_bit_data.c:132) [PER got 1<=11 bits => span 2 +0[2..12]:08 (10) => 0x0] (asn_bit_data.c:132) [PER got 1<=10 bits => span 3 +0[3..12]:08 (9) => 0x0] (asn_bit_data.c:132) [PER got 1<= 9 bits => span 4 +0[4..12]:08 (8) => 0x0] (asn_bit_data.c:132) [PER got 1<= 8 bits => span 5 +0[5..12]:08 (7) => 0x1] (asn_bit_data.c:132) Decoding member cif-Presence-r10 in PhysicalConfigDedicated (nil) (constr_SEQUENCE.c:1238)

Wenming2023 avatar Sep 19 '23 07:09 Wenming2023

hi @brchiu , After upgraded to the latest version. I can decode extension Addition Group now. Thanks.

Wenming2023 avatar Sep 20 '23 08:09 Wenming2023