v3.23.1: the PLI dictionary defaults and the PLI codec tag fixes

An unconfigured PLI dictionary answered result-ok with no data object,
which confuses applications that expect data.  The dictionary now has a
base layer of sensible defaults for the qualifiers the pinned ETSI specs
define (TS 102 223 8.x, tags per TS 101 220 V18.3.0 Table 7.23):

- location as the test network 001/01 + LAC 0000 (8.19),
- the classic test IMEI 490154203237518 as F-padded BCD (8.20) and its
  IMEISV (8.74),
- language 'en' (8.45), Timing Advance (2E/AE), E-UTRAN (8.61; UTRAN +
  E-UTRAN for the multiple-technology qualifier 0E),
- automatic search mode (8.75), a full battery (8.76).

An override set through /api/pli-dict wins, and clearing a field restores
its default (the PWA's Save re-renders the effective values; the GET returns
the override or the default for the full qualifier set).  The date/time
qualifier stays empty so the host clock keeps answering it; the
3GPP/3GPP2-specific qualifiers (NMR, ESN, MEID, CSG/HNB, WLAN, slices,
CAG, ...) stay empty - the ETSI specs define no contents for them, and a
fabricated object would mislead the application more than no answer.

Verifying the values against the pinned tag table exposed pre-existing bugs
in the PWA's PLI inline codecs, fixed here:
- Timing Advance used C6 (a 3GPP2 tag) -> 2E/AE;
- IMEISV used 94 (the IMEI tag) -> 62/E2;
- Network Search Mode used AD (the Language tag) -> 65/E5, and its labels
  were swapped ('00' Manual / '01' Automatic per 8.75);
- the battery field was a percentage where 8.76 is an enum ('00' very low
  ... '04' full, 'FE'/'FF');
- encImeiPli padded the odd 15th digit with 0 instead of F (TS 124 008).

Docs: help EN/RU, api.md, the guide.  Tests: the defaults + the resolution
order (Python), the HTTP endpoint's defaults/override/clearing, the codec
tags/labels and a server-defaults drift guard (Node).  846 frontend +
829 Python; sw cache simple-v414.
This commit is contained in:
2026-10-07 09:46:39 +03:00
parent 6bea57599c
commit 9ef1a59f2c
11 changed files with 241 additions and 39 deletions
+12 -5
View File
@@ -1477,17 +1477,24 @@ Lists the PROVIDE LOCAL INFORMATION qualifier codes with their names.
### `GET /api/pli-dict`
Returns the current PLI data dictionary as a qualifier-code map.
Returns the effective PLI data dictionary as a qualifier-code map: the
operator's override, else the built-in default (the qualifiers whose objects
the pinned ETSI specs define - location as the test network 001/01, the test
IMEI/IMEISV, language, access technology, search mode, battery; v3.23.1).
The date/time qualifier stays empty - the host clock answers it while no
override is set.
```json
{"00": "0291...", "0A": "64"}
{"00": "930500F1100000", "0A": "630104", "03": ""}
```
### `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.
Returns the updated dictionary.
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
override**, so the built-in default (if any) applies again. Returns the
updated effective dictionary.
### `POST /api/scp81/bip`
+3 -2
View File
@@ -481,8 +481,9 @@ identities, **Result**, Duration, Text string, Item identifier, …):
The terminal's own command-specific objects ride with the scripted result
unless `raw` overrides them: a successful PROVIDE LOCAL INFORMATION answer
takes the TR Config **PLI dictionary** entry for its qualifier (the current
date and time for the date/time qualifier `03`), and a POLL INTERVAL answer
takes the TR Config **PLI dictionary** value for its qualifier - the entry
or its pre-settled default (v3.23.1; the current date and time for the
date/time qualifier `03`), and a POLL INTERVAL answer
echoes the current interval (TS 102 223 §6.8.4) - the same objects the
terminal's own answers carry.