From 8454daddbab90c5e3102a0929d9046bfd1714697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mia=20Zhong=28=E9=92=9F=E9=9F=AC=E7=8E=89=29?= Date: Mon, 18 Oct 2021 14:18:16 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90SIM=E3=80=91=E6=96=B0=E5=A2=9ESIM?= =?UTF-8?q?=E2=80=94=5FgenericAccess=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/api/QuecPythonClasslib.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/zh-cn/api/QuecPythonClasslib.md b/zh-cn/api/QuecPythonClasslib.md index d173ca7..3242b64 100644 --- a/zh-cn/api/QuecPythonClasslib.md +++ b/zh-cn/api/QuecPythonClasslib.md @@ -335,6 +335,33 @@ if __name__ == '__main__': 注意:能成功获取IMSI、ICCID、电话号码的前提是SIM卡状态为1,可通过sim.getStatus()查询。 +##### 通用SIM访问接口 + +> **sim.genericAccess(sim_id, cmd_APDU)** + +将命令APDU通过modem传递给SIM卡,然会返回响应APDU。 + +* 参数 + +| 参数 | 参数类型 | 参数说明 | +| ---- | -------- | --------------------------------------------- | +| sim_id | int | simid, 范围:0 or 1 | +| APDU | string | command passed on by the MT to the SIM in the format as described in GSM 51.011 | + +* 返回值 + +成功返回(length,响应APDU),失败返回整型-1。 + +* 示例 + +```python +>>> sim.genericAccess(0,'80F2000016') +(48, '623E8202782183027FF08410A0000000871002FF86FF9000') +>>> +``` + + + ##### 获取IMSI > **sim.getImsi()**