From 052d90c03eb4e6eb3b334aee55baa3e0a09f5ce3 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: Wed, 23 Sep 2026 22:39:13 +0300 Subject: [PATCH] ui: HTTP OTA pill labels, CAT_TP paired with the BIP opening (v3.5.0) - The first two Push commands sub-pills carry the HTTP OTA prefix ("HTTP OTA Trigger (Push SMS)", "HTTP OTA Store (SD admin params)"), so the form headings drop it and read "Administrative session trigger (Push SMS)" / "Administrative session store data (SD admin params)". - BIP channel opening (01) gains the same-message CAT_TP follow-up: an "Also request the CAT_TP link establishment (02) in the same message" checkbox with the shared CAT_TP fields (destination port mandatory, optional max SDU / identification data / extra TLVs). The preview and Pack then carry the pair 80EC0101...80EC0102... as one command script (concatenated SMS when over 140 octets) and -> Expanded Script appends both 22 Command TLVs. Rationale (SIMalliance Stepping Stones R7 18.6): 01 carries the channel parameters, 02 only the CAT_TP port, and the guide recommends both in the same SMS; standalone 02 stays for cards with provisioned defaults. - Help 2.7 EN/RU, READMEs and AGENTS document the pairing, the fact that 03 is self-contained (it carries the mandatory OPEN CHANNEL TCP set, so no companion 01) and the Stepping Stones PoR advice (no PoR on success; on failure use SMS-SUBMIT / SPI2 0x20). - pushSectionApdus vectors cover the 01+02 pair and its mandatory port; sw cache -> simple-v250. --- README.md | 8 +++--- README_RUS.md | 8 +++--- frontend/help-ru.html | 9 +++--- frontend/help.html | 9 +++--- frontend/index.html | 49 +++++++++++++++++++++++++-------- frontend/sw.js | 2 +- frontend/tests/ts102226.test.js | 12 ++++++++ 7 files changed, 69 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 366042b..f26cdd9 100644 --- a/README.md +++ b/README.md @@ -359,7 +359,7 @@ Pastes raw APDU hex and renders a collapsible tree. It auto-detects the containe ### Push commands -Groups the commands that make the card dial out. Three sub-pills switch between the forms - Trigger (Push SMS), Store (SD admin params) and Channel / link trigger - and only the selected one is shown (the two GP forms share their fields). They are delivered differently - the administration trigger is a TLV message for the Security Domain, a §9 PUSH is a C-APDU (`80 EC 01 P2`) for an application that supports BIP/CAT_TP. +Groups the commands that make the card dial out. Three sub-pills switch between the forms - HTTP OTA Trigger (Push SMS), HTTP OTA Store (SD admin params) and Channel / link trigger - and only the selected one is shown (the two GP forms share their fields). They are delivered differently - the administration trigger is a TLV message for the Security Domain, a §9 PUSH is a C-APDU (`80 EC 01 P2`) for an application that supports BIP/CAT_TP. #### Administration session (HTTP OTA) @@ -381,9 +381,9 @@ The **Command Scripting template** checkbox wraps the whole `81` triggering comm The **Channel / link trigger** sub-pill builds the §9 requests with the same encoder as the RAM/GP chain's **PUSH** row and offers **Pack into Secured packet** (TAR stays manual - the request goes to the target application) and **→ Expanded Script** (each APDU becomes a `22` Command TLV): -- **BIP channel opening** (`01`) - OPEN CHANNEL COMPREHENSION-TLVs optional; the application issues the proactive OPEN CHANNEL itself; -- **CAT_TP link** (`02`) - destination port in transport level `3C` with protocol type 00 (mandatory), optional buffer size `39` / identification data `36`; -- **TCP connection** (`03`) - bearer `35`, transport level `3C` with protocol type 02, destination address `3E` (`21` IPv4 / `57` IPv6 / `F0` FQDN), NAA/APN `47`; the parameters are the OPEN CHANNEL TCP set (BIP, or a direct IP connection per TS 102 483 where supported); +- **BIP channel opening** (`01`) - OPEN CHANNEL COMPREHENSION-TLVs optional; the application issues the proactive OPEN CHANNEL itself. SIMalliance Stepping Stones R7 §18.6 recommends sending it together with the CAT_TP request in the same message (channel parameters in `01`, CAT_TP port in `02`) - the form has an *Also request the CAT_TP link establishment (02)* checkbox and the pair goes out as one concatenated command script; +- **CAT_TP link** (`02`) - destination port in transport level `3C` with protocol type 00 (mandatory), optional buffer size `39` / identification data `36`; standalone it relies on card-provisioned defaults, so prefer the pair above; +- **TCP connection** (`03`) - bearer `35`, transport level `3C` with protocol type 02, destination address `3E` (`21` IPv4 / `57` IPv6 / `F0` FQDN), NAA/APN `47`; the parameters are the OPEN CHANNEL TCP set and are mandatory in the request, so `03` is self-contained (no companion `01`) - the connection is established over BIP or a direct IP connection (TS 102 483) where supported; - **Identification packet** (`04`) is not a trigger - it needs an already open TCP channel, so the TCP request has an *Also send the identification packet (04)* checkbox that appends it in the same message; `04` also stays in the chain's PUSH row for scripts. --- diff --git a/README_RUS.md b/README_RUS.md index f7a6f0c..407dd28 100644 --- a/README_RUS.md +++ b/README_RUS.md @@ -333,7 +333,7 @@ CLA = `80` (GlobalPlatform v2.3.1). Удалённое управление со ### Пуш/триггер -Объединяет команды, заставляющие карту выйти в сеть. Три подвкладки переключают формы — Trigger (Push SMS), Store (SD admin params) и «Триггер канала/линка» — показывается только выбранная (обе формы GP используют один набор полей). Доставляются они по-разному — триггер администрирования это TLV-сообщение для Security Domain, а PUSH §9 это C-APDU (`80 EC 01 P2`) для приложения с поддержкой BIP/CAT_TP. +Объединяет команды, заставляющие карту выйти в сеть. Три подвкладки переключают формы — HTTP OTA Trigger (Push SMS), HTTP OTA Store (SD admin params) и «Триггер канала/линка» — показывается только выбранная (обе формы GP используют один набор полей). Доставляются они по-разному — триггер администрирования это TLV-сообщение для Security Domain, а PUSH §9 это C-APDU (`80 EC 01 P2`) для приложения с поддержкой BIP/CAT_TP. #### Сессия администрирования (HTTP OTA) @@ -356,9 +356,9 @@ CLA = `80` (GlobalPlatform v2.3.1). Удалённое управление со Подвкладка **«Триггер канала/линка»** собирает запросы §9 тем же кодировщиком, что и строка **PUSH** в цепочке RAM/GP, и предлагает **«Упаковать в Secured packet»** (TAR остаётся ручным — запрос адресован целевому приложению) и **→ Расширенный скрипт** (каждый APDU становится Command TLV `22`): -- **Открытие BIP-канала** (`01`) — COMPREHENSION-TLV OPEN CHANNEL необязательны; проактивную команду OPEN CHANNEL выдаёт само приложение; -- **CAT_TP** (`02`) — порт назначения в transport level `3C` с типом 00 (обязателен), необязательные buffer size `39` / данные идентификации `36`; -- **TCP-соединение** (`03`) — bearer `35`, transport level `3C` с типом 02, адрес назначения `3E` (`21` IPv4 / `57` IPv6 / `F0` FQDN), NAA/APN `47`; это параметры OPEN CHANNEL для TCP (BIP или прямое IP-соединение по TS 102 483, где поддерживается); +- **Открытие BIP-канала** (`01`) — COMPREHENSION-TLV OPEN CHANNEL необязательны; проактивную команду OPEN CHANNEL выдаёт само приложение. Stepping Stones R7 §18.6 рекомендует отправлять его вместе с CAT_TP-запросом в одном сообщении (параметры канала в `01`, порт CAT_TP в `02`) — в форме есть флажок «Также запросить установление соединения CAT_TP (02)», пара уходит одним скриптом команд; +- **CAT_TP** (`02`) — порт назначения в transport level `3C` с типом 00 (обязателен), необязательные buffer size `39` / данные идентификации `36`; отдельно полагается на предустановленные на карте умолчания, поэтому предпочтительна пара выше; +- **TCP-соединение** (`03`) — bearer `35`, transport level `3C` с типом 02, адрес назначения `3E` (`21` IPv4 / `57` IPv6 / `F0` FQDN), NAA/APN `47`; это параметры OPEN CHANNEL для TCP, и они обязательны в запросе, поэтому `03` самодостаточен (сопутствующий `01` не нужен) — соединение устанавливается через BIP или прямое IP-соединение по TS 102 483, где поддерживается; - **Пакет идентификации** (`04`) — не триггер: ему нужен уже открытый TCP-канал, поэтому у TCP-запроса есть флажок «Также отправить пакет идентификации (04)», добавляющий его в то же сообщение; `04` также остаётся в строке PUSH цепочки для сценариев. --- diff --git a/frontend/help-ru.html b/frontend/help-ru.html index 8edb281..a9d0641 100644 --- a/frontend/help-ru.html +++ b/frontend/help-ru.html @@ -231,7 +231,7 @@
Вставка raw APDU hex и отображение сворачиваемого дерева. Автоматически определяет контейнер: Expanded Script (начало AA или AE80, декодируется по ETSI TS 102 226 §5.2.1) или Compact C-APDU chain (последовательность C-APDU ISO 7816). Каждый узел показывает метку, hex и краткое описание; родительские узлы раскрываются в подэлементы.
Объединяет команды, заставляющие карту выйти в сеть. Три подвкладки переключают формы — Trigger (Push SMS), Store (SD admin params) и «Триггер канала/линка» — показывается только выбранная форма; обе формы GP используют один набор полей (режим меняет только обёртку payload’а, а заголовок формы указывает режим). Они из разных спецификаций и доставляются по-разному: триггер администрирования это TLV-сообщение для Security Domain (HTTP OTA), а PUSH §9 это C-APDU (80 EC 01 P2) для приложения с поддержкой BIP и/или CAT_TP.
Объединяет команды, заставляющие карту выйти в сеть. Три подвкладки переключают формы — HTTP OTA Trigger (Push SMS), HTTP OTA Store (SD admin params) и «Триггер канала/линка» — показывается только выбранная форма; обе формы GP используют один набор полей (режим меняет только обёртку payload’а, а заголовок формы указывает режим). Они из разных спецификаций и доставляются по-разному: триггер администрирования это TLV-сообщение для Security Domain (HTTP OTA), а PUSH §9 это C-APDU (80 EC 01 P2) для приложения с поддержкой BIP и/или CAT_TP.
Сборка payload’ов Remote Application Management over HTTP по GlobalPlatform GPC v2.2 Amendment B v1.1 (§4.7). Два режима:
@@ -255,10 +255,11 @@Подвкладка «Триггер канала/линка» собирает запросы §9 тем же кодировщиком, что и строка PUSH в цепочке RAM/GP, показывает предпросмотр C-APDU, и предлагает «Упаковать в Secured packet» (TAR остаётся ручным: запрос адресован целевому приложению, а не Security Domain) и → Расширенный скрипт (оборачивает каждый APDU в Command TLV 22 и добавляет их в конструктор Expanded Script).
01) — необязательные COMPREHENSION-TLV OPEN CHANNEL; при пустом значении действуют умолчания приложения. Проактивную команду OPEN CHANNEL выдаёт само приложение (§9.1.1).02) — порт назначения в transport level 3C с типом протокола 00 (обязателен), необязательные buffer size 39 / данные идентификации 36.03) — bearer 35, transport level 3C с типом протокола 02 = TCP-клиент, удалённое соединение, адрес назначения 3E (21 IPv4 / 57 IPv6 / F0 FQDN), NAA/APN 47; порт и адрес обязательны. Это параметры OPEN CHANNEL для TCP: соединение устанавливается через BIP или, если карта и терминал это поддерживают, через прямое IP-соединение (TS 102 483).01) — необязательные COMPREHENSION-TLV OPEN CHANNEL; при пустом значении действуют умолчания приложения. Проактивную команду OPEN CHANNEL выдаёт само приложение (§9.1.1). SIMalliance Stepping Stones R7 §18.6 рекомендует отправлять его вместе с CAT_TP-запросом в одном сообщении (параметры канала — в 01, порт CAT_TP — в 02), поэтому в форме есть флажок «Также запросить установление соединения CAT_TP (02)»; пара передаётся одним скриптом команд (конкатенированные SMS, если больше 140 октетов).02) — порт назначения в transport level 3C с типом протокола 00 (обязателен), необязательные buffer size 39 / данные идентификации 36. Отдельно он полагается на предустановленные на карте умолчания канала/CAT_TP, против чего предостерегает руководство Stepping Stones; предпочтительна пара выше.03) — bearer 35, transport level 3C с типом протокола 02 = TCP-клиент, удалённое соединение, адрес назначения 3E (21 IPv4 / 57 IPv6 / F0 FQDN), NAA/APN 47; порт и адрес обязательны. Это параметры OPEN CHANNEL для TCP, и они обязательны в запросе, поэтому 03 самодостаточен — сопутствующий 01 не нужен. Соединение устанавливается через BIP или, если карта и терминал это поддерживают, через прямое IP-соединение (TS 102 483).04) не является триггером: он предполагает уже открытый TCP-канал и имеет смысл только как продолжение в том же сообщении, поэтому у TCP-запроса есть флажок «Также отправить пакет идентификации (04)», добавляющий его (данные необязательны; при пустом значении используется ICCID). 04 также остаётся доступным в строке PUSH цепочки RAM/GP для сценариев.0x20 в SCP80).Pastes raw APDU hex and renders a collapsible tree. It auto-detects the container: an Expanded Script (leading AA or AE80, decoded per ETSI TS 102 226 §5.2.1) or a Compact C-APDU chain (a sequence of ISO 7816 C-APDUs). Each node shows its label, hex and a short description; parent nodes expand to reveal their sub-elements. The C-APDU Parser and R-APDU parser are the two sub-pills of the Parser pill.
Groups the commands that make the card dial out. Three sub-pills switch between the forms — Trigger (Push SMS), Store (SD admin params) and Channel / link trigger — and only the selected form is shown; the two GP forms share one set of fields (the mode only changes how the payload is wrapped, and the form heading says which one). They come from different specs and are delivered differently: the administration trigger is a TLV message for the Security Domain (HTTP OTA), a §9 PUSH is a C-APDU (80 EC 01 P2) for an application that supports BIP and/or CAT_TP.
Groups the commands that make the card dial out. Three sub-pills switch between the forms — HTTP OTA Trigger (Push SMS), HTTP OTA Store (SD admin params) and Channel / link trigger — and only the selected form is shown; the two GP forms share one set of fields (the mode only changes how the payload is wrapped, and the form heading says which one). They come from different specs and are delivered differently: the administration trigger is a TLV message for the Security Domain (HTTP OTA), a §9 PUSH is a C-APDU (80 EC 01 P2) for an application that supports BIP and/or CAT_TP.
Builds the Remote Application Management over HTTP payloads defined in GlobalPlatform GPC v2.2 Amendment B v1.1 (§4.7). Two modes:
@@ -254,10 +254,11 @@The Channel / link trigger sub-pill builds the §9 requests with the same encoder as the RAM/GP chain's PUSH row, previews the C-APDU(s), and offers Pack into Secured packet (the TAR stays manual: the request is addressed to the target application, not the Security Domain) and → Expanded Script (wraps each APDU in the 22 Command TLV and appends them to the Expanded Script builder).
01) — optional OPEN CHANNEL COMPREHENSION-TLVs; the application defaults apply when empty. The application issues the proactive OPEN CHANNEL itself (§9.1.1).02) — destination port in transport level 3C with protocol type 00 (mandatory), optional buffer size 39 / identification data 36.03) — bearer 35, transport level 3C with protocol type 02 = TCP client remote, destination address 3E (21 IPv4 / 57 IPv6 / F0 FQDN), NAA/APN 47; port and address are mandatory. These are the OPEN CHANNEL TCP parameters: the application establishes the connection over BIP or, where the card and terminal support it, over a direct IP connection (TS 102 483).01) — optional OPEN CHANNEL COMPREHENSION-TLVs; the application defaults apply when empty. The application issues the proactive OPEN CHANNEL itself (§9.1.1). SIMalliance Stepping Stones R7 §18.6 recommends sending it together with the CAT_TP request in the same message (the channel parameters ride in 01, the CAT_TP port in 02), so the form has an Also request the CAT_TP link establishment (02) checkbox; the pair is one concatenated command script (concatenated SMS when it exceeds 140 octets).02) — destination port in transport level 3C with protocol type 00 (mandatory), optional buffer size 39 / identification data 36. Standalone it relies on card-provisioned channel/CAT_TP defaults, which the Stepping Stones guide advises against; prefer the pair above.03) — bearer 35, transport level 3C with protocol type 02 = TCP client remote, destination address 3E (21 IPv4 / 57 IPv6 / F0 FQDN), NAA/APN 47; port and address are mandatory. These are the OPEN CHANNEL TCP parameters and they are mandatory in the request, so 03 is self-contained — it needs no companion 01. The application establishes the connection over BIP or, where the card and terminal support it, over a direct IP connection (TS 102 483).04) is not a trigger: it presupposes an already open TCP channel and only makes sense as a follow-up in the same message, so the TCP request carries an Also send the identification packet (04) checkbox that appends it (optional data; the ICCID is used when empty). 04 also stays available in the RAM/GP chain's PUSH row for script sequences.0x20).