Skip to content
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

SIZE does not accept a Value Reference for the bounds #45

Open
harmic opened this issue Feb 15, 2021 · 3 comments
Open

SIZE does not accept a Value Reference for the bounds #45

harmic opened this issue Feb 15, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@harmic
Copy link

harmic commented Feb 15, 2021

The asn1rs parser currently fails on this:

DRB-ToAddModList ::=				SEQUENCE (SIZE (1..maxDRB)) OF DRB-ToAddMod

with this error:

Failed to load file /home/itk/itk/src/libitk/src/3gppasn1/asn1/rrc.asn: Model(At line 263, column 47 an unexpected range value was encountered: "maxDRB"

Looking at the source I can see it is expecting an integer literal there, but the ASN1 source I am trying to parse has a 'Value Reference' (ie a name referencing a value assigned elsewhere in the file).

X.680 says this:

The ASN.1 value assignment notation enables a name to be given to a value of a specified type. This name can be used
wherever a reference to that value is needed.

The name maxDRB is defined later in the ASN1 source file as:

maxDRB						INTEGER ::= 11

It is not clear to me how 'Value References' can be implemented, because the definition of the reference apparently doesn't come before the usage of it in the source file.

@kellerkindt
Copy link
Owner

Yeah, 'Value References' / constants are not supported, yet. But I already plan to implement them soon-ish, because I'll need them myself as well.

@kellerkindt
Copy link
Owner

Out of curiosity, is the .asn file you tested publicly available? I just recently discovered forge.etis.org and 3gpp there does not seem to have any public repo?

@harmic
Copy link
Author

harmic commented Mar 23, 2021

For some reason, 3GPP don't seem to publish the ASN1 files as plain text files you can download, rather they include them embedded in the specifications (word docs). You need to download the word doc and copy/paste the ASN1 file.

The spec I was using was 36.331 (LTE RRC protocol). You can download this from the 3GPP site here. Go to the versions tab, choose a version, and click the version number to download a zip file containing a word doc.

I have not found anywhere to reliably download the raw ASN1 files.

The file I was using contains vendor extensions so unfortunately I am not at liberty to share it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants