From 9fd8238051ed15f53a2c473884e537f8134206c0 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, 11 Oct 2026 16:51:30 +0300 Subject: [PATCH] v3.25.6: the PLI dictionary save feedback + the timer wording The v3.25.5 report's follow-ups: a field the server could not use was silently dropped, and the PWA also filtered non-hex fields client-side (never sending them). The POST now collects them and names them in the response - `invalid` (a malformed key/value: not hex, an odd number of digits, a non-string value) and `unknown` (a well-formed code outside the qualifier list), both omitted when everything was applied - and the PWA's Save sends every field, composes "Not saved: 0A (invalid value), 18 (unknown qualifier)" (`pysimPliRejectMsg`) into a new #pli-save-msg line under the button and shows "Not saved" briefly. The guide's timer exception now says "card-initiated automatic action" (the timer retries every 5 s; polling/menu are suspended, not retrying). Docs: api.md's POST contract, help EN/RU - which also said "22 PLI qualifiers" while the list has 25. Tests: the rejection lists per case (odd length, non-hex value/key, non-string, unknown code) and the valid-save absence, the PWA message helper and the wiring pins. 887 frontend + 875 Python; sw cache simple-v430. --- docs/api.md | 14 +++++++--- docs/test-scripts.md | 2 +- frontend/help-ru.html | 4 +-- frontend/help.html | 4 +-- frontend/index.html | 41 ++++++++++++++++++++++------- frontend/sw.js | 2 +- frontend/tests/pli_dict.test.js | 40 ++++++++++++++++++++++++++++ pyproject.toml | 2 +- pysim_simple_server/server.py | 46 ++++++++++++++++++++++----------- tests/test_fetch_routes.py | 33 +++++++++++++++++++++++ 10 files changed, 152 insertions(+), 36 deletions(-) diff --git a/docs/api.md b/docs/api.md index ec9b93d..e6c8897 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1520,11 +1520,17 @@ override is set. ### `POST /api/pli-dict` -Updates dictionary entries. Body is a map of qualifier code to hex value; -keys must be known qualifiers and values valid hex, otherwise they are -ignored. A non-empty value becomes an override; an **empty value clears the +Updates dictionary entries. Body is a map of qualifier code to hex value. +A non-empty value becomes an override; an **empty value clears the override**, so the built-in default (if any) applies again. Returns the -updated effective dictionary. +updated effective dictionary plus, when any field was not saved, the lists +that name them: `invalid` (a malformed key or value — not hex, an odd number +of digits, a non-string value) and `unknown` (a well-formed code outside the +qualifier list); both keys are omitted when everything was applied (v3.25.6). + +```json +{"00": "130500F1100000", "0A": "630102", "invalid": ["0G"], "unknown": ["18"]} +``` ### `POST /api/scp81/bip` diff --git a/docs/test-scripts.md b/docs/test-scripts.md index e148b19..61e4b8c 100644 --- a/docs/test-scripts.md +++ b/docs/test-scripts.md @@ -534,7 +534,7 @@ the data really flows to/from the configured BIP target, and the BIP events (Data available, Channel status) flow for the channels the card itself opened - so an applet's own HTTP/BIP conversation completes inside a scripted run. The BIP **control** API stays blocked while a run is active (409), like the -terminal's other automatic actions (polling, menu). The one remaining +terminal's other automatic actions (polling, menu). The one card-initiated automatic action that still waits is the **timer expiration** event: a TIMER MANAGEMENT timer the card armed is not fired during a run (it retries every 5 s and fires when the run ends) - a deliberate exception to the diff --git a/frontend/help-ru.html b/frontend/help-ru.html index 6bbf9d0..97137bc 100644 --- a/frontend/help-ru.html +++ b/frontend/help-ru.html @@ -527,14 +527,14 @@

Кнопка Отправить STATUS отправляет STATUS (F2) вручную. Фоновый опрос включён по умолчанию (CAT-терминал опрашивает карту в режиме ожидания, TS 102 221 §14.6.2): после интервала бездействия (аргумент сервера --poll-interval, 1–255 с, по умолчанию 30 с, 0 отключает опрос) сервер отправляет STATUS и обрабатывает любую ожидающую проактивную команду. Переключатель включает и выключает опрос; команда карты POLL INTERVAL обновляет интервал (TS 102 223 §6.4.6; TERMINAL RESPONSE сообщает фактически используемый интервал), а после POLLING OFF переключатель показывает OFF янтарным цветом до нового POLL INTERVAL — ручная кнопка Отправить STATUS продолжает работать (на presence detection и ручной STATUS POLLING OFF не влияет). При извлечении карты опрос отключается и включается снова при следующем equip.

8.6 «Конфигурация TR» — данные ответа PROVIDE LOCAL INFORMATION

-

Редактируемые hex-значения для всех 22 квалификаторов PLI (TS 102 223 §8.6 + TS 131 111). У десяти квалификаторов есть встроенные формы декодирования/кодирования:

+

Редактируемые hex-значения для всех 25 квалификаторов PLI (TS 102 223 §8.6 + TS 131 111). У десяти квалификаторов есть встроенные формы декодирования/кодирования:

-

