Well, I found this and thought that I would add an answer here if there is some other unsuccessful soul that should do this - a PDF called GSM Technical Specification (section 10.2.4) contains an answer corresponding to a bit:
PLMN Content: Mobile Country Code (MCC), followed by a Mobile Network Code (MNC). Coding: according to TS GSM 04.08 [14].
- If the storage is for less than the maximum possible number n, the excess bytes should be set to 'FF'. For example, using 246 for MCC and 81 for MNC, and if it is the first and only PLMN, the contents read as follows: Bytes 1-3: '42' 'F6' '18' Bytes 4-6: 'FF' 'FF' ' Ff 'etc.
Therefore, I was wrong to be skeptical!
I need to read on the left, replacing the numbers around, so the first two bytes will be MCC, so that will be 232f , and MNC will be 01 , then I just canceled f, and I have 232 and 1! Glad he's sorted.
For example, in C # you can do it like this:
string plmn = "whatever the plmn is"; string mcc = new string(plmn.Substring(0, 2).Reverse().ToArray()) + new string(plmn.Substring(2, 2).Reverse().ToArray()) .Replace('f', ' ') .Trim(); string mnc = new string(plmn.Substring(4, 2).Reverse().ToArray()) .Replace('f', ' ') .Trim();
kmp
source share