ManTag x36 · V1.0 — browser build

Supported family: Uniden x36 (UBCD3600XLT / BCD436HP)

Architecture:
- Browser UI: index.html
- USB/Web Serial: scanner data and x36 GSI parsing
- LINE IN: audio recording
- Local bridge on 127.0.0.1:8765: local WAV storage/playback and retention
- Dropbox sync worker: ManTag_SYNC.ps1
- No scanner LAN audio and no Waterfall

Start:
1. Extract the complete ZIP to a local folder.
2. Run START.bat.
3. In the browser press CONNECT USB and select the scanner COM port.
4. For recording press CONNECT LINE IN and select/allow the PC audio input.

Trial: up to 20 committed LOG calls per scanner ESN.
License product: X36, scanner-bound.

x36 browser fix 2026-09-05:
- Scanner SN cache is now product-specific for x36 and no longer shared with ManTag 200/SDS200.
- x36 SN parser accepts SN / ESN / Serial Number forms and normalizes separators.
- LIVE Favourite/System/Department/Channel vs frequency/status information restored to 50:50.

FIX2
- SN/ESN flow restored exactly from supplied ManTag_x36_V1_0.
- LIVE hierarchy/details split fixed to 50:50.
- No experimental SN commands; browser architecture otherwise unchanged.

FIX3
- IMPORTANT: x36 browser storage is now fully isolated from ManTag 200/SDS200.
- x36 ESN cache: mantag_x36_scanner_esn_v1
- x36 ESN check timestamp: mantag_x36_scanner_esn_checked_at_v1
- x36 trial counters use their own prefix.
- x36 license key storage is separate: mantag_x36_license_v1
- Existing SDS200 browser ESN/license cannot be reused by x36.
- Physical x36 ESN read flow remains the proven original x36 implementation.
- LIVE UI remains 50:50; parser and other application functions unchanged.

FIX4
- x36 ESN activation bug fixed:
  a successful physical ESN read from the CURRENT USB connection is reused by ACTIVATE.
  ACTIVATE no longer immediately re-enters the scanner menu and fails after the ESN was already read.
  Cached ESN alone is not treated as a physical verification; in that case activation still forces a physical read.
- x36 LIVE UI fixed at source/cascade level:
  Favourite/System/Department/Channel = 50%
  Frequency/Mode/SIG/DMR details = 50%
- Removed the phantom second liveGrid column left over from the Waterfall layout.
- No parser changes. No LAN/Waterfall restored.

FIX5
- Rechecked against the originally supplied working x36 build.
- The original x36 Settings > See Scanner Information > Firmware Version ESN sequence/parser is retained.
- Browser adaptation: every CONNECT USB now forces one physical x36 ESN read.
- Cached ESN can no longer substitute for the physical read of the current USB session.
- ACTIVATE does NOT enter the scanner menu a second time; it uses only the ESN physically verified during the current connection.
- Disconnect invalidates that physical verification.
- UI from FIX4 is unchanged (approved 50:50 layout).
- No parser/UI/audio/logging changes.

FIX8
- Final x36 SN parser correction based on real UBCD3600XLT RAW response.
- Scanner returns SN as: <PlainText Text="SN37602078000583" />
- Previous parser incorrectly required "SN:" with a colon, therefore returned no ESN.
- Parser now accepts both "SN37602078000583" and "SN:37602078000583".
- Diagnostic UI removed.
- USB transport remains unchanged from stable FIX5.
- Approved 50:50 UI unchanged.

FIX8 SHOW S/N
- Added customer-facing SHOW S/N button to the license window.
- SHOW S/N reads/uses the corrected x36 scanner S/N flow and displays the number for registration.
- When browser permissions allow, the displayed S/N is also copied to clipboard.
- No RAW diagnostic output.
- Activation, USB transport, parser, approved 50:50 LIVE UI and all other functions unchanged.

FIX9
- Fixed final x36 scanner verification typo.
- forceScannerVerification() incorrectly used /^\\d{12,18}$/ which matches a literal backslash+d.
- Corrected to /^\d{12,18}$/ so the physically read numeric x36 S/N is accepted.
- This explains why S/N was visible at top of LICENSE window but SHOW S/N and ACTIVATE rejected it.
- No USB, parser, UI, logging, audio or license-format changes.