Значения хранятся на сервере до перезапуска. Для квалификаторов, определённых в спецификациях ETSI, заранее заданы разумные значения по умолчанию (местоположение — тестовая сеть 001/01, тестовый IMEI 490154203237518 и его IMEISV, язык «en», технология доступа E-UTRAN, автоматический поиск сети, полный заряд батареи): заданное значение переопределяет умолчание, а очистка поля возвращает умолчание; квалификатор даты/времени, пока пуст, отвечается часами хоста, а специфичные для 3GPP/3GPP2 квалификаторы (NMR, ESN, MEID, CSG/HNB, WLAN, slices, CAG, …) остаются пустыми — спецификации ETSI не определяют для них содержимое. Когда карта выдаёт PLI, сервер вставляет значения в TERMINAL RESPONSE — в том числе в ответ тест-скрипта.

+

Значения хранятся на сервере до перезапуска. Для квалификаторов, определённых в спецификациях ETSI, заранее заданы разумные значения по умолчанию (местоположение — тестовая сеть 001/01, тестовый IMEI 490154203237518 и его IMEISV, язык «en», технология доступа E-UTRAN, автоматический поиск сети, полный заряд батареи): заданное значение переопределяет умолчание, а очистка поля возвращает умолчание; квалификатор даты/времени, пока пуст, отвечается часами хоста, а специфичные для 3GPP/3GPP2 квалификаторы (NMR, ESN, MEID, CSG/HNB, WLAN, slices, CAG, …) остаются пустыми — спецификации ETSI не определяют для них содержимое. Поле, которое сервер не может использовать (значение не hex, нечётное число цифр, код вне списка квалификаторов), указывается под кнопкой «Сохранить», а не отбрасывается молча. Когда карта выдаёт PLI, сервер вставляет значения в TERMINAL RESPONSE — в том числе в ответ тест-скрипта.

8.7 Симуляция сети

Воспроизводит шаблоны записи реального телефона при смене сетевых условий (исследование трасс в projects/UICC_NAA.md): подключение EPS, потеря сервиса / ограниченный сервис, запрет роуминга, откат на 2G, приём SMS, перенастройка cell broadcast и AUTHENTICATE. По кнопке на сценарий; карта должна быть подключена.

diff --git a/frontend/help.html b/frontend/help.html index a1a1ade..23e0fc1 100644 --- a/frontend/help.html +++ b/frontend/help.html @@ -526,14 +526,14 @@

A Send STATUS button issues a manual STATUS (F2). Background Polling is on by default (a CAT terminal polls during idle, TS 102 221 §14.6.2): after the idle interval (server CLI --poll-interval, 1–255 s, default 30 s, 0 disables polling) the server sends STATUS and handles any pending proactive command. The toggle turns it off/on; the card's POLL INTERVAL command updates the interval (TS 102 223 §6.4.6; the TERMINAL RESPONSE reports the interval actually used), and after a POLLING OFF the toggle shows OFF in amber until a new POLL INTERVAL arrives — the manual Send STATUS button keeps working (presence detection and manual STATUS are not affected by POLLING OFF). Polling is disabled when the card is removed and re-enabled by the next equip.

8.6 TR Config — PROVIDE LOCAL INFORMATION response data

-

Editable hex values for all 22 PLI qualifiers (TS 102 223 §8.6 + TS 131 111). Ten qualifiers have inline decode/encode forms:

+

Editable hex values for all 25 PLI qualifiers (TS 102 223 §8.6 + TS 131 111). Ten qualifiers have inline decode/encode forms:

-

Values persist server-side until restart. Sensible defaults are pre-settled for the qualifiers the ETSI specs define (location as the test network 001/01, the test IMEI 490154203237518 and its IMEISV, language ‘en’, E-UTRAN access technology, automatic search mode, a full battery): a value you set overrides its default, and clearing the field restores it; the date/time qualifier is answered from the host clock while empty, and the 3GPP/3GPP2-specific qualifiers (NMR, ESN, MEID, CSG/HNB, WLAN, slices, CAG, …) stay empty - the ETSI specs define no contents for them. When the card issues PLI, the server injects the values into the TERMINAL RESPONSE - also into a test-script expectation's answer.

+

Values persist server-side until restart. Sensible defaults are pre-settled for the qualifiers the ETSI specs define (location as the test network 001/01, the test IMEI 490154203237518 and its IMEISV, language ‘en’, E-UTRAN access technology, automatic search mode, a full battery): a value you set overrides its default, and clearing the field restores it; the date/time qualifier is answered from the host clock while empty, and the 3GPP/3GPP2-specific qualifiers (NMR, ESN, MEID, CSG/HNB, WLAN, slices, CAG, …) stay empty - the ETSI specs define no contents for them. A field the server cannot use (a value that is not hex, an odd number of digits, a code outside the qualifier list) is named under the Save button instead of being silently dropped. When the card issues PLI, the server injects the values into the TERMINAL RESPONSE - also into a test-script expectation's answer.

8.7 Network simulation

Replays the write patterns a real phone performs when the network condition changes (trace study in projects/UICC_NAA.md): EPS attach, service loss / limited service, roaming denial, 2G fallback, SMS delivery, cell-broadcast reconfiguration and AUTHENTICATE. One button per scenario; the card must be equipped.

diff --git a/frontend/index.html b/frontend/index.html index f35d232..7d4430b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1302,6 +1302,7 @@