From d1c6a9c27a9ddd5c1f9324ea3df017218d685c9b 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: Sun, 27 Sep 2026 01:33:22 +0300 Subject: [PATCH] ui: rename the Phone simulator tab to Simulator and the eSIM pill to eSIM LPA (v3.5.12) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Top-level tab label "Phone simulator" -> "Simulator" (RU "Симулятор"); the DOM ids stay tab-phone / phone-sub-*. - The eSIM pill inside the Simulator tab is now "eSIM LPA" (EN/RU), matching the section's ES10/LPA scope; the panel id stays phone-sub-esim. - Documentation updated: help EN/RU (section 8 Simulator, list of the four pills including Test script, tab lists and cross-references), README/README_RUS (tab lists, Simulator section, eSIM LPA), AGENTS repo/root. - Test titles updated; version 3.5.12; sw cache simple-v265. 579 frontend / 467 Python green. --- README.md | 8 ++++---- README_RUS.md | 10 +++++----- frontend/help-ru.html | 14 +++++++------- frontend/help.html | 12 ++++++------ frontend/index.html | 12 ++++++------ frontend/sw.js | 2 +- frontend/tests/esim.test.js | 2 +- frontend/tests/html.test.js | 8 ++++---- frontend/tests/testscripts.test.js | 2 +- pyproject.toml | 2 +- pysim_simple_server/server.py | 2 +- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index c163ed6..2d6ce28 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ npm run build ## Interface -Seven top-level tabs: **Remote APDU**, **SCP80**, **SCP81**, **Cards**, **Profiler**, **Card reader**, and **Phone simulator**. **Remote APDU** and **SCP80** use pill sub-tabs; the **SCP81** tab has **Listener** and **Scripts** pills; the Card reader tab has three sub-tabs: **File manager**, **pySim command line**, and **Raw APDU**; the Profiler tab lists **Profiles**, **Card snapshots**, and **Custom files**. +Seven top-level tabs: **Remote APDU**, **SCP80**, **SCP81**, **Cards**, **Profiler**, **Card reader**, and **Simulator**. **Remote APDU** and **SCP80** use pill sub-tabs; the **SCP81** tab has **Listener** and **Scripts** pills; the Card reader tab has three sub-tabs: **File manager**, **pySim command line**, and **Raw APDU**; the Profiler tab lists **Profiles**, **Card snapshots**, and **Custom files**. --- @@ -608,9 +608,9 @@ Files not in pysim's model can be added manually from the **Custom files** tab i The canonical path removes the old ambiguity where the same file could be described both relatively and absolutely. Custom files persist in `localStorage` across sessions and are included in card scans under the same existence check. Export/import as JSON for sharing; legacy relative paths (e.g. `a153/4954`) are resolved on load, unresolvable ones are dropped and reported in the list. -## Phone simulator +## Simulator -The **Phone simulator** tab provides real-time CAT session interaction. It has three pills: **Phone** (STK menu, STATUS and polling, subscribed events, proactive command log), **TR Config** (response data injected into TERMINAL RESPONSEs for proactive commands) and **eSIM** (local eUICC operations). +The **Simulator** tab provides real-time CAT session interaction. It has four pills: **Phone** (STK menu, STATUS and polling, subscribed events, proactive command log), **TR Config** (response data injected into TERMINAL RESPONSEs for proactive commands), **eSIM LPA** (local eUICC operations) and **Test script** (form-based scripts of card actions and proactive-command expectations). **Subscribed Events** — the card's SET UP EVENT LIST is displayed with per-event **Send** buttons. Clicking opens a form specific to the event type: @@ -650,7 +650,7 @@ Values persist on the server until restart. Apply → hex updates; Save → POST **Network state monitor** — a compact **Network state** panel next to the simulation buttons shows what the card currently holds and what was last simulated. Its header carries the **simulated service state** (*Undefined* until a scenario or a Location status event sets it, then *Normal service* / *Limited service* / *No service*) with a *PLMN not allowed* marker when the location files or EF.FPLMN show a rejection, plus the current location: PLMN, country and operator, the LAI/RAI/TAI, and the **roaming class** (*Home* when the PLMN equals the HPLMN, *Home equivalent* when it is in EF.EHPLMN, otherwise *Guest*). Below it, one compact line per monitored file (IMSI, EHPLMN, SPDI, HPLMNwAcT, LOCI, PSLOCI, EPSLOCI, EPSNSC, CBMI, CBMIR, SMSstatus, FPLMN) with its decoded summary and how it was last updated (`init`, `write`, `read`, `refresh`); hover for the full decoded fields — long PLMN lists are abbreviated (EF.HPLMNwAcT shows only the first network plus a `… +N` counter). The panel reads the files once at equip (only when the ICCID was readable), updates them in place from the bytes the simulator wrote, re-reads EF.IMSI after every scenario and Location-status event, and never polls the card — **Refresh** re-reads all files on demand. -**eSIM** — for an eUICC (SGP.22/SGP.32) the **eSIM** pill reads the chip and manages the installed profiles through the local ES10 interface (via pySim, no SM-DP+ contact): **Chip** (EID, EUICCInfo1/2 with decoded capability bit lists, card resources, CI PKI identifiers, category, forbidden PPRs, certification data; configured default SM-DP+ / root DS addresses; the rules authorisation table from ES10b GetRat), **Profiles** (state, nickname, provider, ICCID, ISD-P AID, class, owner, and the icon image at its natural size with its type/byte size; **Enable**/**Disable** switches a profile — the card usually sends REFRESH first and the card session is then re-initialized like an equip, so the ICCID, network state and every cached card view are re-read, and the requested state is verified against the re-read profile list) and **Notifications** (read-only pending list). No profile downloads, no notification handling and no SM-DP+ interaction — only the local ES10a/b/c functions are used; a non-eUICC card is reported as such. +**eSIM LPA** — for an eUICC (SGP.22/SGP.32) the **eSIM LPA** pill reads the chip and manages the installed profiles through the local ES10 interface (via pySim, no SM-DP+ contact): **Chip** (EID, EUICCInfo1/2 with decoded capability bit lists, card resources, CI PKI identifiers, category, forbidden PPRs, certification data; configured default SM-DP+ / root DS addresses; the rules authorisation table from ES10b GetRat), **Profiles** (state, nickname, provider, ICCID, ISD-P AID, class, owner, and the icon image at its natural size with its type/byte size; **Enable**/**Disable** switches a profile — the card usually sends REFRESH first and the card session is then re-initialized like an equip, so the ICCID, network state and every cached card view are re-read, and the requested state is verified against the re-read profile list) and **Notifications** (read-only pending list). No profile downloads, no notification handling and no SM-DP+ interaction — only the local ES10a/b/c functions are used; a non-eUICC card is reported as such. ## SCP81 diff --git a/README_RUS.md b/README_RUS.md index 1fdc571..8833c85 100644 --- a/README_RUS.md +++ b/README_RUS.md @@ -6,7 +6,7 @@ SIMple — инструментарий для специалистов по UIC - **APDU-верстак** — конструкторы SIM/USIM RFM и Expanded Script (TS 102 226), команды GlobalPlatform RAM, парсер C-APDU/R-APDU и декодер ответов (ISO 7816 / TS 102 221 / GP); - **OTA-лаборатория** — защищённые пакеты SCP80 (TS 102 225) и установка Java Card RAM, а также терминальная сторона HTTP OTA (SCP81): эмуляция BIP-каналов, PSK-TLS-сервер администрирования и выполнение скриптов APDU; -- **Симулятор телефона** — браузер меню SIM Toolkit, обработка proactive-команд и событий, редактирование TERMINAL PROFILE и журнал C-AT-диалога; +- **Симулятор** — браузер меню SIM Toolkit, обработка proactive-команд и событий, редактирование TERMINAL PROFILE, тест-скрипты карты и журнал C-AT-диалога; - **Профайлер карты** — захват файловой системы (профили и неизменяемые снимки с таймингами), точное сравнение снимков и декодер FCP/FCI. **Демо:** [simple.atroshin.ru](https://simple.atroshin.ru) — только PWA, для экспериментов. Для функций картридера установите сервер (ниже). @@ -38,7 +38,7 @@ npm run build ## Интерфейс -Семь вкладок верхнего уровня: **Remote APDU**, **SCP80**, **SCP81**, **Cards («Карты»)**, **Profiler**, **Card reader** и **Phone simulator**. Вкладки Remote APDU и SCP80 используют пиллы-подвкладки; вкладка **SCP81** — пиллы **Listener** и **Scripts**; во вкладке Card reader три подвкладки: **File manager**, **pySim command line** и **Raw APDU**; во вкладке Profiler — **Profiles**, **Card snapshots** и **Custom files**. +Семь вкладок верхнего уровня: **Remote APDU**, **SCP80**, **SCP81**, **Cards («Карты»)**, **Profiler**, **Card reader** и **Simulator**. Вкладки Remote APDU и SCP80 используют пиллы-подвкладки; вкладка **SCP81** — пиллы **Listener** и **Scripts**; во вкладке Card reader три подвкладки: **File manager**, **pySim command line** и **Raw APDU**; во вкладке Profiler — **Profiles**, **Card snapshots** и **Custom files**. --- @@ -583,9 +583,9 @@ Delivery PoR (SPI2 `01`) проще — карта возвращает PoR на Канонический путь убирает прежнюю неоднозначность, когда один и тот же файл можно было описать и относительно, и абсолютно. Пользовательские файлы сохраняются в `localStorage` между сессиями и включаются в сканирование карты с той же проверкой существования. Экспорт/импорт в JSON для обмена; устаревшие относительные пути (напр. `a153/4954`) разрешаются при загрузке, неразрешимые отбрасываются и показываются в списке. -## Симулятор телефона +## Симулятор -Вкладка **«Симулятор телефона»** обеспечивает взаимодействие с CAT-сессией в реальном времени. Три подвкладки: **«Телефон»** (меню STK, STATUS и опрос, подписанные события, журнал проактивных команд), **«Конфигурация TR»** (данные ответов, подставляемые в TERMINAL RESPONSE для проактивных команд) и **«eSIM»** (локальные операции с eUICC). +Вкладка **«Симулятор»** обеспечивает взаимодействие с CAT-сессией в реальном времени. Четыре подвкладки: **«Телефон»** (меню STK, STATUS и опрос, подписанные события, журнал проактивных команд), **«Конфигурация TR»** (данные ответов, подставляемые в TERMINAL RESPONSE для проактивных команд), **«eSIM LPA»** (локальные операции с eUICC) и **«Тест-скрипт»** (сценарные тест-скрипты действий с картой и ожиданий проактивных команд). **Subscribed Events** — список событий SET UP EVENT LIST с кнопками **Send**. Клик открывает форму для конкретного типа события: @@ -622,7 +622,7 @@ Delivery PoR (SPI2 `01`) проще — карта возвращает PoR на **Монитор сетевого состояния** — компактная панель **«Сетевое состояние»** рядом с кнопками симуляции показывает, что сейчас хранит карта и что было сэмулировано последним. В заголовке — **сэмулированное состояние сервиса** (*Не определено*, пока его не задаст сценарий или событие Location status, затем *Обычный сервис* / *Ограниченный сервис* / *Нет сервиса*) с пометкой *PLMN не разрешён*, если location-файлы или EF.FPLMN указывают на отказ, плюс текущее местоположение: PLMN, страна и оператор, LAI/RAI/TAI и **класс роуминга** (*Домашняя сеть*, если PLMN совпадает с HPLMN; *Эквивалентная домашней*, если он есть в EF.EHPLMN; иначе *Гостевая (роуминг)*). Ниже — по одной компактной строке на контролируемый файл (IMSI, EHPLMN, SPDI, HPLMNwAcT, LOCI, PSLOCI, EPSLOCI, EPSNSC, CBMI, CBMIR, SMSstatus, FPLMN) с декодированной сводкой и признаком последнего обновления (`init`, `write`, `read`, `refresh`); при наведении — все декодированные поля; длинные списки PLMN сокращаются (EF.HPLMNwAcT показывает только первую сеть и пометку `… +N`). Панель читает файлы один раз при подключении карты (только если ICCID читается), обновляет их на месте по записанным симулятором байтам, перечитывает EF.IMSI после каждого сценария и события Location status и никогда не опрашивает карту — кнопка **«Обновить»** перечитывает все файлы по требованию. -**eSIM** — для eUICC (SGP.22/SGP.32) подвкладка **«eSIM»** читает чип и управляет установленными профилями через локальный интерфейс ES10 (через pySim, без обращения к SM-DP+): **Chip** (EID, EUICCInfo1/2 с декодированными битовыми списками возможностей, ресурсами карты, идентификаторами CI PKI, категорией, запрещёнными PPR, данными сертификации; настроенные адреса SM-DP+ по умолчанию / корневого DS; таблица авторизации правил из ES10b GetRat), **Profiles** (состояние, nickname, провайдер, ICCID, AID ISD-P, класс, владелец и значок профиля в натуральную величину с типом/размером в байтах; **Enable**/**Disable** переключает профиль — карта обычно сначала присылает REFRESH, после чего сессия карты переинициализируется как при equip, и ICCID, сетевое состояние и все кэшированные представления перечитываются, а запрошенное состояние проверяется по перечитанному списку профилей) и **Notifications** (список ожидающих уведомлений, только чтение). Никаких загрузок профилей, обработки уведомлений и взаимодействия с SM-DP+ — используются только локальные функции ES10a/b/c; для карты не-eUICC подвкладка сообщает об этом. +**eSIM LPA** — для eUICC (SGP.22/SGP.32) подвкладка **«eSIM LPA»** читает чип и управляет установленными профилями через локальный интерфейс ES10 (через pySim, без обращения к SM-DP+): **Chip** (EID, EUICCInfo1/2 с декодированными битовыми списками возможностей, ресурсами карты, идентификаторами CI PKI, категорией, запрещёнными PPR, данными сертификации; настроенные адреса SM-DP+ по умолчанию / корневого DS; таблица авторизации правил из ES10b GetRat), **Profiles** (состояние, nickname, провайдер, ICCID, AID ISD-P, класс, владелец и значок профиля в натуральную величину с типом/размером в байтах; **Enable**/**Disable** переключает профиль — карта обычно сначала присылает REFRESH, после чего сессия карты переинициализируется как при equip, и ICCID, сетевое состояние и все кэшированные представления перечитываются, а запрошенное состояние проверяется по перечитанному списку профилей) и **Notifications** (список ожидающих уведомлений, только чтение). Никаких загрузок профилей, обработки уведомлений и взаимодействия с SM-DP+ — используются только локальные функции ES10a/b/c; для карты не-eUICC подвкладка сообщает об этом. ## SCP81 diff --git a/frontend/help-ru.html b/frontend/help-ru.html index e0e77a2..1cb37f4 100644 --- a/frontend/help-ru.html +++ b/frontend/help-ru.html @@ -19,7 +19,7 @@