FIX10
- Fixed DMR LINE IN recording lifecycle.
- CALL_END/CALL_START recorder operations are now serialized.
- Prevents browser MediaRecorder stop/start overlap during rapid conventional ANALOG/DMR classification changes.
- DMR parser and LOG logic unchanged.
- UI, USB, S/N, licensing and approved 50:50 layout unchanged.

FIX11
- LIVE online detail layout changed to match SDS200:
  Row 1: TYPE / FREQ / MODE
  Row 2: SIG / RSSI
  Row 3: CTCSS / DCS
  Row 4: CC / SLOT / TGID / UID
- Values, IDs and live data bindings unchanged.
- Approved 50:50 LIVE split unchanged.
- Recording FIX10, USB, S/N and licensing unchanged.

FIX12
- Restored RECORD LED behavior for x36 LINE IN.
- SDS200 lights RECORD from LAN bridge status; x36 has no LAN audio, so the LED previously had no controller.
- RECORD_STARTED -> green LED ON.
- RECORD_READY / RECORD_ERROR / RECORD_DISCARDED -> LED OFF.
- Recording pipeline, DMR FIX10, USB, S/N, licensing, 50:50 UI and FIX11 online layout unchanged.

FIX13
- Normal x36 USB CONNECT now respects the existing Scanner S/N cache.
- Changed CONNECT from forced physical readEsn(true) to cached readEsn(false).
- Existing RECHECK_MS remains 30 days.
- ACTIVATE physical scanner verification remains unchanged.
- SHOW S/N behavior, licensing, USB, recording FIX10, RECORD LED FIX12, UI and logging unchanged.

FIX14
- Corrected FIX13 license verification regression.
- Normal USB CONNECT still uses the existing 30-day cached Scanner S/N.
- ACTIVATE and SHOW S/N now physically read/verify Scanner S/N when the current connection has only a cached S/N.
- If the scanner was already physically verified in the current connection, no duplicate physical read is performed.
- License format, USB transport, recording, DMR, RECORD LED, UI and logging unchanged.

MAN TAG 125 V1 DIAGNOSTIC
- Standalone 125 branch based on x36 FIX14 browser/LINE IN infrastructure.
- DMR-specific mode files removed completely:
  mode-dmr-1f.js
  mode-trunk-scan.js
- DMR LIVE fields removed: CC / SLOT / TGID / UID.
- DMR LOG table columns removed from the UI.
- x36 mode parsers are NOT executed in this diagnostic build.
- x36 license/SN scripts are NOT executed in this diagnostic build, so MSI/MNU scanner-menu traffic cannot interfere.
- USB transport changed to clean UBC125XLT diagnostic mode:
  115200 baud, 8N1, no flow control.
  No GSI polling.
  Automatic MDL + VER after connect.
  Complete passive RAW RX/TX capture.
- Diagnostic controls: MDL, VER, CIN and custom command.
- LINE IN / recorder / Dropbox/core files remain available for the later production 125 build.
- This diagnostic build is for discovering the exact 125 SCAN/SEARCH protocol before implementing the production parser.

CLEANUP
- Removed all legacy x36 mode parser files from the diagnostic package.
- Removed hidden DMR/trunk HTML remnants and DMR-only CSS.
- Logger/recorder scripts are intentionally not executed until the real 125 CALL parser exists.
- Their core files remain in the package only as later production building blocks.

DIAGNOSTIC FIX2
- Fixed misleading USB indicator.
- UBC125XLT does not continuously stream data like x36 GSI polling.
- Previous diagnostic turned the USB LED off after 1.8 s without RX traffic,
  which looked like a disconnect although the Web Serial port remained open.
- USB LED now represents actual connection state: ON after CONNECT, OFF only after DISCONNECT/error.
- Serial protocol and commands unchanged.

