7-手机模块的数据交互AT+CRSM

没有听说Android与SIM卡直接通信的,只知道SIM通过Modem于Android通信,这样的话就得看看RIL了。Android可以通过RIL接口访问SIM卡,貌似也是唯一的

AT+CRSM

AT+CRSM=[,[,,,[,[,]]]]

may be

  • 176 READ BINARY (B0)
  • 178 READ RECORD (B2)
  • 192 GET RESPONSE (C0)
  • 214 UPDATE BINARY (D6)
  • 220 UPDATE RECORD (DC)
  • 242 STATUS (F2)

may be

  • 12258 meaning ICCID file (2FE2)
  • 28471 meaning ACMmax file (6F37)
  • 28423 meaning IMSI file (6F07)
  • 28473 meaning ACM file (6F39)
  • 28481 meaning PUKT file (6F41)
  • 28482 meaning SMS file (6F42)

正常的ICCID数据交互

=>00 A4 08 04 02 
<=A4
=>2F E2
<=61 19
=>00 C0 00 00 19
<=62178202412183022FE28A01058B032F06018002000A880110
=>00 B0 00 00 0A
<=98 68 60 71 80 00 53 39 60 52

AT+CRSM=164,12258,0,0,2
AT+CRSM=192,12258,0,0,27

AT+CRSM=164,28423,0,0,2
AT+CRSM=192,28423,0,0,27

AT+CSIM=192,12258,0,0,25
CRSM的ICCID交互

AT+CRSM=192,12258,0,0,25
+CRSM: 144,0,"62178202412183022FE28A01058B032F06048002000A880110"

OK

AT+CRSM=176,12258,0,0,10
+CRSM: 144,0,"98686071800053396052"

OK

176:B0
12258:2F E2
144,0:90 00

正常的IMSI数据交互

=>00 A4 08 04 04
<=A4
=>7F 20 6F 07
<=61 18
=>00 C0 00 00 18
<=62168202412183026F078A01058B032F0604800200098800
=>00 B0 00 00 09
<=08 49 06 60 53 89 10 92 26

CRSM的IMSI交互

AT+CRSM=176,28423,0,0,9
+CRSM: 144,0,"084906605389109226"

OK

176:B0
28423:6F 07
144,0:90 00

Osmocom项目是一个关于开源移动通信的总体项目,这包括实现各种移动通信标准的软件和工具,包括GSM,DECT,TETRA等。
https://osmocom.org/projects/

java card:

https://osmocom.org/projects/cellular-infrastructure/wiki/Shadysimpy
git clone http://git.osmocom.org/sim/sim-tools/
git clone http://git.osmocom.org/sim/hello-stk/
git clone https://github.com/lizhiwei/sim-tools.git

py card:

https://pyscard.sourceforge.io/
http://osmocom.org/projects/osmo-sim-auth/wiki

git clone https://git.osmocom.org/osmo-sim-auth
git clone https://git.osmocom.org/pysim
发布了111 篇原创文章 · 获赞 78 · 访问量 13万+

猜你喜欢

转载自blog.csdn.net/Creator_Ly/article/details/105725515