This post addresses the frequently asked question of how to generate code for GSM Mobile Application Part (MAP) ASN.1 files.  This was first brought up in a post from 2009 entitled "Compiling Siemens MAP specifications".  These ASN.1 specifications are in the form found within the 3GPP TS 29.002 specification.  As was mentioned in the post, these are in a non-standard form and must be altered in order to use them with a standard ASN.1 compiler.  There are a lot of specifications in this form and it can be very time consuming work to make all of the necessary edits to use them with a standard ASN.1 compiler such as ours.

Fortunately, we found ASN.1 specifications from a different source that are ASN.1 standards-compliant.  These can be found in the Wireshark Git repository.

The specifications in this form are also available within our ASN1C and ASN1VE distribution packages in the "specs/3GPP_MAP" directory.

These specifications are almost usable as-is, but are missing a small bit of glue code in two modules to complete the ROSE protocol specification.  The two module files are MAP-Protocol.asn and SS-Protocol.asn.   Taking the SS-Protocol module as an example, the following IMPORT statement must be added:

IMPORTS ROS{} FROM Remote-Operations-Generic-ROS-PDUs
{joint-iso-itu-t remote-operations(4) generic-ROS-PDUs(6) version1(0)}

Then at the end, the following definitions must be added:

SS-Operations-ROSE-PDU ::=
   ROS {{InvokeIdSet}, {Supported-SS-Operations}, {Supported-SS-Operations}}

InvokeIdSet INTEGER ::=
{
   InvokeIDs
}

InvokeIDs ::= INTEGER

This creates a specific ROSE-PDU type from the generic parameterized ROS definition found within the ROSE module.  With this in place, it is possible to generate code for encoding and decoding all of the ROSE operations defined within the standard.  A sample may be found within our ASN1C package for C in the c/sample_ber/map_ss_operation subdirectory.


Published

Category

ASN1C