DIAGNOSTIC FIX3
- Added live RUN-mode diagnostic polling using STS / GLG / PWR.
- STS = LCD/status mirror.
- GLG = current frequency, modulation, CTCSS/DCS code, channel name, squelch state.
- PWR = relative RSSI and current frequency.
- Poll cycle runs every 500 ms with 90 ms spacing between commands to keep traffic conservative during protocol discovery.
- No PRG mode is used; scanner continues normal SCAN/SEARCH operation.

PARSER TEST1
- Added real UBC125XLT SCAN / CLOSE CALL parser based on captured RAW.
- GLG open/scanning flags:
  active call = 1,0
  scanning/idle = 0,1
- SCAN call fields: frequency, mode, channel name, channel number.
- CLOSE CALL detected from STS text: CC Found! / Close Call.
- SIG read from STS.
- PWR/RSSI is used only when PWR frequency matches active GLG frequency,
  avoiding mismatched values while the scanner is moving during SCAN.
- CALL_START / CALL_UPDATE / CALL_END now feed existing LOG and LINE IN recorder.
- CTCSS/DCS mapping intentionally not enabled until a real non-zero tone code is captured.

PARSER TEST2
- CTCSS/DCS decoding enabled from the official BC125AT/UBC125XLT code table.
- Real capture verified: GLG tone code 66 = CTCSS 71.9 Hz.
- Full CTCSS codes 64-113 and DCS codes 128-231 are mapped.
- A detected tone is preserved for the rest of the call even if GLG later returns code 0.
- CLEAR LOG repaired with ManTag dialog plus native confirm fallback.
- 125 logger cleaned further: DMR/TRUNK types and CC/SLOT/TGID/UID fields removed from active LOG logic.

PARSER TEST3
- ONLINE redesigned for ManTag 125.
- Removed x36 hierarchy from the active 125 view: Favourite List / System / Department.
- New compact fields: BANK, CHANNEL, FREQUENCY, MODE, SIGNAL, RSSI, CTCSS, DCS.
- BANK is parsed directly from STS (BANK1...BANK10). Close Call shows BANK = CC.
- SIGNAL is displayed as S0-S5 from the scanner's STS signal value.
- Frequency conversion fixed: UBC125XLT 01261000 now displays 126.1000 MHz (not 12.6100 MHz).
- Existing SCAN/CC logging, recording and CTCSS/DCS parsing from TEST2 retained.

PARSER TEST4
- CLEAR LOG repaired independently of the custom ManTag dialog.
- CLEAR LOG now uses a direct native browser confirmation.
- Button is force-enabled and pointer events are explicitly active.
- Added ManTagLogStore.clear() API and a final page-load fallback binding.
- Clearing removes displayed/stored LOG rows and playback state, but does not reset the trial counter.
- All TEST3 ONLINE/frequency/signal/CTCSS changes retained unchanged.

PARSER TEST5
- Fixed regression from TEST3/TEST4: the new 125 renderer now updates the ORIGINAL visible top LIVE card.
- Removed SYSTEM and DEPARTMENT from the visible LIVE card.
- Visible hierarchy is now BANK + CHANNEL only.
- Removed SYSTEM column from the 125 LOG table.
- Live polling now starts automatically 250 ms after USB CONNECT.
  Manual START LIVE POLL is no longer required for normal LIVE/LOG/RECORD operation.
- Existing diagnostic poll button remains available and toggles the same poller.
- Shell/startup display text changed from ManTag x36 to ManTag 125.
- Local bridge visible service text changed to ManTag 125.
- Frequency fix, S0-S5 signal, CTCSS/DCS, recording and CLEAR LOG from previous tests retained.

PARSER TEST6
- Fixed 0.5 s LOG/record churn when SCAN + Close Call run together.
- Root cause: UBC125XLT STS alternates "CC Found!" and blank every poll cycle.
  The previous parser treated that blink as a mode change and repeatedly
  ended/started the same call.
- CALL lifecycle is now controlled ONLY by GLG squelch state.
- STS and PWR are metadata-only updates.
- Close Call is latched for the entire active carrier and cannot fall back
  to SCAN until that carrier ends.
- If a call starts as SCAN and CC is confirmed one poll later, it upgrades
  in-place to Close Call without creating a second LOG or WAV.

PARSER TEST7
- LICENSE menu button activated.
- LICENSE now opens/closes the existing modal normally.
- Visible title changed to ManTag 125 LICENSE.
- The old x36 trial/license/show-SN scripts are intentionally still NOT loaded.
- Reason: the UBC125XLT protocol path currently used by ManTag 125 does not
  expose the x36-style scanner ESN/SN needed for the existing scanner-bound
  license verifier. Loading PRODUCT=X36 would create false/invalid licensing.
- ACTIVATE is visible and responsive but explicitly reports that 125 activation
  is not enabled in this test build yet.
- All TEST6 SCAN/CC lifecycle fixes retained unchanged.

PARSER TEST8
- CTCSS/DCS detection strengthened.
- Tone is now read from two independent sources:
  1) GLG numeric tone code,
  2) STS LCD text (for example real capture C71.9).
- STS-detected tone updates LIVE immediately and is preserved through CALL_END into LOG.
- Logger active-call key is now frequency-based, preventing SCAN -> Close Call upgrades
  from splitting/losing metadata such as CTCSS.
- ONLINE top card redesigned without adding new fields:
  larger BANK, CHANNEL, FREQUENCY, SIGNAL, CTCSS/DCS fonts,
  fuller card spacing and stronger visual hierarchy.
- Existing TEST7 licensing UI and TEST6 SCAN/CC lifecycle behavior retained.

PARSER TEST9
- BANK fixed deterministically from GLG channel number:
  channels 1-50=BANK1, 51-100=BANK2, ... 451-500=BANK10.
  Close Call continues to show BANK=CC.
- ONLINE layout rebuilt into exactly two clean data rows.
- Frequency cell widened and frequency font adjusted so values such as
  446.0062 MHz / 126.1000 MHz fit inside the field.
- Removed the visual third-row/ghost-box effect below SIG/RSSI.
- Removed stale static "TRIAL: waiting for scanner" from the LOG header.
  It was an x36-derived UI remnant; x36 trial/ESN runtime is not loaded in ManTag 125.
- LOG header now shows only LOGS: n / 1000 until the dedicated 125 licensing/trial
  mechanism is implemented.
- Existing TEST8 CTCSS/DCS dual-source capture retained.

PARSER TEST10
- ONLINE main split changed to 1:2 (left:right).
- Center divider moved left; BANK/CHANNEL occupy one third and live radio data two thirds.
- All TEST9 functionality retained unchanged.

PARSER TEST11
- Corrected the intended ONLINE divider: the vertical line immediately after
  BANK / CHANNEL is explicitly positioned at a 1:2 left:right split.
- No functional/parser changes from TEST10.

PARSER TEST12
- Added GET S/N button directly to the ManTag 125 LICENSE window.
- Button checks that the scanner is connected.
- It does not fabricate an S/N: current verified UBC125XLT PC protocol testing
  has not yet produced a unique scanner serial-number command/path.
- All TEST11 layout and TEST8-10 parser fixes retained unchanged.

PARSER TEST13
- TYPE moved next to BANK in the left side of the ONLINE card.
- Right top row now contains only FREQ + MODE, giving frequency more room.
- No parser/log/recording changes.
- GET S/N behavior unchanged: the verified UBC125XLT/BC125AT protocol command
  list provides MDL and VER but no unique scanner serial-number command.

PARSER TEST14
- ONLINE TYPE no longer shows hardcoded SCAN.
- Active conventional analog calls display A_CONV.
- Close Call displays CC.
- Idle/no active call leaves the last call type visible; initial state is —.
- No parser/log/recording changes.

PARSER TEST15
- TYPE corrected:
  SCAN while scanner is scanning/idle.
  A_CONV only while a conventional analog call is active.
  CC only while Close Call is active.
- GET S/N now performs an actual scanner/USB identity read through the local
  ManTag 125 Windows service instead of displaying the previous placeholder.
- New /scanner-id endpoint reads Windows USB/PnP enumeration and returns the
  scanner USB instance serial/identity exposed by Windows.
