This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/19409 )
Change subject: pySim-read.py: decode contents of EF.AD (Administrative data)
......................................................................
pySim-read.py: decode contents of EF.AD (Administrative data)
Change-Id: I938667bdf99d238eefac205d6dd70db1d714d842
---
M pySim-read.py
M pySim/ts_51_011.py
2 files changed, 21 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/09/19409/1
diff --git a/pySim-read.py b/pySim-read.py
index 69cab4d..81d6b46 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -28,7 +28,7 @@
import random
import re
import sys
-from pySim.ts_51_011 import EF, DF, EF_SST_map
+from pySim.ts_51_011 import EF, DF, EF_SST_map, EF_AD_mode_map
from pySim.ts_31_102 import EF_UST_map, EF_USIM_ADF_map
from pySim.ts_31_103 import EF_IST_map
@@ -225,7 +225,15 @@
# EF.AD
(res, sw) = card.read_binary('AD')
if sw == '9000':
- print("AD: %s" % (res,))
+ print("Administrative data: %s" % (res,))
+ if res[:2] in EF_AD_mode_map:
+ print("\tMS operation mode: %s" % (EF_AD_mode_map[res[:2]],))
+ else:
+ print("\tMS operation mode: (unknown 0x%s)" % (res[:2],))
+ if int(res[4:6], 16) & 0x01:
+ print("\tCiphering Indicator: enabled")
+ else:
+ print("\tCiphering Indicator: disabled")
else:
print("AD: Can't read, response code = %s" % (sw,))
diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py
index 37d2bc8..8b73f02 100644
--- a/pySim/ts_51_011.py
+++ b/pySim/ts_51_011.py
@@ -313,4 +313,14 @@
57: 'Multimedia Messaging Service (MMS)',
58: 'Extension 8',
59: 'MMS User Connectivity Parameters',
-}
\ No newline at end of file
+}
+
+# 10.3.18 "EF.AD (Administrative data) "
+EF_AD_mode_map = {
+ '00' : 'normal operation',
+ '80' : 'type approval operations',
+ '01' : 'normal operation + specific facilities',
+ '81' : 'type approval operations + specific facilities',
+ '02' : 'maintenance (off line)',
+ '04' : 'cell test operation',
+}
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/19409
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I938667bdf99d238eefac205d6dd70db1d714d842
Gerrit-Change-Number: 19409
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200727/1042e9f2/attachment.htm>