| 帮同学宣传一下http://shop57644665.taobao.com/ |
SELECT
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| SELECT | ‘A0′ | ‘A4′ | ‘00′ | ‘00′ | ‘02′ |
Command parameters/data:
| Byte(s) | Description | Length |
| 1-2 | File ID | 2 |
Response parameters/data in case of an MF or DF:
| Byte(s) | Description | Length |
| 1-2 | - RFU | 2 |
| 3 - 4 | Total amount of memory of the selected directory which is not allocated to any of the DFs or EFs under the selected directory | 2 |
| 5 – 6 | File ID | 2 |
| 7 | Type of file | 1 |
| 8 - 12 | RFU | 5 |
| 13 | Length of the following data (byte 14 to the end) | 1 |
| 14 - 34 | GSM specific data | 21 |
GSM specific data:
| Byte(s) | Description | Length |
| 14 | File characteristics | 1 |
| 15 | Number of DFs which are a direct child of the current directory | 1 |
| 16 | Number of EFs which are a direct child of the current directory | 1 |
| 17 | Number of CHVs, UNBLOCK CHVs andadministrative codes | 1 |
| 18 | RFU | 1 |
| 19 | CHV1 status | 1 |
| 20 | UNBLOCK CHV1 status | 1 |
| 21 | CHV2 status | 1 |
| 22 | UNBLOCK CHV2 status | 1 |
| 23 | RFU | 1 |
| 24 - 34 | Reserved for the administrative management 0 . lgth | 11 |
Response parameters/data in case of an EF:
| Byte(s) | Description | Length |
| 1-2 | RFU | 2 |
| 3 -4 | File size(for transparent EF: the length of the body part of the EF)(for linear fixed or cyclic EF: record length multiplied by the number of records of the EF) | 2 |
| 5 - 6 | File ID | 2 |
| 7 | Type of file | 1 |
| 8 | For transparent and linear fixed EFs this byte is RFU. For a cyclic EF all bits except bit 7 are RFU;b7=1 indicates that the INCREASE command is allowed on the selected cyclic file. | 1 |
| 9 - 11 | Access conditions | 3 |
| 12 | File status | 1 |
| 13 | Length of the following data (byte 14 to the end) | 1 |
| 14 | Structure of EF | 1 |
| 15 | Length of a record | 1 |
| 16 and following | RFU | - |
STATUS
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| STATUS | ‘A0′ | ‘F2′ | ‘00′ | ‘00′ | lgth |
READ BINARY
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| READ BINARY | ‘A0′ | ‘B0‘ | offset high | offset low | lgth |
Response parameters/data:
| Byte(s) | Description | Length |
| 1- lgth | - Data to be read | lgth |
UPDATE BINARY
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| UPDATE BINARY | ‘A0′ | ‘D6′ | offset high | offset low | lgth |
Command parameters/data:
| Byte(s) | Description | Length |
| 1 - lgth | Data | lgth |
READ RECORD
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| READ RECORD | ‘A0′ | ‘B2′ | Rec.No. | Mode | lgth |
Parameter P2 specifies the mode:
- ‘02′ = next record;
- ‘03′ = previous record;
- ‘04′ = absolute mode/current mode, the record number is given in P1 with P1=’00′ denoting
the current record.
Response parameters/data:
| Byte(s) | Description | Length |
| 1 - lgth | The data of the record | lgth |
UPDATE RECORD
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| UPDATE RECORD | ‘A0′ | ‘DC’ | Rec.No. | Mode | lgth |
Parameter P2 specifies the mode:
- ‘02′ = next record;
- ‘03′ = previous record;
- ‘04′ = absolute mode/current mode; the record number is given in P1 with P1=’00′ denoting
the current record.
Command parameters/data:
| Byte(s) | Description | Length |
| 1-lgth | Data | lgth |
SEEK
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| SEEK | ‘A0′ | ‘A2′ | ‘00′ | Type/Mode | lgth |
Parameter P2 specifies type and mode:
- ‘x0′ = from the beginning forward;
- ‘x1′ = from the end backward;
- ‘x2′ = from the next location forward;
- ‘x3′ = from the previous location backward
with x=’0′ specifies type 1 and x=’1′ specifies type 2 of the SEEK command.
Command parameters/data:
| Byte(s) | Description | Length |
| 1-lgth | Pattern | lgth |
There are no response parameters/data for a type 1 SEEK. A type 2 SEEK returns the following response parameters/data:
| Byte(s) | Description | Length |
| 1 | Record number | 1 |
INCREASE
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| INCREASE | ‘A0′ | ‘32′ | ‘00′ | ‘00′ | ‘03′ |
Command parameters/data:
| Byte(s) | Description | Length |
| 1-3 | Value to be added | 3 |
Response parameters/data:
| Byte(s) | Description | Length |
| 1-X | Value of the increased record | X |
| X+1 - X+3 | Value which has been added | 3 |
VERIFY CHV
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| VERIFY CHV | ‘A0′ | ‘20′ | ‘00′ | CHV No. | ‘08′ |
Parameter P2 specifies the CHV:
- ‘01′ = CHV1;
- ‘02′ = CHV2.
Command parameters/data:
| Byte(s) | Description | Length |
| 1-8 | CHV value | 8 |
CHANGE CHV
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| CHANGE CHV | ‘A0′ | ‘24′ | ‘00′ | CHV No. | ‘10′ |
Parameter P2 specifies the CHV:
- ‘01′ = CHV1;
- ‘02′ = CHV2.
Command parameters/data:
| Byte(s) | Description | Length |
| 1-8 | Old CHV value | 8 |
| 9-16 | New CHV value | 8 |
DISABLE CHV
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| DISABLE CHV | ‘A0′ | ‘26′ | ‘00′ | ‘01′ | ‘08′ |
Command parameters/data:
| Byte(s) | Description | Length |
| 1-8 | CHV1 value | 8 |
ENABLE CHV
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| ENABLE CHV | ‘A0′ | ‘28′ | ‘00′ | ‘01′ | ‘08′ |
Command parameters/data:
| Byte(s) | Description | Length |
| 1-8 | CHV1 value | 8 |
UNBLOCK CHV
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| UNBLOCK CHV | ‘A0′ | ‘2C’ | ‘00′ | CHV No. | ‘10′ |
Parameter P2 specifies the CHV:
- 00 = CHV1;
- 02 = CHV2.
Command parameters/data:
| Byte(s) | Description | Length |
| 1-8 | UNBLOCK CHV value | 8 |
| 9-16 | New CHV value | 8 |
INVALIDATE
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| INVALIDATE | ‘A0′ | ‘04′ | ‘00′ | ‘00′ | ‘00′ |
REHABILITATE
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| REHABILITATE | ‘A0′ | ‘44′ | ‘00′ | ‘00′ | ‘00′ |
RUN GSM ALGORITHM
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| RUN GSM ALGORITHM | ‘A0′ | ‘88′ | ‘00′ | ‘00′ | ‘10′ |
Command parameters/data:
| Byte(s) | Description | Length |
| 1-16 | RAND | 16 |
Response parameters/data:
| Byte(s) | Description | Length |
| 1-4 | SRES | 4 |
| 5-12 | Cipher Key Kc | 8 |
SLEEP
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| SLEEP | ‘A0′ | ‘FA’ | ‘00′ | ‘00′ | ‘00′ |
GET RESPONSE
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| GET RESPONSE | ‘A0′ | ‘C0′ | ‘00′ | ‘00′ | lgth |
TERMINAL PROFILE
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| TERMINAL PROFILE | ‘A0′ | ‘10′ | ‘00′ | ‘00′ | lgth |
ENVELOPE
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| ENVELOPE | ‘A0′ | ‘C2′ | ‘00′ | ‘00′ | lgth |
FETCH
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| FETCH | ‘A0′ | ‘12′ | ‘00′ | ‘00′ | lgth |
TERMINAL RESPONSE
| COMMAND | CLASS | INS | P1 | P2 | P3 |
| TERMINAL RESPONSE | ‘A0′ | ‘14′ | ‘00′ | ‘00′ | lgth |

















July 23, 2009 @ 3:24 pm.
emm. love it )