- GET S/N displays and copies that value in the LICENSE window.

PARSER TEST16
- Corrected normal UBC125XLT scan-hit classification:
  normal programmed-channel traffic remains TYPE=SCAN in ONLINE and LOG.
  Close Call remains TYPE=CC.
- Removed A_CONV from the 125 normal scan path.
- GET S/N no longer accepts Windows instance counters such as 0001.
  Such values are explicitly rejected because they are not scanner serial numbers.
- If Windows/USB does not expose a plausible unique scanner serial, GET S/N now
  reports that the S/N is not exposed by this UBC125XLT connection.
- No changes to recording, CTCSS/DCS, BANK, frequency parsing, or Close Call lifecycle.

PARSER TEST17
- ManTag 125 licensing direction changed from scanner S/N to customer email.
- GET S/N removed from LICENSE window.
- Added CUSTOMER EMAIL field.
- LICENSE window stores normalized customer email + ManTag 125 license key.
- Old X36 scanner-S/N license verifier remains unused.
- This is the 125-specific licensing UI foundation; server-side/signed-key
  verification can now be connected to email without scanner hardware identity.
- All TEST16 scanner/parser/UI/recording behavior retained.

PARSER TEST18
- Fixed SEARCH classification for UBC125XLT.
- STS LCD text such as "Custom 7" is now detected as SEARCH.
- Normal programmed-channel scan remains SCAN.
- Close Call remains CC.
- SEARCH is latched for the full open carrier so blinking STS text cannot create log churn.
- SCAN -> SEARCH is upgraded in place; no duplicate CALL_END/CALL_START row.
- ONLINE TYPE now shows SEARCH even while the scanner is searching with no active carrier.
- Logger already supports SEARCH and now receives kind=SEARCH from the 125 parser.
- TEST17 email-license UI and all prior recording/tone/BANK fixes retained.

PARSER TEST19
- Added dedicated SVC classification for UBC125XLT Service Search (F + Srch).
- SVC is detected from STS "SVC" or known predefined service names.
- ONLINE TYPE shows SVC while Service Search is active.
- Service Search hits are logged as SVC, not SCAN.
- SVC is latched across the complete open carrier.
- Existing SCAN / SEARCH / CC behavior from TEST18 retained.

PARSER TEST20
- Fixed Service Search detection from real UBC125XLT trace supplied by user.
- STS service label "Aircraft" is now recognized as SVC.
- During SVC, ONLINE BANK is explicitly shown as SVC.
- SVC remains latched for the full open carrier and is logged as TYPE SVC.
- SCAN, SEARCH and CC behavior unchanged.

PARSER TEST21
- UI-only fix for BANK/TYPE row.
- BANK=SVC and TYPE=SVC now fit inside the existing 1:2 ONLINE split.
- Reduced only label/value spacing and value font slightly; parser/logging unchanged.

PARSER TEST22
- UI-only: TYPE and BANK swapped.
- Left row now reads TYPE first, BANK second.
- TYPE receives slightly more width, solving SVC clipping.
- Parser/logging/recording/licensing unchanged.

PARSER TEST23
- Service Search BANK now shows the actual service-bank name from scanner STS/LCD.
- Real user trace "Aircraft" now produces TYPE=SVC, BANK=Aircraft.
- SVC is used only as fallback when no recognized service name is available.
- TYPE/BANK UI order from TEST22 retained.
- SCAN/SEARCH/CC, recording, tones and licensing unchanged.

PARSER TEST24
- LOG UI-only cleanup.
- Balanced fixed column widths.
- More space for CHANNEL.
- Narrower MODE/CTCSS/DCS/SIG/RSSI columns.
- AUDIO controls kept fully visible.
- Parser, logging data, recording, SVC/SEARCH/SCAN/CC and licensing unchanged.

PARSER TEST25
- Replaced Sentinel export with ARC TXT export.
- Button renamed SENTINEL -> ARC TXT.
- Export is TAB-separated with no header.
- Row format: 0148.8375<TAB>HZS HS-CD<TAB>FM<TAB>Search<TAB>2<TAB><TAB>
- Frequency is exported as 4 integer digits + 4 decimal digits.
- Repeated call-history rows are deduplicated for ARC import.
- All parser/UI/logging/recording/licensing behavior from TEST24 retained.

