首页 > 解决方案 > EF ADN specification in SIM/USIM

问题描述

I am building an application to read SIM EF files. From 3G TS 31.102 I am trying to parse the EF ADN file.

According to spec for EF ADN,

1 to X Alpha Identifier O X bytes

X+1 Length of BCD number/SSC contents M 1 byte

X+2 TON and NPI M 1 byte

X+3 to X+12 Dialling Number/SSC String M 10 bytes

X+13 Capability/Configuration Identifier M 1 byte

X+14 Extension1 Record Identifier M 1 byte

I am not able to get the coding for -> Length of BCD number/SSC contents. In the spec the coding is according to GSM 04.08 but I am not able to find.

标签: sim-card

解决方案


有一个很好的实用程序供 BCD 操作进行测试。假设您正在询问如何获取缩写拨号号码的 BCD 数字的长度。ADN 数字可以是 3-4 位,如果它们写为 BCD,它们将是 2 个字节长,因为每个 BCD 数字都是 4 位半字节,在 TON/NPI 字节之后,您应该读取 N 个字节并将其转换为十进制值

byte[] bcds = DecToBCDArray(211);

System.out.println("BCD is "+ Hex.toHexString(bcds));
System.out.println("BCD length is "+ bcds.length);
System.out.println("To decimal "+ BCDtoString(bcds));

推荐阅读