From: richard_zhang on
Hi All,

I am working on a GSM signal simulation project, but now facing something
confusing me, that is the conversion of a frame number to T1,T2,T3' at
transmitter side and convert T1,T2,T3' back to a frame number at receiver
side.

Let a take an example of Frame Number (FN) = 25.

At a GSM transmitter or a BTS, a decimal FN will be converted to 19-bit
binary format as T1,T2 and T3' which are then transmitted over the air.
Please refer to the 3GPP spec for the conversion method (version 7.6.0 and
in Section 3.3.2.2.1). http://www.3gpp.org/ftp/Specs/html-info/45002.htm

By following the above reference, if FN = 25, then we will have
T1 = 25 div (26*51) = 0;
T2 = 25 mod 26 = 25;
T3 = 25 mod 51 = 25;
T3' = (T3-1) div 10 = 2; (div means integer division here)

After receiving T1,T2 and T3', a GSM mobile station will convert them back
to frame number. Reference at Section 4 of 3GPP spec (version 7.4.0):
http://www.3gpp.org/ftp/Specs/html-info/45010.htm

Assume T1,T2 and T3' are received with no error, then we have
T3 = (10*T3')+1 = 10*2 + 1 = 21;
FN = 51*[(T3-T2)mode(26)]+T3+51*26*T1 =
51*((21-25)mod(26))+21+0=51*22+21+0 = 1143.

You see, the received frame number is not correct. What's wrong in the
above conversion ?

Please help. Thank you.