You're working with raw GSM SIM filesystem data, and that looks like a raw PDU-encoded SMS message. Let's parse it and extract the sender's phone number.
π Step-by-step PDU Analysis:
PDU string:
0307913366003000F011000B9115132893723F0000AA205530306B58305977636A4E756379466A4A46387863313941647A4E7A4D47316C
The format for a PDU SMS typically is:
css
[SMSC info length][SMSC info][PDU type][TP-MR][TP-DA length][TP-DA (receiver)][TP-PID][TP-DCS][TP-SCTS][TP-UDL][TP-UD]
But in your case, the PDU starts with:
r
03 07 91 33 66 00 30 00 F0 11 00 0B 91 15 13 28 93 72 3F ...
We'll parse it accordingly.
π§ Breakdown of the important fields:
-
SMSC Length (in octets):
03
β means 3 bytes for SMSC info follow. -
SMSC Info (3 bytes):
07 91 33
β07
= SMSC length again? Maybe an error or part of the SMSC. Let's treat it as:SMSC address: -
91
β international format -
33 66 00
β swapped semi-octets:336600
β becomes+336600
(or likely something wrong here β not critical now) -
PDU Type (1 byte):
30
β typical SMS-DELIVER PDU -
Message Reference (MR):
00
-
Sender Address Length:
0B
= 11 digits -
Sender Address Type-of-Address (TOA):
91
β international number -
Sender Address Value:
15 13 28 93 72 3F
This is in semi-octet swapped format. We decode it: -
15
β51
-
13
β31
-
28
β82
-
93
β39
-
72
β27
-
3F
βF3
β drop theF
Resulting digits:51318239273
With the+
from91
, the sender's number is: