From 629c9101bc9cf2d63d7c3515a3c3a127dc63284f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Thu, 27 Aug 2026 01:11:55 +0300 Subject: [PATCH] STATUS: use P2=0C (phone-like, no FCP echo); v1.9.12 _send_status sent F2 00 00 -> the card echoes the FCP of the currently selected DF on every poll/one-shot STATUS. Phones use P2=0C (no response expected) to avoid that overhead. Keep P1=00 and the SIM/UICC P3 distinction (SIM=0x23, UICC=0x00): CLA F2 00 0C P3 Affects one-time /api/status-poll and the automatic polling timer. Version 1.9.11 -> 1.9.12 everywhere; SW cache otaman-v22 -> otaman-v23 --- docs/api.md | 2 +- frontend/index.html | 2 +- frontend/sw.js | 2 +- pyproject.toml | 2 +- pysim_otaman_server/server.py | 8 +++++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/api.md b/docs/api.md index b938d14..45775bf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -54,7 +54,7 @@ Returns server version for compatibility checking. **Example response:** ```json -{"version": "1.9.11"} +{"version": "1.9.12"} ``` ### `GET /api/status` diff --git a/frontend/index.html b/frontend/index.html index 95821c5..c49f465 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -18,7 +18,7 @@
-

OTAMan SIM OTA with a Human Face v1.9.11

+

OTAMan SIM OTA with a Human Face v1.9.12

github diff --git a/frontend/sw.js b/frontend/sw.js index 36fbc70..6827201 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'otaman-v22'; +const CACHE = 'otaman-v23'; const URLS = [ 'index.html', 'help.html', diff --git a/pyproject.toml b/pyproject.toml index 1e1628e..edc8d95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pysim-otaman-server" -version = "1.9.11" +version = "1.9.12" description = "HTTP REST server wrapping pysim for the OTAMan PWA" requires-python = ">=3.8" # pysim is a git-only dependency installed explicitly by setup.bat/setup.sh. diff --git a/pysim_otaman_server/server.py b/pysim_otaman_server/server.py index 4af80dd..b8f7340 100644 --- a/pysim_otaman_server/server.py +++ b/pysim_otaman_server/server.py @@ -18,7 +18,7 @@ from osmocom.construct import GsmOrUcs2Adapter from osmocom.tlv import BER_TLV_IE -VERSION = '1.9.11' +VERSION = '1.9.12' # Static file serving (the PWA lives in /frontend, served by this server @@ -885,9 +885,11 @@ def _reset_proactive_log(): def _send_status(scc): - """STATUS (F2) with correct P3 per card type: SIM=0x23, UICC=0x00.""" + """STATUS (F2) with correct P3 per card type: SIM=0x23, UICC=0x00. + P2=0C mirrors phone behavior - no FCP of the selected DF returned + (plain F2 00 00 would echo the FCP, which is unnecessary overhead).""" p3 = '23' if scc.cat_cla == 'a0' else '00' - return scc._tp.send_apdu('%sf20000%s' % (scc.cat_cla, p3)) + return scc._tp.send_apdu('%sf2000c%s' % (scc.cat_cla, p3)) def _send_event_download(scc, event_type, event_data=None):