Libygsm library

From YateBTS
Revision as of 17:11, 10 December 2013 by Oana (Talk | contribs) (Description)

Jump to: navigation, search

Description

This library provides encoders and decoders for Mobile Radio Interface Layer 3 messages according to ETSI TS 124 007 and ETSI TS 124 008. Messages are decoded to XML format. Encoders also expect XML format for encoding messages.

The following details a proposal for decoded XML messages:

  • a Mobility Management message
<MM>
 <LocationUpdatingRequest>
    <LocationUpdatingType>IMSI attach</LocationUpdatingType>
    <CipheringKeySequenceNumber>5</CipheringKeySequenceNumber>
    <LAI>
       <MNC_MCC>00109</MNC_MCC>
       <LAC>123456</LAC>
    </LAI>
    <MSClassmark>
         <RevisionLevel>2</RevisionLevel>
         <ES_IND>true</ES_IND>
	 <A5_1>true</A5_1>
	 <RFPowerCapability>class3</RFPowerCapability>
     </MSClassmark>
     <MobileIdentity>
	<TMSI>1234567890</TMSI>
     </MobileIdentity>
     <MSClassmarkUMTS>
         <RevisionLevel>2</RevisionLevel>
         <ES_IND>true</ES_IND> 
	 <A5_1>true</A5_1>
	 <RFPowerCapability>class3</RFPowerCapability>
 	 <PSCapability>true</PSCapability>
         <SSScreeningIndicator>2</SSScreeningIndicator>
 	 ...
     </MSClassmarkUMTS>
     <AdditionalUpdateParameters>CSMO</AdditionalUpdateParameters>
     <DeviceProperties>lowPriority</DeviceProperties>
     <MSNetworkFeatureSupport>extendedPeriodicTimers</MSNetworkFeatureSupport>
  </LocationUpdatingRequest>
 </MM>


  • a Call Control message
<CC>
    <TID>15</TID>
    <Setup>
	<BCRepeatIndicator>serviceChangeAndFallback</BCRepeatIndicator> 
	<BearerCapability1>01010101</BearerCapability1> <!-- octet string in first phase -->
	<BearerCapability2>02020202</BearerCapability2>
	<Facility>
	    <SS>
		<TID>9</TID>
		<REGISTER>
		    <Facility>3006010102040103</Facility> <!-- ASN.1 MAP USSD component -->
		</Register>
	    </SS>
	</Facility>
 	<CallingPartySubAddress>
	    <type>userSpecified</type>
	    <digits>123456</digits>
 	</CallingPartySubAddress>
	<CalledPartyBCDNumber>
	    <plan>isdn</plan>
	    <nature>international</nature>
	    <digits>1235446</digits>
	</CalledPartyBCDNumber>
        ....
    </Setup>
</CC>


  • EPS Mobility Management Message
<EPS_MM>
    <SecurityHeaderType>Integrity protected and ciphered</SecurityHeaderType>
    <MAC>02532910</MAC>
    <SequenceNumber>8</SequenceNumber>
    <EPS_MM>
	<SecurityHeaderType>Plain NAS message</SecurityHeaderType>
	<AttachRequest>
	    <EPSAttachType>combined EPS/IMSI attach</EPSAttachType>
	    <NASKeySetIdentifier>
		<TSC>mapped security context</TSC>
		<KeySetID>6</KeySetID>
	    </NASKeySetIdentifier>
	    <EPSMobileIdentity>
		<GUTI>
		    <MNC_MCC>00109</MNC_MCC>
		    <MMEGroupID>123<MMEGroupID>
		    <MMECode>15</MMECode>
		    <M_TMSI>01020501</M_TMSI>
		</GUTI>
	    </EPSMobileIdentity>
	    <UENetworkCapability>EEA0,128-EEA1,EEA6</UENetworkCapability>
	    <ESMMessageContainer>
		<EPS_SM>
		    <EPSBearerIdentity>0<EPSBearerIdentity>
		    <PTID>15</PTID>
		    <PDNConnectivityRequest>
		    ...
 		    </PDNConnectivityRequest>
		</EPS_SM>
	    </ESMMessageContainer>
	    ....
	</AttachRequest>
    </EPS_MM>
<EPS_MM>


General format for XML would be:

<protocol_tag>
    <header_IE_1/>
    <header_IE_2/>
    ...
    <message_type_tag>
       <message_type_IE_1/>
       <message_type_IE_2/>
       ...
    </message_type_tag>
</protocol_tag>

Testing

Implementation

Documentation

Documentation will be found on this wiki page.