sim-card - 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.
解决方案
有一个很好的实用程序类供 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));
推荐阅读
- c++ - 我们可以显式调用一个虚拟的`operator delete`吗?
- python - 文本在错误的窗口 tkinter 中打开
- android - 在统一android中集成Applovin Sdk
- reactjs - 用于快速创建 React 组件的 package.json 脚本
- c - 使用具有静态的函数的 C 编程华氏到摄氏度错误转换
- domain-driven-design - 实体是否应该有方法,如果有,如何防止它们在聚合之外被调用
- css - 选择选择器以更改字体
- mysql - SQL中如何随机生成数字和字母
- laravel - Laravel Passport 无效的刷新令牌 - 令牌未链接到客户端
- node.js - Mongoose 成功保存了一个文档,但它没有反映在数据库中