========================================================================
  CST Installer V2
  Internal tool for bulk deployment and diagnostics of Ricoh MFD devices
========================================================================

------------------------------------------------------------------------
QUICK START
------------------------------------------------------------------------

  1. Extract the archive into the TDT folder 
     (containing java\, lib\, terminaldeploymenttool.bat)
  2. Run CST_Installer_V2.exe
  3. In the Settings tab, enter Cloud URL and API key, set Network Profile
  4. In Network Scan, scan your subnet and add devices
  5. In Deployment, run Install / Configure / Verify

  NOTE: If java\ or lib\ folders are missing, the app starts 
  in Diagnostics Mode - Network Scan and Deep Scan work fully, but 
  deployment operations are blocked. See section below.

------------------------------------------------------------------------
CONTENTS
------------------------------------------------------------------------

  - What It Does
  - Diagnostics Mode (without TDT)
  - Network Profiles
  - Recommended Operating Baseline
  - Configuration
  - Keyboard Shortcuts
  - Technical Overview
  - Known Limitations
  - Changelog vs. Legacy Version

------------------------------------------------------------------------
WHAT IT DOES
------------------------------------------------------------------------

  One tool covers the entire operational cycle:

  Network Scan -> Probe -> Deep Scan -> Install / Configure -> Verify -> Troubleshooting

  Section        Features
  ----------     --------------------------------------------------------
  Deployment     Install, Configure, Uninstall, Restart, Probe, Verify
  Network Scan   CIDR or IP range scan, Quick Add Single Device, import from file
  Deep Scan      SNMP diagnostics: model, SN, MAC, uptime, counter, alerts, 
                 toners, trays
  Settings       Cloud URL, API key, card reader, network profile, 
                 security options

------------------------------------------------------------------------
DIAGNOSTICS MODE (WITHOUT TDT)
------------------------------------------------------------------------

  If you run the EXE without the TDT package (missing java\, lib\, terminaldeploymenttool.bat):

  - Application starts normally and shows an informational dialog.
  - Network Scan and Deep Scan work fully (pure SNMP/Python, no Java required).
  - Probe works (SNMP).
  - Install, Configure, Uninstall, Restart, Verify are blocked 
    with an explanatory message.

  Useful for colleagues who only need to diagnose devices at a 
  customer site without deploying terminal software.

------------------------------------------------------------------------
NETWORK PROFILES
------------------------------------------------------------------------

  In Settings -> Network profile:

  Profile                   Safe  PJL  Delay  Threads  When to Use
  -------                   ----  ---  -----  -------  ----------------------------
  Balanced (Recommended)    YES   NO    80 ms    6     Standard operation at customer
  Strict VPN                YES   NO   140 ms    4     Slow or sensitive VPN link
  Fast LAN                  NO    NO    20 ms   12     Trusted internal LAN
  Diagnostic (PJL allowed)  NO    YES    0 ms   12     Deep testing - not for customer
  Custom                  per setting             Manual combination

  THE DEFAULT PROFILE ON FIRST LAUNCH IS BALANCED.
  Do not switch to Fast LAN or Diagnostic at a customer site without 
  careful consideration - an SNMP flood can trigger alerts in their IPS/SOC.

------------------------------------------------------------------------
RECOMMENDED OPERATING BASELINE
------------------------------------------------------------------------

  Safe Network Mode : ON
  PJL fallback      : OFF
  Threads           : 4-8 (depending on site)
  Scan delay        : 80-150 ms (VPN)  /  20-80 ms (internal LAN)

------------------------------------------------------------------------
CONFIGURATION
------------------------------------------------------------------------

  Settings are stored in config.json.
  (created automatically on first Save Settings, or copy 
   config.json.example and rename it)

  Sensitive data (password, API key):
    - Default: save_sensitive = false -> credentials are not written to config.json.
    - If you enable saving, share config.json only through a secure channel.

  Logs:
    - App log: logs\deployment.log (rotating, max 5 MB x 3 backups)
    - Passwords and API keys are always masked in logs as ******

------------------------------------------------------------------------
KEYBOARD SHORTCUTS
------------------------------------------------------------------------

  Shortcut             Action
  -------              -------------------------------------
  Ctrl+F               Filter device list
  F5                   Probe selected / all devices
  Ctrl+S               Save settings
  Escape               Stop running operation
  Ctrl+A               Select all devices
  Right-click          Context menu (Deep Scan, Copy IP/SN, Kill process...)

------------------------------------------------------------------------
TECHNICAL OVERVIEW
------------------------------------------------------------------------

  - Platform:     Python 3.13 + CustomTkinter, compiled with PyInstaller
                  OneDir (~30 MB)
  - Deployment:   Async HTTP client -> local TDT API Server (port 7312).
                  Fallback to direct Java CLI invocation.
  - SNMP:         Asynchronous queries (asyncio), OID table walks.
  - PJL fallback: Optional port 9100 probe for model/SN 
                  (only when Safe Mode is off)
  - Process iso:  TDT API Server runs as a single persistent Java process - 
                  no hundreds of .bat subprocesses per printer. 
                  Significant RAM and CPU savings.
  - Log routing:  Java stdout is read in real-time and routed to the GUI
                  per IP. Sensitive data is masked before being 
                  passed to callbacks and before being written to disk.

------------------------------------------------------------------------
KNOWN LIMITATIONS
------------------------------------------------------------------------

  - OID availability depends on Ricoh model and firmware version 
    (local SNMP configuration).
  - Some models do not expose meaningful software/app inventory via SNMP.
  - PJL data may be filtered by the device's security policy.
  - Verify requires TDT components (invokes Java) - 
    not available in Diagnostics Mode.

------------------------------------------------------------------------
CHANGELOG VS. LEGACY VERSION
------------------------------------------------------------------------

  WHAT'S NEW:

  - Diagnostics Mode - app starts without TDT folders; Network Scan 
    and Deep Scan are fully functional.
  - Network Profiles - configure all network behavior with a single click.
  - Safe Network Mode (enabled by default) - SNMP-first, pacing + jitter, 
    protection against unintended public IP scanning.
  - Quick Add Single Device - add a single device with immediate 
    background probe.
  - Deep Scan rebuilt on pure SNMP: model, SN, MAC, uptime, 
    counter, alerts, toners, trays, recommended actions.
  - Keyboard shortcuts and context menu (Copy IP, Copy SN, 
    Kill process, Deep Scan).
  - Sidebar Dashboard with operation status and Session Cards
    for Export/Load Config.

  WHAT STAYED COMPATIBLE:

  - Core deployment logic via TDT (install, configure, uninstall, restart).
  - Card reader configuration (VID/PID, preset) and Home Key mode.
  - CSV export.
  - Context operations on the device list.

------------------------------------------------------------------------
VERSION
------------------------------------------------------------------------

  Version:            V2.0
  Build output:       CST_Installer_V2.exe (PyInstaller OneDir, ~30 MB)
  Recommended customer deployment: Safe Network Mode = ON, Balanced profile

========================================================================
