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.
This commit is contained in:
2026-09-23 22:39:13 +03:00
parent 9cbf301f09
commit 052d90c03e
7 changed files with 69 additions and 28 deletions
+4 -4
View File
@@ -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.
---
+4 -4
View File
@@ -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 цепочки для сценариев.
---
+5 -4
View File
@@ -231,7 +231,7 @@
<p class="text-sm mb-3">Вставка raw APDU hex и отображение сворачиваемого дерева. Автоматически определяет контейнер: <strong>Expanded Script</strong> (начало <code class="font-mono text-sm">AA</code> или <code class="font-mono text-sm">AE80</code>, декодируется по ETSI TS 102 226 &sect;5.2.1) или <strong>Compact C-APDU chain</strong> (последовательность C-APDU ISO 7816). Каждый узел показывает метку, hex и краткое описание; родительские узлы раскрываются в подэлементы.</p>
<h3 id="push-commands" class="text-lg font-medium mb-2">2.7 Пуш/триггер</h3>
<p class="text-sm mb-3">Объединяет команды, заставляющие карту выйти в сеть. Три подвкладки переключают формы &mdash; <strong>Trigger (Push SMS)</strong>, <strong>Store (SD admin params)</strong> и <strong>&laquo;Триггер канала/линка&raquo;</strong> &mdash; показывается только выбранная форма; обе формы GP используют один набор полей (режим меняет только обёртку payload&rsquo;а, а заголовок формы указывает режим). Они из разных спецификаций и доставляются по-разному: триггер администрирования это TLV-сообщение для Security Domain (HTTP OTA), а PUSH &sect;9 это C-APDU (<code class="font-mono text-sm">80 EC 01 P2</code>) для приложения с поддержкой BIP и/или CAT_TP.</p>
<p class="text-sm mb-3">Объединяет команды, заставляющие карту выйти в сеть. Три подвкладки переключают формы &mdash; <strong>HTTP OTA Trigger (Push SMS)</strong>, <strong>HTTP OTA Store (SD admin params)</strong> и <strong>&laquo;Триггер канала/линка&raquo;</strong> &mdash; показывается только выбранная форма; обе формы GP используют один набор полей (режим меняет только обёртку payload&rsquo;а, а заголовок формы указывает режим). Они из разных спецификаций и доставляются по-разному: триггер администрирования это TLV-сообщение для Security Domain (HTTP OTA), а PUSH &sect;9 это C-APDU (<code class="font-mono text-sm">80 EC 01 P2</code>) для приложения с поддержкой BIP и/или CAT_TP.</p>
<h4 id="http-ota" class="font-medium mb-1">Сессия администрирования (HTTP OTA)</h4>
<p class="text-sm mb-3">Сборка payload&rsquo;ов Remote Application Management over HTTP по GlobalPlatform <strong>GPC v2.2 Amendment B v1.1</strong> (&sect;4.7). Два режима:</p>
@@ -255,10 +255,11 @@
<h4 id="push-ts102226" class="font-medium mb-1 mt-3">PUSH по TS 102 226 §9</h4>
<p class="text-sm mb-2">Подвкладка <strong>&laquo;Триггер канала/линка&raquo;</strong> собирает запросы &sect;9 тем же кодировщиком, что и строка <strong>PUSH</strong> в цепочке RAM/GP, показывает предпросмотр C-APDU, и предлагает <strong>&laquo;Упаковать в Secured packet&raquo;</strong> (TAR остаётся ручным: запрос адресован целевому приложению, а не Security Domain) и <strong>&rarr; Расширенный скрипт</strong> (оборачивает каждый APDU в Command TLV <code class="font-mono text-sm">22</code> и добавляет их в конструктор Expanded Script).</p>
<ul class="list-disc list-inside text-sm space-y-1 mb-3">
<li><strong>Открытие BIP-канала</strong> (<code class="font-mono text-sm">01</code>) &mdash; необязательные COMPREHENSION-TLV OPEN CHANNEL; при пустом значении действуют умолчания приложения. Проактивную команду OPEN CHANNEL выдаёт само приложение (&sect;9.1.1).</li>
<li><strong>Установление соединения CAT_TP</strong> (<code class="font-mono text-sm">02</code>) &mdash; порт назначения в transport level <code class="font-mono text-sm">3C</code> с типом протокола 00 (обязателен), необязательные buffer size <code class="font-mono text-sm">39</code> / данные идентификации <code class="font-mono text-sm">36</code>.</li>
<li><strong>TCP-соединение</strong> (<code class="font-mono text-sm">03</code>) &mdash; bearer <code class="font-mono text-sm">35</code>, transport level <code class="font-mono text-sm">3C</code> с типом протокола 02 = TCP-клиент, удалённое соединение, адрес назначения <code class="font-mono text-sm">3E</code> (<code class="font-mono text-sm">21</code> IPv4 / <code class="font-mono text-sm">57</code> IPv6 / <code class="font-mono text-sm">F0</code> FQDN), NAA/APN <code class="font-mono text-sm">47</code>; порт и адрес обязательны. Это параметры OPEN CHANNEL для TCP: соединение устанавливается через BIP или, если карта и терминал это поддерживают, через прямое IP-соединение (TS 102 483).</li>
<li><strong>Открытие BIP-канала</strong> (<code class="font-mono text-sm">01</code>) &mdash; необязательные COMPREHENSION-TLV OPEN CHANNEL; при пустом значении действуют умолчания приложения. Проактивную команду OPEN CHANNEL выдаёт само приложение (&sect;9.1.1). SIMalliance Stepping Stones R7 &sect;18.6 рекомендует отправлять его <strong>вместе с CAT_TP-запросом в одном сообщении</strong> (параметры канала — в <code class="font-mono text-sm">01</code>, порт CAT_TP — в <code class="font-mono text-sm">02</code>), поэтому в форме есть флажок <em>&laquo;Также запросить установление соединения CAT_TP (02)&raquo;</em>; пара передаётся одним скриптом команд (конкатенированные SMS, если больше 140 октетов).</li>
<li><strong>Установление соединения CAT_TP</strong> (<code class="font-mono text-sm">02</code>) &mdash; порт назначения в transport level <code class="font-mono text-sm">3C</code> с типом протокола 00 (обязателен), необязательные buffer size <code class="font-mono text-sm">39</code> / данные идентификации <code class="font-mono text-sm">36</code>. Отдельно он полагается на предустановленные на карте умолчания канала/CAT_TP, против чего предостерегает руководство Stepping Stones; предпочтительна пара выше.</li>
<li><strong>TCP-соединение</strong> (<code class="font-mono text-sm">03</code>) &mdash; bearer <code class="font-mono text-sm">35</code>, transport level <code class="font-mono text-sm">3C</code> с типом протокола 02 = TCP-клиент, удалённое соединение, адрес назначения <code class="font-mono text-sm">3E</code> (<code class="font-mono text-sm">21</code> IPv4 / <code class="font-mono text-sm">57</code> IPv6 / <code class="font-mono text-sm">F0</code> FQDN), NAA/APN <code class="font-mono text-sm">47</code>; порт и адрес обязательны. Это параметры OPEN CHANNEL для TCP, и они обязательны в запросе, поэтому <code class="font-mono text-sm">03</code> <strong>самодостаточен</strong> &mdash; сопутствующий <code class="font-mono text-sm">01</code> не нужен. Соединение устанавливается через BIP или, если карта и терминал это поддерживают, через прямое IP-соединение (TS 102 483).</li>
<li><strong>Пакет идентификации</strong> (<code class="font-mono text-sm">04</code>) не является триггером: он предполагает уже открытый TCP-канал и имеет смысл только как продолжение в том же сообщении, поэтому у TCP-запроса есть флажок <em>&laquo;Также отправить пакет идентификации (04)&raquo;</em>, добавляющий его (данные необязательны; при пустом значении используется ICCID). <code class="font-mono text-sm">04</code> также остаётся доступным в строке PUSH цепочки RAM/GP для сценариев.</li>
<li><strong>PoR</strong> &mdash; Stepping Stones R7 &sect;18.6.3 рекомендует <em>не</em> запрашивать PoR при успешной отправке (это может помешать обмену ME&ndash;карта); запрашивайте его только для разбора сбоя, в режиме SMS-SUBMIT (бит SPI2 <code class="font-mono text-sm">0x20</code> в SCP80).</li>
</ul>
+5 -4
View File
@@ -230,7 +230,7 @@
<p class="text-sm mb-3">Pastes raw APDU hex and renders a collapsible tree. It auto-detects the container: an <strong>Expanded Script</strong> (leading <code class="font-mono text-sm">AA</code> or <code class="font-mono text-sm">AE80</code>, decoded per ETSI TS 102 226 &sect;5.2.1) or a <strong>Compact C-APDU chain</strong> (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 <strong>C-APDU Parser</strong> and <strong>R-APDU parser</strong> are the two sub-pills of the <strong>Parser</strong> pill.</p>
<h3 id="push-commands" class="text-lg font-medium mb-2">2.7 Push commands</h3>
<p class="text-sm mb-3">Groups the commands that make the card dial out. Three sub-pills switch between the forms &mdash; <strong>Trigger (Push SMS)</strong>, <strong>Store (SD admin params)</strong> and <strong>Channel / link trigger</strong> &mdash; 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 &sect;9 PUSH is a C-APDU (<code class="font-mono text-sm">80 EC 01 P2</code>) for an application that supports BIP and/or CAT_TP.</p>
<p class="text-sm mb-3">Groups the commands that make the card dial out. Three sub-pills switch between the forms &mdash; <strong>HTTP OTA Trigger (Push SMS)</strong>, <strong>HTTP OTA Store (SD admin params)</strong> and <strong>Channel / link trigger</strong> &mdash; 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 &sect;9 PUSH is a C-APDU (<code class="font-mono text-sm">80 EC 01 P2</code>) for an application that supports BIP and/or CAT_TP.</p>
<h4 id="http-ota" class="font-medium mb-1">Administration session (HTTP OTA)</h4>
<p class="text-sm mb-3">Builds the Remote Application Management over HTTP payloads defined in GlobalPlatform <strong>GPC v2.2 Amendment B v1.1</strong> (&sect;4.7). Two modes:</p>
@@ -254,10 +254,11 @@
<h4 id="push-ts102226" class="font-medium mb-1 mt-3">TS 102 226 §9 PUSH</h4>
<p class="text-sm mb-2">The <strong>Channel / link trigger</strong> sub-pill builds the &sect;9 requests with the same encoder as the RAM/GP chain's <strong>PUSH</strong> row, previews the C-APDU(s), and offers <strong>Pack into Secured packet</strong> (the TAR stays manual: the request is addressed to the target application, not the Security Domain) and <strong>&rarr; Expanded Script</strong> (wraps each APDU in the <code class="font-mono text-sm">22</code> Command TLV and appends them to the Expanded Script builder).</p>
<ul class="list-disc list-inside text-sm space-y-1 mb-3">
<li><strong>BIP channel opening</strong> (<code class="font-mono text-sm">01</code>) &mdash; optional OPEN CHANNEL COMPREHENSION-TLVs; the application defaults apply when empty. The application issues the proactive OPEN CHANNEL itself (&sect;9.1.1).</li>
<li><strong>CAT_TP link establishment</strong> (<code class="font-mono text-sm">02</code>) &mdash; destination port in transport level <code class="font-mono text-sm">3C</code> with protocol type 00 (mandatory), optional buffer size <code class="font-mono text-sm">39</code> / identification data <code class="font-mono text-sm">36</code>.</li>
<li><strong>TCP connection</strong> (<code class="font-mono text-sm">03</code>) &mdash; bearer <code class="font-mono text-sm">35</code>, transport level <code class="font-mono text-sm">3C</code> with protocol type 02 = TCP client remote, destination address <code class="font-mono text-sm">3E</code> (<code class="font-mono text-sm">21</code> IPv4 / <code class="font-mono text-sm">57</code> IPv6 / <code class="font-mono text-sm">F0</code> FQDN), NAA/APN <code class="font-mono text-sm">47</code>; 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).</li>
<li><strong>BIP channel opening</strong> (<code class="font-mono text-sm">01</code>) &mdash; optional OPEN CHANNEL COMPREHENSION-TLVs; the application defaults apply when empty. The application issues the proactive OPEN CHANNEL itself (&sect;9.1.1). SIMalliance Stepping Stones R7 &sect;18.6 recommends sending it <strong>together with the CAT_TP request in the same message</strong> (the channel parameters ride in <code class="font-mono text-sm">01</code>, the CAT_TP port in <code class="font-mono text-sm">02</code>), so the form has an <em>Also request the CAT_TP link establishment (02)</em> checkbox; the pair is one concatenated command script (concatenated SMS when it exceeds 140 octets).</li>
<li><strong>CAT_TP link establishment</strong> (<code class="font-mono text-sm">02</code>) &mdash; destination port in transport level <code class="font-mono text-sm">3C</code> with protocol type 00 (mandatory), optional buffer size <code class="font-mono text-sm">39</code> / identification data <code class="font-mono text-sm">36</code>. Standalone it relies on card-provisioned channel/CAT_TP defaults, which the Stepping Stones guide advises against; prefer the pair above.</li>
<li><strong>TCP connection</strong> (<code class="font-mono text-sm">03</code>) &mdash; bearer <code class="font-mono text-sm">35</code>, transport level <code class="font-mono text-sm">3C</code> with protocol type 02 = TCP client remote, destination address <code class="font-mono text-sm">3E</code> (<code class="font-mono text-sm">21</code> IPv4 / <code class="font-mono text-sm">57</code> IPv6 / <code class="font-mono text-sm">F0</code> FQDN), NAA/APN <code class="font-mono text-sm">47</code>; port and address are mandatory. These are the OPEN CHANNEL TCP parameters and they are mandatory in the request, so <code class="font-mono text-sm">03</code> is <strong>self-contained</strong> &mdash; it needs no companion <code class="font-mono text-sm">01</code>. The application establishes the connection over BIP or, where the card and terminal support it, over a direct IP connection (TS 102 483).</li>
<li><strong>Identification packet</strong> (<code class="font-mono text-sm">04</code>) 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 <em>Also send the identification packet (04)</em> checkbox that appends it (optional data; the ICCID is used when empty). <code class="font-mono text-sm">04</code> also stays available in the RAM/GP chain's PUSH row for script sequences.</li>
<li><strong>PoR</strong> &mdash; Stepping Stones R7 &sect;18.6.3 recommends <em>not</em> requesting a PoR for a successful push (it may disturb the ME&ndash;card communication); request one only to investigate a failure, in SMS-SUBMIT mode (SCP80 SPI2 bit <code class="font-mono text-sm">0x20</code>).</li>
</ul>
+38 -11
View File
@@ -173,14 +173,14 @@
</div>
<div id="c-apdu-sub-httpota" class="hidden">
<div class="flex flex-wrap gap-2 mb-3">
<button id="hota-form-btn-trigger" onclick="hotaSetForm('trigger')" class="px-4 py-1.5 text-sm rounded-full bg-blue-600 text-white" data-l10n="Trigger (Push SMS)">Trigger (Push SMS)</button>
<button id="hota-form-btn-store" onclick="hotaSetForm('store')" class="px-4 py-1.5 text-sm rounded-full bg-gray-200 dark:bg-slate-700 text-gray-700 dark:text-slate-300 hover:bg-gray-300 dark:hover:bg-slate-600" data-l10n="Store (SD admin params)">Store (SD admin params)</button>
<button id="hota-form-btn-trigger" onclick="hotaSetForm('trigger')" class="px-4 py-1.5 text-sm rounded-full bg-blue-600 text-white" data-l10n="HTTP OTA Trigger (Push SMS)">HTTP OTA Trigger (Push SMS)</button>
<button id="hota-form-btn-store" onclick="hotaSetForm('store')" class="px-4 py-1.5 text-sm rounded-full bg-gray-200 dark:bg-slate-700 text-gray-700 dark:text-slate-300 hover:bg-gray-300 dark:hover:bg-slate-600" data-l10n="HTTP OTA Store (SD admin params)">HTTP OTA Store (SD admin params)</button>
<button id="hota-form-btn-link" onclick="hotaSetForm('link')" class="px-4 py-1.5 text-sm rounded-full bg-gray-200 dark:bg-slate-700 text-gray-700 dark:text-slate-300 hover:bg-gray-300 dark:hover:bg-slate-600" data-l10n="Channel / link trigger">Channel / link trigger</button>
</div>
<div id="hota-form-gp">
<h3 id="hota-heading-trigger" class="text-base font-medium mb-3" data-l10n="HTTP OTA Administrative session trigger (Push SMS)">HTTP OTA Administrative session trigger (Push SMS)</h3>
<h3 id="hota-heading-store" class="text-base font-medium mb-3 hidden" data-l10n="HTTP OTA Administrative session store data (SD admin params)">HTTP OTA Administrative session store data (SD admin params)</h3>
<h3 id="hota-heading-trigger" class="text-base font-medium mb-3" data-l10n="Administrative session trigger (Push SMS)">Administrative session trigger (Push SMS)</h3>
<h3 id="hota-heading-store" class="text-base font-medium mb-3 hidden" data-l10n="Administrative session store data (SD admin params)">Administrative session store data (SD admin params)</h3>
<div id="hota-store-tag-row" class="mb-3 hidden">
<label class="block mb-1 text-sm font-medium text-gray-700 dark:text-slate-300" data-l10n="SD params tag">SD params tag</label>
@@ -305,14 +305,18 @@
<div data-push-link="01">
<label class="block mb-1 text-xs font-medium text-gray-500 dark:text-slate-400" data-l10n="OPEN CHANNEL COMPREHENSION-TLVs (hex, optional)">OPEN CHANNEL COMPREHENSION-TLVs (hex, optional)</label>
<textarea id="push-link-data" rows="2" oninput="pushUpdate('link')" class="w-full font-mono border border-gray-300 dark:border-slate-600 text-sm rounded px-2 py-1.5 dark:bg-slate-800 mb-2" placeholder="82102081..."></textarea>
<label class="flex items-center gap-2 text-sm font-medium text-gray-700 dark:text-slate-300 mb-2">
<input type="checkbox" id="push-link-cat" onchange="pushUpdate('link')" class="rounded">
<span data-l10n="Also request the CAT_TP link establishment (02) in the same message">Also request the CAT_TP link establishment (02) in the same message</span>
</label>
</div>
<div data-push-link="02" class="grid grid-cols-2 gap-2 mb-2">
<div data-push-link="02" id="push-link-cat-fields-1" class="grid grid-cols-2 gap-2 mb-2">
<div><label class="block mb-1 text-xs font-medium text-gray-500 dark:text-slate-400" data-l10n="Max SDU (hex, optional)">Max SDU (hex, optional)</label>
<input id="push-link-sdu" oninput="pushUpdate('link')" maxlength="4" class="w-full font-mono border border-gray-300 dark:border-slate-600 text-sm rounded px-2 py-1.5 dark:bg-slate-800"></div>
<div><label class="block mb-1 text-xs font-medium text-gray-500 dark:text-slate-400" data-l10n="Identification data (hex, optional)">Identification data (hex, optional)</label>
<input id="push-link-ident" oninput="pushUpdate('link')" class="w-full font-mono border border-gray-300 dark:border-slate-600 text-sm rounded px-2 py-1.5 dark:bg-slate-800"></div>
</div>
<div data-push-link="02,03" class="grid grid-cols-2 gap-2 mb-2">
<div data-push-link="02,03" id="push-link-cat-fields-2" class="grid grid-cols-2 gap-2 mb-2">
<div><label class="block mb-1 text-xs font-medium text-gray-500 dark:text-slate-400" data-l10n="Destination port (hex)">Destination port (hex)</label>
<input id="push-link-port" oninput="pushUpdate('link')" maxlength="4" class="w-full font-mono border border-gray-300 dark:border-slate-600 text-sm rounded px-2 py-1.5 dark:bg-slate-800" placeholder="1F90"></div>
<div data-push-link="03"><label class="block mb-1 text-xs font-medium text-gray-500 dark:text-slate-400" data-l10n="Bearer description (hex, empty = 350103)">Bearer description (hex, empty = 350103)</label>
@@ -322,7 +326,7 @@
<div data-push-link="03"><label class="block mb-1 text-xs font-medium text-gray-500 dark:text-slate-400" data-l10n="NAA / APN (text)">NAA / APN (text)</label>
<input id="push-link-apn" oninput="pushUpdate('link')" class="w-full font-mono border border-gray-300 dark:border-slate-600 text-sm rounded px-2 py-1.5 dark:bg-slate-800" placeholder="internet"></div>
</div>
<div data-push-link="02,03" class="mb-2">
<div data-push-link="02,03" id="push-link-cat-fields-3" class="mb-2">
<label class="block mb-1 text-xs font-medium text-gray-500 dark:text-slate-400" data-l10n="Extra TLVs (hex, optional)">Extra TLVs (hex, optional)</label>
<input id="push-link-extra" oninput="pushUpdate('link')" class="w-full font-mono border border-gray-300 dark:border-slate-600 text-sm rounded px-2 py-1.5 dark:bg-slate-800">
</div>
@@ -2164,9 +2168,11 @@ const _pushApdus = {};
function pushReadFields(section) {
const v = id => { const el = document.getElementById(id); return el ? el.value : ''; };
const idp = document.getElementById('push-' + section + '-idp');
const cat = document.getElementById('push-' + section + '-cat');
return {
request: v('push-' + section + '-request') || '01',
withIdp: !!(idp && idp.checked),
withCat: !!(cat && cat.checked),
pushData: v('push-' + section + '-data'),
pushPort: v('push-' + section + '-port'),
pushSdu: v('push-' + section + '-sdu'),
@@ -2204,6 +2210,17 @@ function pushSectionApdus(section, f) {
? buildApdu(0x80, 0xEC, 0x01, 0x04, idp.length / 2, idp)
: buildApdu(0x80, 0xEC, 0x01, 0x04, null, null));
}
// SIMalliance Stepping Stones R7 18.6 recommends sending the BIP channel
// opening together with the CAT_TP link request in the same message: the
// channel parameters ride in 01, the CAT_TP port in 02.
if (request === '01' && f.withCat) {
if (hx(f.pushPort).length !== 4) return []; // CAT_TP port is mandatory (9.2.2)
const cat = chainPushData({ pushType: '02', pushPort: f.pushPort,
pushSdu: f.pushSdu, pushIdent: f.pushIdent, pushExtra: f.pushExtra });
apdus.push(cat
? buildApdu(0x80, 0xEC, 0x01, 0x02, cat.length / 2, cat)
: buildApdu(0x80, 0xEC, 0x01, 0x02, null, null));
}
return apdus;
}
@@ -2229,6 +2246,15 @@ function pushUpdate(section) {
});
const idpBlock = document.getElementById('push-' + section + '-idp-block');
if (idpBlock) idpBlock.classList.toggle('hidden', !(f.request === '03' && f.withIdp));
// On request 01 the shared CAT_TP field blocks (port, max SDU, identification
// data, extra TLVs) follow the "also request the CAT_TP link" checkbox; for
// the other requests their own data-push rules already showed/hid them.
if (f.request === '01') {
['-cat-fields-1', '-cat-fields-2', '-cat-fields-3'].forEach(suffix => {
const el = document.getElementById('push-' + section + suffix);
if (el) el.classList.toggle('hidden', !f.withCat);
});
}
}
// Import the §9 C-APDU(s) into the Expanded Script builder as 22 command TLVs
@@ -14949,14 +14975,15 @@ const LANG_RU = {
'expected': 'ожидалось',
'actual': 'фактически',
'HTTP OTA': 'HTTP OTA',
'Trigger (Push SMS)': 'Триггер (Push SMS)',
'HTTP OTA Trigger (Push SMS)': 'HTTP OTA Триггер (Push SMS)',
'Push commands': 'Пуш/триггер',
'HTTP OTA Administrative session trigger (Push SMS)': 'HTTP OTA — триггер административной сессии (Push SMS)',
'HTTP OTA Administrative session store data (SD admin params)': 'HTTP OTA — запись данных административной сессии (параметры SD)',
'Administrative session trigger (Push SMS)': 'Триггер административной сессии (Push SMS)',
'Administrative session store data (SD admin params)': 'Запись данных административной сессии (параметры SD)',
'Not the administration session — a C-APDU for an app that supports BIP/CAT_TP': 'C-APDU для приложения с поддержкой BIP/CAT_TP (не admin session!)',
'Request': 'Запрос',
'BIP channel opening (OPEN CHANNEL)': 'Открытие BIP-канала (OPEN CHANNEL)',
'Channel / link trigger': 'Триггер канала/линка',
'Also request the CAT_TP link establishment (02) in the same message': 'Также запросить установление соединения CAT_TP (02) в том же сообщении',
'Channel / link establishment (TS 102 226 §9)': 'Установление канала/линка (TS 102 226 §9)',
'Also send the identification packet (04) in the same message': 'Также отправить пакет идентификации (04) в том же сообщении',
'The identification packet follows the TCP request in the same message (ICCID when empty).': 'Пакет идентификации отправляется следом за TCP-запросом в том же сообщении (при пустом значении — ICCID).',
@@ -14972,7 +14999,7 @@ const LANG_RU = {
'Destination address value (hex: 21 IPv4 / 57 IPv6 / F0 FQDN)': 'Значение адреса назначения (hex: 21 IPv4 / 57 IPv6 / F0 FQDN)',
'NAA / APN (text)': 'NAA / APN (текст)',
'C-APDU (TS 102 226 §9)': 'C-APDU (TS 102 226 §9)',
'Store (SD admin params)': 'Store (параметры SD)',
'HTTP OTA Store (SD admin params)': 'HTTP OTA Store (параметры SD)',
'SD params tag': 'Tag параметров SD',
"Connection parameters ('84')": "Параметры соединения ('84')",
'+ TLV': '+ TLV',
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE = 'simple-v249';
const CACHE = 'simple-v250';
const URLS = [
'index.html',
'help.html',
+12
View File
@@ -251,6 +251,18 @@ test('pushSectionApdus builds the guided §9 channel/link requests', () => {
[tcp, '80EC01040436020102']);
// The follow-up only applies to the TCP request.
assert.deepStrictEqual(pushSectionApdus('link', { request: '01', pushData: '', withIdp: true }), ['80EC0101']);
// Stepping Stones R7 18.6: the BIP channel opening and the CAT_TP link
// request go in the same message; 01 carries the channel parameters, 02 the
// CAT_TP port (mandatory) plus optional max SDU / identification data.
assert.deepStrictEqual(
pushSectionApdus('link', { request: '01', pushData: '', withCat: true, pushPort: '1F90' }),
['80EC0101', '80EC0102053C03001F90']);
assert.deepStrictEqual(
pushSectionApdus('link', { request: '01', pushData: '', withCat: true, pushPort: '1F90', pushSdu: '0200', pushIdent: 'ABCD' }),
['80EC0101', '80EC01020D3C03001F90390202003602ABCD']);
// The CAT_TP port is mandatory for the pair, and the option only applies to 01.
assert.deepStrictEqual(pushSectionApdus('link', { request: '01', pushData: '', withCat: true, pushPort: '' }), []);
assert.deepStrictEqual(pushSectionApdus('link', { request: '01', pushData: '', withCat: false, pushPort: '1F90' }), ['80EC0101']);
});
test('chainApduList drops GET RESPONSE and splits multi-APDU rows', () => {