-
Notifications
You must be signed in to change notification settings - Fork 75
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
Failed to decode F1AP(38.473) reset Request #62
Comments
Hi @jain-ab, Can you provide the initial message in XER or another format, the exact ASN.1 files as extracting the ASN.1 from the specs is a tedious and time consuming task and the exact command you've used to compile the asn? Also if you have a minimal reproducible example can you share it as well? |
Hi @velichkov , Attached file contains the message in XER format. I am trying the aper enocde/ decode of this message abd encoding is success and it provides the hex as 00 00 00 1e 00 00 03 00 4e 00 02 00 12 00 00 40 But aper decoding fails with the same hex. I used the following command to compile the asn ./asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps ../a38473-f40.asn Thanks |
Can you share this file? You can use markdown to format your messages. |
Here it is , |
A preliminary investigation result : Decoding fails at It should be decimal 80 (i.e. 0x50 in hexadecimal) but this function compares 0x5000 with 0x50 |
Hi @brchiu and @velichkov, Could you please suggest a fix for this? Thanks |
Hi velichkov and @brchiu |
Hello @jain-ab I'm experiencing exactly the same issue. Have you managed to solve it? |
Hi @brchiu @velichkov
Here are the 10 bytes mentioned in first line of logs: 40 01 00 50 00 04 60 10 00 01 partOfF1-Interface is a sequence of ProtocolIE-SingleContainer. There can be 65536 items. Hence decoder takes second and third byte (01 00) as number of elements. The bytes are decoded as 256 which is incorrect (aper_get_length() returns 256). What happens next is that the decoder tries to decode the id field. Because it consumed two bytes instead of one, it takes bytes 50 00 instead of 00 50 and hence the wrong id value. If a seqence can hold 65536 items then length needs 2 bytes. But I suppose the length here is somehow compressed to one byte and the APER decoder doesn't take it into account. |
Fixed basing on open5gs/open5gs#773 |
Hi,
I am trying to encode / decode Reset message from 38.473 f40 (V15.4.0 (2018-12)) using aper encode/decode.
Reset ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {ResetIEs} },
...
}
ResetIEs F1AP-PROTOCOL-IES ::= {
{ ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }|
{ ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }|
{ ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory },
...
}
ResetType ::= CHOICE {
f1-Interface ResetAll,
partOfF1-Interface UE-associatedLogicalF1-ConnectionListRes,
choice-extension ProtocolIE-SingleContainer { { ResetType-ExtIEs} }
}
UE-associatedLogicalF1-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxnoofIndividualF1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalF1-ConnectionItemRes } }
UE-associatedLogicalF1-ConnectionItemRes F1AP-PROTOCOL-IES ::= {
{ ID id-UE-associatedLogicalF1-ConnectionItem CRITICALITY reject TYPE UE-associatedLogicalF1-ConnectionItem PRESENCE mandatory},
...
}
UE-associatedLogicalF1-ConnectionItem ::= SEQUENCE {
gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID OPTIONAL,
gNB-DU-UE-F1AP-ID GNB-DU-UE-F1AP-ID OPTIONAL,
iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalF1-ConnectionItemExtIEs} } OPTIONAL,
...
}
Aper Encoding is success and it gives the encoded hex buffer as below
00 00 00 1e 00 00 03 00 4e 00 02 00 12 00 00 40
01 01 00 30 00 0c 40 01 00 50 00 06 64 b2 04 40
24 24
But when I try to decode the same hex buffer using aper decode it fails
Debug logs shows decoding fails UE-associatedLogicalF1-ConnectionItemRes
Decoded Criticality = 0 (skeletons/NativeEnumerated.c:293)
Decoding member "value" in ProtocolIE-SingleContainer (skeletons/constr_SEQUENCE.c:1599)
Failed to decode element ProtocolIE-SingleContainer (skeletons/OPEN_TYPE.c:421)
Failed decode value in ProtocolIE-SingleContainer skeletons/constr_SEQUENCE.c:1609)
UE-associatedLogicalF1-ConnectionListRes SET OF ProtocolIE-SingleContainer decoded 2, 0xa09590 (skeletons/constr_SET_OF.c:1262)
Failed decoding ProtocolIE-SingleContainer of UE-associatedLogicalF1-ConnectionListRes (SET OF) (skeletons/constr_SET_OF.c:1272)
Is this something known bug and is there any fix available? Please suggest.
Thanks
The text was updated successfully, but these errors were encountered: