feat: the Data Connection Status Change event gets its parameter form (0x1D)

EVENT_FORMS[0x1D] was missing, so its Send button posted event_data: null -
the ENVELOPE carried only the event list and device identities, none of the
event's data objects.  The form now builds the TS 31.111 7.5.25.2 object set
(tags per TS 101 220 / TS 31.111 9.3): data connection status (9D), connection
type (AA), optional (E/5G)SM cause (AE), transaction identifier (1C), optional
location information (13, CR flag 0 as the spec requires for this command),
optional access technology (BF), location status (9B), optional APN (C7) and
PDP/PDN/PDU type (0B).

Adjacent spec fixes found while verifying:
- the Access Technology Change options (0x0B) did not match the pinned
  TS 102 223 V18.3.0 8.61 coding (GSM Compact / GSM w-EGPRS / UTRAN w-HSDPA
  ...); they now use the shared ACCESSTECH list, whose two labels were also
  corrected (TIA/EIA-553-A, TIA/EIA-136-270);
- _send_event_download() wrote the D6 length as a single byte - a long APN
  would overflow it; 128..255 bytes now use the BER long form (81 <len>).

Tests: the 0x1D build (defaults, full form, fallbacks), the 8.61 option list,
the long-form D6.  Help EN/RU and both AGENTS files; sw cache simple-v342.
This commit is contained in:
2026-10-01 21:35:23 +03:00
parent 0114c4748b
commit cafec549fa
7 changed files with 107 additions and 9 deletions
+7 -1
View File
@@ -4284,7 +4284,13 @@ def _send_event_download(scc, event_type, event_data=None, drain=True):
inner.extend([0x82, 0x02, 0x82, 0x81])
if event_data:
inner.extend(event_data)
d6_tlv = bytes([0xD6, len(inner)]) + bytes(inner)
if len(inner) < 0x80:
d6_tlv = bytes([0xD6, len(inner)]) + bytes(inner)
else:
# BER long form for 128..255 bytes: the length field is "1 or 2" per
# the TS 102 223 7.5.x ENVELOPE tables (a raw byte above 0x7F would be
# read as a long-form indicator)
d6_tlv = bytes([0xD6, 0x81, len(inner)]) + bytes(inner)
env_hex = '%sc20000%02x%s' % (scc.cat_cla, len(d6_tlv), d6_tlv.hex())
sys.stderr.write('ENVELOPE(Event Download): type=0x%02x data=%s\n' % (event_type, event_data.hex() if event_data else '(none)'))
data, sw = scc._tp.send_apdu(env_hex)