﻿====================================================================================================
PHONE LOG   databases\MicrOBU V2X log - v2x_log_20261123_171249_esp32.db
  hardware esp32_c5, phone Google Pixel 9 Pro, app 0.1.0, link ble
  3255 messages over 440 s (first 17:12:50, last 17:20:09)
  by type: CAM 2186, MAPEM 351, SPATEM 718
====================================================================================================
NODE PCAP   databases\its5_20261123_170818.pcap
  3292 records, 3292 unwrapped to a CAM/DENM/MAPEM/SPATEM/VAM payload, 0 not (beacons, other BTP ports, unsigned-but-not-GN, truncated)
  by type: CAM 2077, MAPEM 392, SPATEM 794, VAM 29
  signed 38, unsigned 3254, GeoBroadcast 1186, truncated 0
====================================================================================================
CLOCK ALIGNMENT: node clock + 1795447789.240 s = phone clock; spread 15 ms over 1710 shared CAMs; first quarter 1795447789.238 s, last quarter 1795447789.242 s (drift 4 ms)
  the node heard 2773 messages inside the phone's recording window (519 outside it are ignored)
====================================================================================================
WHAT THE NODE HEARD vs WHAT THE PHONE LOGGED (one-to-one, +/-0.50 s, identical bytes)
type     bytes signed       node    phone   missed   share
CAM         43 unsigned     1070     1069        1  99.9%
CAM         26 unsigned      689      641       48  93.0%
SPATEM     888 unsigned      680      559      121  82.2%
MAPEM     1198 unsigned      334      261       73  78.1%
ALL                         2773     2530      243  91.2%
per type: CAM 1710/1759 97.2%; MAPEM 261/334 78.1%; SPATEM 559/680 82.2%
====================================================================================================
PER SENDING STATION (ItsPduHeader.stationId)
station      type        node    phone   share   first..last heard by the node
195936478    CAM         1070     1069  99.9%   +0 s .. +440 s
1095348116   CAM          689      641  93.0%   +0 s .. +440 s
1095348116   SPATEM       680      559  82.2%   +0 s .. +439 s
1095348116   MAPEM        334      261  78.1%   +1 s .. +439 s
====================================================================================================
WHEN THE MISSES HAPPEN
  miss runs in node order (all types): 239 runs, longest 2; run length 1: 235, 2: 4, 3-4: 0, 5-9: 0, 10+: 0
  CAM     49 misses in 47 runs; longest run 2; single-message misses 45 (92 % of the misses)
  MAPEM   73 misses in 55 runs; longest run 5; single-message misses 45 (62 % of the misses)
  SPATEM  121 misses in 79 runs; longest run 4; single-message misses 52 (43 % of the misses)
  minute by minute (node messages / share the phone logged):
      0 s: 196 91.8%    30 s: 180 92.2%    60 s: 198 91.9%    90 s: 188 94.7%
    120 s: 198 90.9%   150 s: 197 92.9%   180 s: 194 93.3%   210 s: 190 93.7%
    240 s: 183 94.0%   270 s: 195 92.3%   300 s: 175 90.3%   330 s: 203 91.1%
    360 s: 173 91.3%   390 s: 192 81.2%   420 s: 111 83.8%
====================================================================================================
WHERE THE MISSES ARE LOST (from the phone's once-a-second link_status rows; the board's counters as the phone read them)
  over the run (ble link): board radio_received +1895, radio_dropped (its 16-frame queue overflowed) +0,
  link CRC errors 0, malformed 0, app received 3253 link frames, board TX submitted 0 / failed 0
  link state per second: connected 421
  board restarts seen (uptime went backwards): 0
  the 243 missed messages, by what the counters did in that second:
      243  no counter moved (not heard by this board's radio, or lost on the BLE/USB hop)
  If the last row dominates, the loss is invisible to the phone-side counters: either the phone's board never heard the
  frame (different antenna than the node, a collision, the radio held out for a BLE connection event), or a V2X_RX
  notification/fragment was dropped on the way (the firmware counts that only in a LOG line the phone cannot see over BLE).
  note: 'radio_received' is not compared with the log; it counts frames the board's stack took, not every V2X_RX it forwarded.
====================================================================================================
LARGE MESSAGES (above 494 bytes: sent as link fragments since 2026-11-23) vs small MAPEM/SPATEM
  MAPEM+SPATEM > 494 B     node  1014  phone   820  80.9%
  MAPEM+SPATEM <= 494 B    node     0  phone     0  -
====================================================================================================
ONLY THE PHONE HEARD (in the log, not in the pcap within +/-0.50 s)
  CAM       476 of  2186 phone messages not in the node's capture (21.8%)
  MAPEM      90 of   351 phone messages not in the node's capture (25.6%)
  SPATEM    159 of   718 phone messages not in the node's capture (22.1%)
  (a node-side miss is a different antenna, a collision, or a node that was busy; read it against the node's own loss)
wrote obu-firmware\test\results\2026-11-23_1712_misses.csv
