The file identifier (FID) is used to address or identify each specific file. Unlike filename in modern computer, the FID consists of two bytes and shall be coded in hexadecimal notation.
The first byte of FID identifies the type of file:
- '3F': MF (for MF, the second byte is always '00')
- '7F': 1st level DF
- '5F': 2nd level DF
- '2F': EF under the MF
- '6F': EF under a 1st level DF
- '4F': Elementary File under 2nd level Dedicated File
To get it clear, examine the first byte (first 2 hex digits) of each file in the following picture:
Q: Shall we follow the FID conventions?
A: Yes, you need to follow the conventions for standard files. In fact, all file identifiers are defined in the 3GPP TS 11.11 specification already. However, if you have additional application, you may or may not follow the convention.
Rules
- The file ID shall be assigned at the time of creation of the file concerned.
- No two files under the same parent shall have the same ID.
(If you have twin babies, you still give different names right?)
- A child and any parent, either immediate or remote in the hierarchy, e.g. grandparent, shall never have the same file ID.
(If granpa name is Charles, his son is Charles Jr., and his grandson is Charles II :D)
Q: Seems it is hard to remember the rules...
A: Actually the purpose of the rules is to get unique FID. If we follow the convention of first byte FID, then we only need to remember that no twin names under the same parent.
Q: How to create the file?
A: The Create File command is administrative command. Administrative commands are not defined in GSM. In other words, it is propietary (vendor-specific) commands.