PySim研究

PySim研究
pySim-读、写和浏览可编程SIM/USIM/ISIM/HPSIM卡
1.1.PySim-sim安装

git clone https://gitea.osmocom.org/sim-card/pysim.git
sudo apt-get install --no-install-recommends pcscd libpcsclite-dev python3 python3-setuptools python3-pycryptodome python3-pyscard python3-pip
cd pysim/
pip3 install --user -r requirements.txt

1.2.PySim-sim启动
1.2.1.读卡器启动
./pySim-shell.py -p0

1.2.2.真实Sim读取
./pySim-shell.py --modem-device /dev/ttyUSB3

1.2.3.Redhat安装问题
pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install pandas -i https://pypi.doubanio.com/simple

1.3.运行pySim工具
1.3.1.启动pcscd:
开启一个terminal窗口:pcscd -f -d
1.3.2.启动swsim:
另外开启一个terminal窗口,执行以下语句:
./build/swsim.elf --ip 127.0.0.1 --port 37324 --fs filesystem.swiccfs --fs-gen ./data/usim.json
在这里插入图片描述

1.3.3.启动pysim
./pySim-shell.py -p0执行这个语句这样就能连接到模拟卡swsim上;

pySIM-shell (MF)> select ADF.USIM
pySIM-shell (MF/ADF.USIM)> select EF.IMSI
pySIM-shell (MF/ADF.USIM/EF.IMSI)> read_binary
089999990000000010
pySIM-shell (MF/ADF.USIM/EF.IMSI)> update_binary 089999990000000011
089999990000000011
pySIM-shell (MF/ADF.USIM/EF.IMSI)> read_binary
089999990000000011
在这里插入图片描述
在这里插入图片描述

1.4.参考文档:
https://github.com/osmocom/pysim
https://downloads.osmocom.org/docs/pysim/master/html/
https://downloads.osmocom.org/docs/pysim/master/html/shell.html#AT%20Command%20Modem%20Reader

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

weixin_45555543

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值