[erlang-questions] ASN.1 Value notation not working because of 'Externalvaluereference'?

Jussi Malinen jussi.ao.malinen@REDACTED
Tue Sep 20 18:02:54 CEST 2011


I am working with an ASN.1 protocol (S1AP to be specific [1]) and I
have managed to compile the specifications and decoding messages works
fine. However when trying to use value notation with S1AP I get an

I have created a minimal value notation example below. See the entire
file in [2]. (I got this from OSS Nokalva's ASN.1-Step, so it should
be valid I assume). Compiling this value notation causes the following
warning: "Warning: could not check default value 14". There is a long
list of other warnings about other default values.

resetSuccess S1AP-PDU ::= successfulOutcome : {
     procedureCode 14,
     criticality reject,
     value ResetAcknowledge : {
          protocolIEs {}

The compilation goes through, but the tuple that the resetSuccess()
function returns contains a lot of extra elements like
Externalvaluereference, which I dont get when decoding this same
message from a protocol capture:


The error I get when trying to encode this is:

1> 'S1AP':encode('S1AP-PDU', 'S1APValue':resetSuccess()).

If someone wants to give this a try, the project is open source (still
only a prototype for sure) and available online at google-code [3]. To
replicate just clone the project, run "./compile.py asn1", "export
ERL_LIBS=." and then on erl "'S1AP':encode('S1AP-PDU',

Are there some gotchas with value notation that I should be aware of?
Has someone managed to get S1AP or similar protocol to work with value

Any pointers how to continue with this are appreciated!

Jussi Malinen

[1] http://www.3gpp.org/ftp/Specs/html-info/36413.htm
[2] https://code.google.com/p/rammbock-asn1/source/browse/src/asn1/S1AP/S1APValue.asn1
[3] https://code.google.com/p/rammbock-asn1

More information about the erlang-questions mailing list