按照ISO-7816协议读取SIM卡的ICCID、IMSI等参数实验

  SIM卡是严格遵守ISO7816协议的智能卡,我们通过对SIM卡的如下实验,成功的得到ICCID和IMSI号,实验条件如下,

 

------------------------------------------------------------------------------------------

ATR 3B  3D 94  00  32 06  01 12 00  00  86 60  61 10  80  00 07

解释: 正向约定. Fl(时钟频率转换因子) = 09 (Fi = 512, f(max) = 5000 KHz), Dl(波特率校正因子) = 04 (8), I(最大编程电流) = 00 (25 mA), P(编程电压) = 00 V, N(Extra guardtime) = 00. 计算时间值: Work etu = 18 ms, Guard time = 0 ms. 后续传输协议类型T=0(异步半双工字符传输协议) , 数值:WI = 10, WT = 1382 ms.

ATR :3B 3D 94 00 32 06 01 12 00 00 86 60 61 10 80 00 07

ICCID :89 86 00 45 19 13 42 05 77 21

IMSI :08 49 06 20 16 18 54 89 64 (中国移动 158-159)

短信中心 : +8613800755500   (中国移动 广东深圳)

ICCID解释: 中国移动:广东省:珠海东信和平:13年:号段1345

-----------------------------------------------------------------------------------------------

1. 读取SIMICCID号过程

<==3B 3D 94 00 32 06 01 12 00 00 86 60 61 10 80 00 07  (ATR)

==>A0 A4 00 00 02

<==A4

==>3F 00

<==9F 17

==>A0 A4 00 00 02

<==A4

==>2F E2

<==9F 0F

==>A0 B0 00 00 0A

<==B0 98 68 00 54 91 31 24 50 77 12 90 00     ( ICCID: 89 86 00 45 19 13 42 05 77 21)

-----------------------------------------------------------------------------------------------

2. 读取SIMIMSI号过程

(IMSI: 08 49 06 20 16 18 54 89 64)

<==  3B 3D 94 00 32 06 01 12 00 00 86 60 61 10 80 00 07  (ATR)

==>A0 A4 00 00 02

<==A4

==>3F 00

<==9F 17

==>A0 A4 00 00 02

<==A4

==>7F 20

<==9F 17

==>A0 C0 00 00 17

<==C0 00 00 00 11 7F 20 02 00 00 00 00 00 0A 93 00 1F 0C 00 83 8A 83 8A 00 90 00

==>A0 A4 00 00 02

<==A4

==>3F 00

<==9F 17

==>A0 A4 00 00 02

<==A4

==>2F E2

<== 9F 0F

==>A0 B0 00 00 0A

<==B0 98 68 00 54 91 31 24 50 77 12 90 00

==>A0 A4 00 00 02

<==A4

==>3F 00

<==9F 17

==>A0 A4 00 00 02

<==A4

==>7F 20

<==9F 17

==>A0 C0 00 00 17

<==C0 00 00 00 11 7F 20 02 00 00 00 00 00 0A 93 00 1F 0C 00 83 8A 83 8A 00 90 00

==>A0 A4 00 00 02

<==A4

==>6F 07

<==9F 0F

==>A0 B0 00 00 09

<==B0 08 49 06 20 16 18 54 89 64 90 00

==>A0 A4 00 00 02

<==A4

==>3F 00

<==9F 17

==> A0 A4 00 00 02

<==A4

==>7F 10

<==9F 17

==>A0 C0 00 00 17

<==C0 00 00 0D 16 7F 10 02 00 00 00 00 00 0A 93 00 0C 0C 00 83 8A 83 8A 00 90 00

==>A0 A4 00 00 02

<==A4

==>6F 42

<==9F 0F

==>A0 C0 00 00 0F

<==C0 00 00 00 C8 6F 42 04 00 11 FF 44 01 02 01 28 90 00

==>A0 B2 01 04 28

<==B2 FF FF FF FF FF FF FF FF FF FF FF FF FD FF FF FF FF FF FF FF FF FF FF FF FF 08 91 68 31 08 70 55 05 F0 FF FF FF FF FF FF 90 00


深圳市鑫狮通讯设备开发有限公司
客服热线+86-0755-82224022(24小时热线)