PARSER TEST26
- UI-only: increased visual separation between TYPE and BANK by about 200%.
- TYPE remains first, BANK second.
- Parser, LOG, ARC TXT export, recording and licensing unchanged.

PARSER TEST27
- UI-only robust TYPE/BANK spacing fix.
- Replaced grid spacing with flex: TYPE pinned left, BANK pinned right.
- This creates a real visible separation instead of a grid gap that could collapse.
- Parser, LOG, ARC TXT, recording and licensing unchanged.

PARSER TEST28
- LOG UI-only refinement.
- MODE column narrowed.
- CTCSS, DCS, SIG, RSSI and DURATION widened proportionally.
- All data/parser/recording/ARC TXT/licensing behavior unchanged.

PARSER TEST29
- LOG UI-only final spacing refinement.
- MODE remains narrow.
- CTCSS, DCS, SIG, RSSI and DURATION widened by approximately 10% from TEST28.
- Parser, LOG data, ARC TXT, recording and licensing unchanged.

PARSER TEST30
- LOG UI-only: MODE, CTCSS, DCS, SIG, RSSI and DURATION now use equal column widths.
- AUDIO remains separate so its control buttons fit cleanly.
- Parser, LOG data, ARC TXT, recording and licensing unchanged.

PARSER TEST31
- Fixed the actual cause of LOG column sizing not changing.
- Previous rules targeted #logTable, but the real LOG <table> had no id="logTable".
- Added id="logTable" to the actual table.
- MODE, CTCSS, DCS, SIG, RSSI and DURATION are now forced to exactly the same width (84 px min/width/max).
- AUDIO remains separate at 112 px.
- No parser/data/recording/ARC/licensing changes.

PARSER TEST32
- Final LOG UI-only adjustment.
- AUDIO column heading centered directly above the audio-control icons.
- No other UI widths, parser, LOG data, ARC TXT, recording or licensing changes.

PARSER TEST33 — MAN TAG 125 TRIAL 20
- Replaced obsolete x36 scanner-S/N trial logic with dedicated ManTag 125 trial.
- Trial allows 20 committed LOG rows.
- Trial no longer waits for / reads scanner SN/ESN.
- Trial counter is independent of LOG storage, so CLEAR LOG does not reset it.
- After 20 committed calls, further LOG rows are blocked.
- RECORD already uses ManTagTrial.canCommit(), so WAV/Dropbox recording is also blocked after the trial limit.
- Added visible TRIAL x/20 status next to LOGS counter.
- Scanner parser, SEARCH/SVC/CC/BANK/tone logic, LOG layout, ARC TXT and Dropbox code otherwise unchanged.

PARSER TEST34 — 125 EMAIL + CODE + ONE WINDOWS DEVICE
- BUY LICENSE now opens the dedicated ManTag 125 Polar checkout:
  https://buy.polar.sh/polar_cl_5vbsetStMkwQYjEGtXhoZkVBWpRmIkskXm11S3WcDwa
- Activation uses the customer's Polar purchase email + activation code.
- Scanner SN/ESN is not used for ManTag 125 licensing.
- Local bridge exposes /device-id with only a SHA-256 fingerprint.
- Raw Windows MachineGuid never leaves the local PC.
- First successful activation binds the Polar purchase to one Windows device.
- Signed MT1 license is verified locally as PRODUCT=125 and DEVICE_ID match.
- Existing TRIAL 20 remains active until a valid license is installed.
- Scanner parser / SCAN / SEARCH / SVC / CC / BANK / CTCSS / DCS / LOG / ARC / Dropbox logic unchanged.

PARSER TEST35 — LICENSE ENDPOINT FIX ONLY
- ManTag 125 license server endpoint changed:
  https://license.mantag.eu -> https://licence.mantag.eu
- No other functional changes from TEST34.
- Parser, LOG, recording, Dropbox, ARC, trial, device fingerprint and Polar checkout unchanged.
