Skip to content

Commit 5dcff85

Browse files
authored
Merge pull request #18 from Mia1234567890/main
【SIM】新增SIM—_genericAccess接口
2 parents 0b3cbbf + 8454dad commit 5dcff85

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

zh-cn/api/QuecPythonClasslib.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,33 @@ if __name__ == '__main__':
351351

352352
注意:能成功获取IMSI、ICCID、电话号码的前提是SIM卡状态为1,可通过sim.getStatus()查询。
353353

354+
##### 通用SIM访问接口
355+
356+
> **sim.genericAccess(sim_id, cmd_APDU)**
357+
358+
将命令APDU通过modem传递给SIM卡,然会返回响应APDU。
359+
360+
* 参数
361+
362+
| 参数 | 参数类型 | 参数说明 |
363+
| ---- | -------- | --------------------------------------------- |
364+
| sim_id | int | simid, 范围:0 or 1 |
365+
| APDU | string | command passed on by the MT to the SIM in the format as described in GSM 51.011 |
366+
367+
* 返回值
368+
369+
成功返回(length,响应APDU),失败返回整型-1。
370+
371+
* 示例
372+
373+
```python
374+
>>> sim.genericAccess(0,'80F2000016')
375+
(48, '623E8202782183027FF08410A0000000871002FF86FF9000')
376+
>>>
377+
```
378+
379+
380+
354381
##### 获取IMSI
355382

356383
> **sim.getImsi()**

0 commit comments

Comments
 (0)