How dr-karthikrajan/hotwire works
HotWire is a V2G security-research testbed that emulates either side of a DIN 70121 charging session, supports message overrides for attack scenarios, and provides GUI inspection and session-analysis tools. The principal workflow is to launch an EVSE or PEV, establish discovery and transport, run its protocol state machine, and inspect or export the resulting session. Edges reflect the supplied excerpts, SOURCE INDEX references, or README statements; unsampled implementations are represented only where the tree and documentation support them.
Main entry points: worker.py Session orchestrator · fsm_pev.py PEV state machine · widgets Session panels · worker_thread.py GUI worker thread
Components 28
Operator interface
- GUI application
hotwire/gui/app.py - Session window
hotwire/gui/main_window.py - Session panels
hotwire/gui/widgets - GUI worker thread
hotwire/gui/worker_thread.py - GUI signals
hotwire/gui/signals.py
Session runtime
- Session orchestrator
hotwire/core/worker.py - PEV state machine
hotwire/fsm/fsm_pev.py - EVSE state machine
hotwire/fsm/fsm_evse.py - Message overrides
hotwire/fsm/pause_controller.py - Message observer
hotwire/fsm/message_observer.py - Session logger
hotwire/core/session_log.py
V2G protocol and link
- EXI codec connector
hotwire/exi/connector.py - SDP client
hotwire/sdp/client.py - SDP responder
hotwire/sdp/server.py - HomePlug link
hotwire/plc/homeplug.py - SLAC pairing
hotwire/plc/slac.py - Layer-2 transport
hotwire/plc/l2_transport.py - V2G TCP transport
hotwire/plc/tcp_socket.py - Hardware interface
hotwire/core/hardware_interface.py
Attacks and analysis
- Attack playbooks
hotwire/attacks/base.py - PCAP export
hotwire/io/pcap_export.py - CSV export
hotwire/io/csv_export.py - Session comparison
hotwire/io/session_diff.py
Configuration and readiness
- Preflight checks
hotwire/preflight/checks.py - Runtime configuration
hotwire/core/config.py - Address manager
hotwire/core/address_manager.py - Connection manager
hotwire/core/conn_mgr.py
Other components
- Research operator
Connections 30
- Research operator → GUI application: launches
README.md - GUI application → Session window: creates
hotwire/gui/app.py - Session window → GUI worker thread: starts
hotwire/gui/main_window.py - Session window → Session panels: presents
README.md - GUI worker thread → Session orchestrator: runs
hotwire/gui/worker_thread.py - GUI worker thread → Session logger: persists messages
hotwire/gui/worker_thread.py - GUI worker thread → GUI signals: emits events
hotwire/gui/worker_thread.py - Session orchestrator → PEV state machine: selects by mode
hotwire/core/worker.py - Session orchestrator → EVSE state machine: selects by mode
hotwire/core/worker.py - Session orchestrator → HomePlug link: builds link
hotwire/core/worker.py - Session orchestrator → SDP client: uses discovery
hotwire/core/worker.py - Session orchestrator → SDP responder: starts responder
hotwire/core/worker.py - Session orchestrator → Address manager: uses addresses
hotwire/core/worker.py - Session orchestrator → Connection manager: uses connections
hotwire/core/worker.py - Session orchestrator → Hardware interface: creates interface
hotwire/core/worker.py - PEV state machine → Message overrides: intercepts messages
hotwire/fsm/pause_controller.py - Research operator → Attack playbooks: selects scenario
README.md - Attack playbooks → Message overrides: installs overrides
hotwire/attacks/base.py - PEV state machine → EXI codec connector: encodes messages
hotwire/fsm/fsm_pev.py - PEV state machine → V2G TCP transport: transmits messages
hotwire/fsm/fsm_pev.py - PEV state machine → Message observer: notifies decoded messages
hotwire/fsm/fsm_pev.py - HomePlug link → V2G TCP transport: uses transport
hotwire/plc/homeplug.py - HomePlug link → SLAC pairing: runs pairing
hotwire/plc/homeplug.py - SLAC pairing → Layer-2 transport: uses frames
hotwire/plc/slac.py - Research operator → Preflight checks: checks readiness
README.md - Session panels → PCAP export: exports captures
hotwire/gui/widgets/session_tools_panel.py - Session panels → CSV export: exports tables
hotwire/gui/widgets/session_tools_panel.py - Session panels → Session comparison: compares sessions
hotwire/gui/widgets/session_compare_panel.py - Session logger → PCAP export: provides session records
- Session orchestrator → Runtime configuration: reads settings