SIMple Документация

1. Обзор

-

SIMple — инструментарий для специалистов по UICC/SIM-картам: автономный Progressive Web App (PWA), закрывающий весь цикл лабораторной работы — APDU-верстак (конструкторы SIM/USIM RFM и Expanded Script, команды GlobalPlatform RAM, парсер C-APDU/R-APDU и декодер ответов), OTA-лаборатория (защищённые пакеты SCP80 и установка Java Card RAM, а также терминальная сторона HTTP OTA — SCP81: эмуляция BIP-каналов, PSK-TLS-сервер администрирования и выполнение скриптов APDU), симулятор телефона (меню SIM Toolkit, proactive-команды и события, редактирование TERMINAL PROFILE, журнал C-AT-диалога) и профайлер карты (профили и неизменяемые снимки с таймингами, точное сравнение снимков, декодер FCP/FCI).

+

SIMple — инструментарий для специалистов по UICC/SIM-картам: автономный Progressive Web App (PWA), закрывающий весь цикл лабораторной работы — APDU-верстак (конструкторы SIM/USIM RFM и Expanded Script, команды GlobalPlatform RAM, парсер C-APDU/R-APDU и декодер ответов), OTA-лаборатория (защищённые пакеты SCP80 и установка Java Card RAM, а также терминальная сторона HTTP OTA — SCP81: эмуляция BIP-каналов, PSK-TLS-сервер администрирования и выполнение скриптов APDU), симулятор (меню SIM Toolkit, proactive-команды и события, редактирование TERMINAL PROFILE, журнал C-AT-диалога), тест-скрипты карты и профайлер карты (профили и неизменяемые снимки с таймингами, точное сравнение снимков, декодер FCP/FCI).

