当前位置:网站首页>haas506 2.0开发教程-高级组件库-modem.sim(仅支持2.2以上版本)
haas506 2.0开发教程-高级组件库-modem.sim(仅支持2.2以上版本)
2022-06-23 05:12:00 【智云服】
haas506 2.0开发教程-高级组件库-modem.sim
1.获取sim卡信息
案例说明:
- 开发板联网需要插入SIM卡
- 获取ICCID、IMSI等信息。
main.py
from modem import sim
print("获取SIM卡状态:",sim.getStatus())
print("ICCID:",sim.getIccid())
print("IMSI:",sim.getImsi())
日志输出
获取SIM卡状态: 0
ICCID: 89860622310046855807
IMSI: 460065201385580
2.Class-sim
| getStatus | getIccid | getImsi |
|---|---|---|
| 获取SIM卡状态 | 获取ICCID | 获取IMSI |
sim - SIM卡功能
- 函数原型:
modem.sim()
参数说明: 无
返回值: sim对象创建成功,返回Name(sim)
getImsi - 获取IMSI(国际移动用户识别码)
函数功能: 获取IMSI(国际移动用户识别码)
函数原型:
sim.getImsi()
参数说明: 无
返回值: 返回IMSI
getIccid - 获取ICCID(集成电路卡识别码)
函数功能: 获取ICCID(集成电路卡识别码)
函数原型:
sim.getIccid()
参数说明: 无
返回值: 返回ICCID
getStatus - 获取SIM卡状态
函数功能: 获取SIM卡状态
函数原型:
sim.getStatus()
参数说明: 无
返回值: 返回值=0,sim卡正常,返回值=-1,sim卡异常
边栏推荐
- Microsoft interview question: creases in origami printing
- qt creater搭建osgearth环境(osgQT MSVC2017)
- For non dpdk kvm1.0 machines, set init Maxrxbuffers changed from 256 to 1024 to improve packet receiving capacity
- c#数据库报错问题大家帮我看看吧
- Day_13 傳智健康項目-第13章
- Given a node of a binary tree, return the successor node of the node
- Illustration Google V8 18: asynchronous programming (I): how does V8 implement micro tasks?
- Softing dataFEED OPC Suite将西门子PLC数据存储到Oracle数据库中
- 2020 smart power plant industry insight white paper
- Golang regular regexp package use -04- use regular replacement (replaceall(), replaceallliteral(), replaceallfunc())
猜你喜欢
随机推荐
开源生态|超实用开源License基础知识扫盲帖(下)
Global attribute lang attribute
Day_12 传智健康项目-JasperReports
Jour 13 Projet de santé mentale - chapitre 13
C语言 踩坑:文档编码错误,导致base64中文编码错误
Illuminate\support\collection de duplication unique list de duplication
mysql如何将日期转为数字
如何查看本机IP
Long substring without repeating characters for leetcode topic resolution
C language removes line breaks (or other characters) at the end of strings
MySQL5.6 (5.7-8) 基于shardingsphere5.1.1 Sharding-Proxy模式读写分离
Linked Storage
How to add libraries for Arduino ide installation
百度URL参数之LINK?URL参数加密解密研究(代码实例)
Synchronous switching power supply reduces EMI layout dv/dt di/dt
C language obtains second, millisecond, subtle and nanosecond timestamps
What is a PDCA cycle? How to integrate PDCA cycle and OKR
Day_ 13 smart health project - Chapter 13
【Leetcode】431. Encode n-ary tree to binary tree (difficult)
图解 Google V8 # 17:消息队列:V8是怎么实现回调函数的?







