Home → ASN.1

Frequently Asked Questions

Q.: Does asn1c support BER encoding? I see only DER encoding in documentation.
A.: Yes, the asn1c compiler fully supports BER encoding. Any DER encoded data is, by definition, a valid BER data, from the receiver's point of view.

If you want data to be BER or DER encoded, just invoke der_encode().

Q.: My linker complains: Undefined symbols: _asn_DEF_PDU.
A.: If you have your own file with main() routine, just delete the converter-sample.c file, you won't need it. If you haven't created the main() routine yourself and wish to rely on converter-sample.c for your transcoding needs, add -DPDU=YourPdu to the list of compiler flags.
Q.: How to compile the 3GPP Radio Resource Control specification?
A.: The asn1c distribution includes an RRC 25.331 (version 7.1.0) example, check out https://github.com/vlm/asn1c/tree/master/examples/sample.source.RRC. You can also use the pre-compiled rrc-dump.exe program, which is part of Windows ASN.1 compiler installer.
Q.: How to compile the ISO 13522 (MHEG-5) specification?
A.: The ASN.1 compiler comes with a MHEG-5 decoder. Follow the https://github.com/vlm/asn1c/tree/master/examples/sample.source.MHEG5 README file instructions. You can also use the pre-compiled mheg5dump.exe program, which is part of Windows ASN.1 compiler installer.
Q.: How to compile the XYZ decoder?
A.: If XYZ is one of MEGACO (Media Gateway Control), PKIX1/X.509, LDAP, GSM TAP3 or OAM ULP, just go to examples/sample.source.XYZ and run `make`. The Windows ASN.1 compiler installer already contains the pre-compiled decoders for these encoding formats.

If you have something else, you should either use the Online ASN.1 compiler, or download the ASN.1 compiler source code.


The ASN.1 Compiler Copyright © 2003—2017 Lev Walkin <vlm@lionet.info>