Приложение — один статический файл index.html. Все вычисления выполняются в браузере; доступ к карте — через локальный HTTP-сервер (pysim-simple-server), оборачивающий библиотеку pySim.

Браузер (SIMple PWA) → HTTP :8080 → pysim-simple-server → pySim → PC/SC → ридер → UICC/SIM

Стандарты, на которые опирается приложение:

@@ -44,7 +44,7 @@ @@ -384,7 +384,7 @@

6. Вкладка «Картридер» (pySim)

-

Подключение к локальному pysim-simple-server для работы с картой: введите URL сервера (по умолчанию http://127.0.0.1:8080) и нажмите Подключиться. Область статуса показывает состояние ридера/карты, а Подключить карту (пере)инициализирует карту после вставки. Подвкладки: Файловый менеджер, Командная строка pySim и Отправка APDU. «Профайлер» и «Симулятор телефона» — отдельные вкладки верхнего уровня.

+

Подключение к локальному pysim-simple-server для работы с картой: введите URL сервера (по умолчанию http://127.0.0.1:8080) и нажмите Подключиться. Область статуса показывает состояние ридера/карты, а Подключить карту (пере)инициализирует карту после вставки. Подвкладки: Файловый менеджер, Командная строка pySim и Отправка APDU. «Профайлер» и «Симулятор» — отдельные вкладки верхнего уровня.

6.1 Файловый менеджер

Дерево файловой системы отображается слева; выбор файла открывает панель деталей справа. Элементы сгруппированы: DF выше EF, сортировка по FID или символьному имени (пиллы и кнопка «Проверить все файлы» закреплены над прокручиваемым деревом; выбор сохраняется в localStorage). При выборе файла над содержимым также показываются FID, тип файла, размер / структура записей и декодированный FCI — в рамке с символьным именем файла.

@@ -417,7 +417,7 @@

Сценарий B — Симуляция реальной сетевой среды для тестирования SIM

B.1 Ответы на PROVIDE LOCAL INFORMATION (PLI)

    -
  1. Откройте Симулятор телефона → Данные для PROVIDE LOCAL INFORMATION.
  2. +
  3. Откройте Симулятор → Данные для PROVIDE LOCAL INFORMATION.
  4. Используйте формы декодирования/кодирования для IMEI (01), Location Info (00), Access Technology (06) и т.д.
  5. Нажмите Сохранить — значения сохранятся на сервере.
  6. Включите Опрос (интервал 30 с), чтобы карта периодически выдавала PLI.
  7. @@ -480,8 +480,8 @@

    Добавление файлов, не покрытых моделью pySim. Пользовательский файл всегда имеет полный путь от MF или ADF (ADF.USIM, ADF.ISIM): выберите корень, введите путь родительского DF (сам корень, стандартный DF из дерева файлового менеджера или пользовательский DF — любой вложенности, с подсказками при вводе; родитель, ещё не встречавшийся в дереве, остаётся допустимым и помечается ⚠), 4-hex FID и псевдоним (EF.…/DF.…; префикс определяет, EF это или DF). Канонический путь убирает прежнюю неоднозначность, когда один и тот же файл можно было описать и относительно, и абсолютно. Добавленные файлы появляются в дереве «Файловый менеджер»; в каждой строке есть «Редактировать» (путь + псевдоним; изменение пути DF перепривязывает дочерние записи — кнопка становится «Сохранить», «Отмена» отменяет) и «Удалить» (удаление DF удаляет и его дочерние записи после подтверждения). Список сохраняется в localStorage; обмен — Экспорт в файл / Импорт из файла; старые относительные пути (например, a153/4954) разрешаются при загрузке, неразрешимые отбрасываются и отмечаются в списке.

    -

    8. Симулятор телефона

    -

    Работа с сессией Card Application Toolkit. Три подвкладки: «Телефон» (меню STK, STATUS и опрос, подписанные события, журнал проактивных команд), «Конфигурация TR» (данные ответов, подставляемые в TERMINAL RESPONSE для проактивных команд) и «eSIM» (локальные операции с eUICC).

    +

    8. Симулятор

    +

    Работа с сессией Card Application Toolkit. Четыре подвкладки: «Телефон» (меню STK, STATUS и опрос, подписанные события, журнал проактивных команд), «Конфигурация TR» (данные ответов, подставляемые в TERMINAL RESPONSE для проактивных команд), «eSIM LPA» (локальные операции с eUICC) и «Тест-скрипт» (сценарные тест-скрипты карты с ожиданием проактивных команд, см. §8.9).

    8.1 Меню STK

    Если карта выдала команду SET UP MENU, вверху этого представления появляется блок «Меню STK» с изумрудной кнопкой STK: <название>, открывающей оверлей меню (браузер STK-меню карты). Если карта не задала меню, вместо кнопки показывается «Меню не задано картой». Состояние меню обновляется при каждом открытии представления. Пункты меню, для которых карта передала Next Action Indicator (TS 102 223 §8.24), показывают его серым суффиксом (например, → SET UP MENU) — что карта выполнит при выборе пункта. Интерактивные проактивные команды всегда получают TERMINAL RESPONSE: оверлей ждёт вашего выбора, и если вы не ответили и не нажали Timeout, сервер сам отвечает результатом timeout через --menu-timeout секунд (по умолчанию 60, 0 отключает). Назад и Timeout продолжают диалог с картой: если карта в ответ выдаёт следующую проактивную команду (SELECT ITEM или DISPLAY TEXT), панель показывает её; кэшированное верхнее меню появляется только когда карте больше нечего выполнять.

    @@ -554,7 +554,7 @@

    9. Установка сервера

    -

    Для работы с картой (вкладка «Картридер», «Симулятор телефона», доставка OTA) нужен локальный pysim-simple-server — встроенный в SIMple HTTP-сервер, оборачивающий pySim, работающий с ридером через PC/SC или serial и раздающий сам PWA (откройте http://127.0.0.1:8080).

    +

    Для работы с картой (вкладка «Картридер», «Симулятор», доставка OTA) нужен локальный pysim-simple-server — встроенный в SIMple HTTP-сервер, оборачивающий pySim, работающий с ридером через PC/SC или serial и раздающий сам PWA (откройте http://127.0.0.1:8080).

    9.1 Требования

      diff --git a/frontend/help.html b/frontend/help.html index 540475d..a2ac31e 100644 --- a/frontend/help.html +++ b/frontend/help.html @@ -44,7 +44,7 @@
      • Header — the app version, an INSTALL PWA button (shown when the browser offers installation, enabling offline use), links to the project on GitHub and to this help, an EN/RU language toggle, and a dark/light theme toggle. Next to the title a small status indicator shows the server/card state (gray dot = connecting, red dot = no server connection, card icons = no card / equipping / equipped), the equipped card's ICCID digits, a compact ADM ✓ (green, administrator PIN verified) or ADM ✗ (red, not verified) badge for the current card session — with a trailing key glyph (ADM ✓ ⚿) when the card preset matching that ICCID carries an ADM key — and gray SCP80 / SCP81 markers that appear when that preset has complete SCP80 (KIc/KID, SPI1/SPI2, counter and keys) or SCP81 (PSK identity/key) settings.
      • Language and theme choices are stored in localStorage and persist across reloads.
      • -
      • Top-level tabs: Remote APDU (SIM RFM, USIM RFM, RAM/GP, Expanded Script, Push commands, Parser (C-APDU Parser, R-APDU parser)), SCP80 (Secured Packet, RAM), SCP81 (Listener, Scripts), Cards, Profiler (list tabs Profiles, Card snapshots, Custom files), Card reader (File manager, pySim command line, Raw APDU), and Phone simulator.
      • +
      • Top-level tabs: Remote APDU (SIM RFM, USIM RFM, RAM/GP, Expanded Script, Push commands, Parser (C-APDU Parser, R-APDU parser)), SCP80 (Secured Packet, RAM), SCP81 (Listener, Scripts), Cards, Profiler (list tabs Profiles, Card snapshots, Custom files), Card reader (File manager, pySim command line, Raw APDU), and Simulator.
      • The help link opens this documentation at the section matching the current view (e.g. the Profiler tab opens §7).
      @@ -383,7 +383,7 @@

      6. Card reader (pySim) tab

      -

      Connects to a local pysim-simple-server for live card operations: enter the server URL (default http://127.0.0.1:8080) and press Connect. The status area shows the reader/card state, and Equip card (re)initializes the card after insertion. Sub-tabs: File manager, pySim command line, and Raw APDU. The Profiler and Phone simulator are separate top-level tabs.

      +

      Connects to a local pysim-simple-server for live card operations: enter the server URL (default http://127.0.0.1:8080) and press Connect. The status area shows the reader/card state, and Equip card (re)initializes the card after insertion. Sub-tabs: File manager, pySim command line, and Raw APDU. The Profiler and Simulator are separate top-level tabs.

      6.1 File manager

      The file system tree is displayed on the left; selecting a file opens its detail pane on the right. Entries are grouped with DFs above EFs and sorted by FID or symbolic Name (pills pinned above the scrolling tree together with Probe all files; the choice is remembered in localStorage). Selecting a file also shows its FID, file type, size / record layout and the decoded FCI — in a bordered block labelled with the file’s symbolic name — above the content pane.

      @@ -416,7 +416,7 @@

      Scenario B — Simulating a real network environment for SIM testing

      B.1 Answer PROVIDE LOCAL INFORMATION (PLI)

        -
      1. Open Phone simulator → PROVIDE LOCAL INFORMATION response data.
      2. +
      3. Open Simulator → PROVIDE LOCAL INFORMATION response data.
      4. Use the decode/encode forms to set IMEI (01), Location Info (00), Access Technology (06), etc.
      5. Click Save — values persist server-side.
      6. Enable Polling (interval 30 s) so the card issues PLI periodically.
      7. @@ -479,8 +479,8 @@

        Add files that pySim’s model does not cover. A custom file always has a full path rooted at MF or an ADF (ADF.USIM, ADF.ISIM): pick the root, type the parent DF path (the root itself, a standard DF known from the file-manager tree, or a custom DF — any depth, with suggestions while you type; a parent that has not been seen in the tree yet stays valid and is marked ⚠), the 4-hex FID and an alias (EF.…/DF.…; the prefix decides whether the entry is an EF or a DF). The canonical path removes the old ambiguity where the same file could be described both relatively and absolutely. Added files appear in the File manager tree; each row has Edit (path + alias; changing a DF’s path re-points its child entries — the button becomes Save, Cancel aborts) and Delete (deleting a DF also deletes its child entries after a confirmation). The list persists in localStorage and can be shared with Export to file / Import from file; legacy relative paths (e.g. a153/4954) are resolved on load, unresolvable ones are dropped and reported in the list.

        -

        8. Phone simulator

        -

        Interacts with the Card Application Toolkit session. The view has three pills: Phone (STK menu, STATUS and polling, subscribed events, proactive command log), TR Config (response data injected into TERMINAL RESPONSEs for proactive commands) and eSIM (local eUICC operations).

        +

        8. Simulator

        +

        Interacts with the Card Application Toolkit session. The view has four pills: Phone (STK menu, STATUS and polling, subscribed events, proactive command log), TR Config (response data injected into TERMINAL RESPONSEs for proactive commands), eSIM LPA (local eUICC operations) and Test script (scripted card test scripts with proactive-command expectations, see §8.9).

        8.1 STK menu

        When the card has issued a SET UP MENU command, a “STK menu” block appears at the top of this view with an emerald STK: <title> button that opens the menu overlay (same as the card’s STK menu browser). If the card has not set up a menu, the block shows “No menu set by the card” instead. The menu state is refreshed each time the view is opened. Menu items whose card-provided Next Action Indicator (TS 102 223 §8.24) is present show it as a small gray suffix (e.g. → SET UP MENU) — what the card would do when the item is selected. User-interactive proactive commands always get a TERMINAL RESPONSE: the overlay pauses for your choice, and if you neither answer nor press Timeout, the server answers with a timeout result after the --menu-timeout seconds (default 60, 0 disables). Back and Timeout keep the dialogue with the card going: when the card replies with a further proactive command (SELECT ITEM or DISPLAY TEXT) the panel shows it; the cached top menu appears only when the card has nothing more to execute.

        @@ -553,7 +553,7 @@

    9. Server installation

    -

    Live card operations (Card reader tab, Phone simulator, OTA delivery) require the local pysim-simple-server — a small HTTP server bundled with SIMple that wraps pySim, talks to the reader over PC/SC or serial, and also serves the PWA itself (open http://127.0.0.1:8080).

    +

    Live card operations (Card reader tab, Simulator, OTA delivery) require the local pysim-simple-server — a small HTTP server bundled with SIMple that wraps pySim, talks to the reader over PC/SC or serial, and also serves the PWA itself (open http://127.0.0.1:8080).

    9.1 Prerequisites

      diff --git a/frontend/index.html b/frontend/index.html index 6418d24..f691359 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -43,7 +43,7 @@ - +
      @@ -1029,7 +1029,7 @@
      - +
      @@ -1616,7 +1616,7 @@ // ===== Version ===== // Single source of truth for the PWA version: shown in the header and used // by the server version check in pysimConnect(). -const SIMPLE_VERSION = '3.5.11'; +const SIMPLE_VERSION = '3.5.12'; document.getElementById('app-version').textContent = 'v' + SIMPLE_VERSION; // ===== Tab switching ===== @@ -6402,7 +6402,7 @@ function decodeResponse() { out.innerHTML = html; } -// ===== Test scripts (Phone simulator pill) ===== +// ===== Test scripts (Simulator pill) ===== // Scripts are stored locally (simple_tests) and executed server-side // (/api/test/run): the server owns the card while a run is active (other // card endpoints answer 409) and reports the steps through @@ -16062,7 +16062,7 @@ const LANG_RU = { 'Verifying against pySim reference...': 'Сверка с эталоном pySim...', 'Verify vs pySim': 'Проверить в pySim', 'Send to Card': 'Отправить на карту', - 'Phone simulator': 'Симулятор телефона', + 'Simulator': 'Симулятор', 'HTTP OTA listener': 'HTTP OTA слушатель', 'Mode': 'Режим', 'Capture (dump)': 'Захват (dump)', @@ -16156,7 +16156,7 @@ const LANG_RU = { 'from EF.HPLMNwAcT': 'из EF.HPLMNwAcT', 'from IMSI': 'из IMSI', 'Home PLMN not available (no HPLMNwAcT/IMSI)': 'Домашняя сеть недоступна (нет HPLMNwAcT/IMSI)', - 'eSIM': 'eSIM', + 'eSIM LPA': 'eSIM LPA', 'The equipped card is not an eUICC': 'Подключённая карта — не eUICC', 'Chip': 'Чип', 'Profiles': 'Профили', diff --git a/frontend/sw.js b/frontend/sw.js index 8bf01b0..c3178a5 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'simple-v264'; +const CACHE = 'simple-v265'; const URLS = [ 'index.html', 'help.html', diff --git a/frontend/tests/esim.test.js b/frontend/tests/esim.test.js index af9ecba..e36de77 100644 --- a/frontend/tests/esim.test.js +++ b/frontend/tests/esim.test.js @@ -233,7 +233,7 @@ test('the chip view groups the sections into a grid', () => { assert.match(fn, /esimChipSectionRows/); }); -test('the eSIM pill is wired into the Phone simulator tab', () => { +test('the eSIM LPA pill is wired into the Simulator tab', () => { assert.ok(html.includes('data-phone-sub="esim"')); assert.ok(html.includes('id="phone-sub-esim"')); assert.ok(html.includes("'phone', 'tr', 'esim'")); diff --git a/frontend/tests/html.test.js b/frontend/tests/html.test.js index 069f928..4f06d51 100644 --- a/frontend/tests/html.test.js +++ b/frontend/tests/html.test.js @@ -150,12 +150,12 @@ test('the document and its inline script are complete', () => { assert.ok(inline[1].includes('function cApduSwitchSubtab'), 'key function missing'); }); -test('profiler and phone simulator are top-level tab contents', () => { +test('profiler and simulator are top-level tab contents', () => { assert.ok(html.includes('id="tab-profiler" class="tab-content hidden"')); assert.ok(html.includes('id="tab-phone" class="tab-content hidden"')); }); -test('phone simulator has Phone / TR Config pills', () => { +test('simulator has Phone / TR Config pills', () => { assert.match(html, /data-phone-sub="phone" onclick="phoneSwitchSubtab\('phone'\)"/); assert.match(html, /data-phone-sub="tr" onclick="phoneSwitchSubtab\('tr'\)"/); assert.ok(html.includes('id="phone-sub-phone"')); @@ -267,7 +267,7 @@ test('every help anchor used by the UI exists in help.html', () => { assert.ok(html.includes("? 'scp81-scripts' : 'scp81-listener'")); }); -test('phone simulator has the network-simulation fieldset', () => { +test('simulator has the network-simulation fieldset', () => { assert.ok(html.includes('data-l10n="Network simulation"')); for (const s of ['cold_boot', 'attach_eps', 'attach_2g', 'service_lost', 'limited_service', 'roaming_denied', 'churn', 'sms_received', @@ -283,7 +283,7 @@ test('phone simulator has the network-simulation fieldset', () => { assert.match(html, /data-needs="card" onclick="netSimRun\('service_lost'\)"/); }); -test('phone simulator action buttons are green and the TP status sits below them', () => { +test('simulator action buttons are green and the TP status sits below them', () => { assert.match(html, /id="tp-send-btn"[^>]*bg-emerald-600/); assert.match(html, /id="pli-status-btn"[^>]*bg-emerald-600/); // #tp-status is outside the button row (the row's
      comes after diff --git a/frontend/tests/testscripts.test.js b/frontend/tests/testscripts.test.js index 9ca60e1..0540bd7 100644 --- a/frontend/tests/testscripts.test.js +++ b/frontend/tests/testscripts.test.js @@ -117,7 +117,7 @@ test('testCommandOptions covers the proactive names and keeps custom values', () assert.ok(custom.some(o => o.v === '0x74')); }); -test('the Phone simulator hosts the Test script pill and its wiring', () => { +test('the Simulator hosts the Test script pill and its wiring', () => { assert.match(html, /data-phone-sub="test"[^>]*data-l10n="Test script"/); assert.match(html, /id="phone-sub-test"/); assert.match(html, /\['phone', 'tr', 'esim', 'test'\]/); diff --git a/pyproject.toml b/pyproject.toml index d88c032..107b723 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pysim-simple-server" -version = "3.5.11" +version = "3.5.12" description = "HTTP REST server wrapping pysim for the SIMple PWA" requires-python = ">=3.8" # pysim is a git-only dependency installed explicitly by setup.bat/setup.sh. diff --git a/pysim_simple_server/server.py b/pysim_simple_server/server.py index e31d735..4c99fd8 100644 --- a/pysim_simple_server/server.py +++ b/pysim_simple_server/server.py @@ -31,7 +31,7 @@ from osmocom.tlv import BER_TLV_IE from osmocom.utils import rpad -VERSION = '3.5.11' +VERSION = '3.5.12' MAX_ENVELOPE_SEGMENTS = 5 # max SMS segments for outgoing C-APDU in ENVELOPE