Blog · 2026-11-10
Is it possible to auto close the power window of a car using OBD and CAN bus?
Stefan Bogdanescu
Founder & Senior Architect
Is it possible to auto close the power window of a car using OBD and CAN bus?
The short answer is generally no, but with significant caveats depending on the specific vehicle architecture. While products claiming to automatically close windows via OBD exist for certain models, they are rarely universal solutions. The core issue lies in how modern automotive networks handle control signals versus status queries.
The Control Barrier: Why You Can't Just "Send a Signal"
Your premise assumes that because OBD (On-Board Diagnostics) allows reading data, it should logically allow writing control commands to actuate motors. This is a fundamental misconception regarding the architecture of CAN bus networks in vehicles.
OBD ports were designed primarily for diagnostics and emissions monitoring, not as open application programming interfaces (APIs) for user-defined actuators. While the OBD-II standard defines specific frames for reading data like engine RPM or speed, it does not define commands for closing power windows. The ability to toggle a window is considered a safety-critical function in many jurisdictions. Consequently, manufacturers hardcode these functions into specific CAN IDs that are often restricted to internal domain controllers (like the Body Control Module) rather than being exposed on the public OBD-II gateway where diagnostic tools connect.
If you attempt to send a standard OBD command packet expecting it to trigger a window motor, the vehicle's bus manager will likely drop the frame or return an error code indicating that the requestor lacks permission to write to that specific memory address or control node. This is why generic scripts or simple microcontrollers often fail when trying to "hack" this behavior directly via the OBD port without proprietary authentication keys.
Status Reporting: Reading Window State
Your secondary question regarding whether we can determine if a window is open or closed using OBD is technically more feasible, though still not guaranteed across all platforms.
In many vehicles, the status of power windows and sunroofs is broadcast over the CAN bus as part of regular heartbeat messages from the Body Control Module (BCM). However, these messages are not always mapped to standard OBD-II PID (Parameter ID) lists. Standard PIDs cover engine parameters, fuel trim, and emissions data; they do not typically include "Window Position %".
To read window state, you would need to access manufacturer-specific UDS (Unified Diagnostic Services) service IDs or specific proprietary CAN IDs that are exposed through the OBD gateway. Tools like cantools or specialized libraries can be used to dump the raw hex data from a connected vehicle:
from cantools import db
db_file = 'your_vehicle_database.db' # Requires official ECU database
can_db = db.load_file(db_file)
# Example logic to parse a specific frame (pseudo-code)
def check_window_state(frame):
# This depends entirely on the vehicle's specific CAN ID mapping
if frame.arbitration_id == 0x311:
return "Window Status Message"
Even with access to the raw bus data, interpreting these bits requires the official ECU database (often called a "dbc" or "arxml" file) provided by the manufacturer. Without this map, you cannot reliably translate a hex value into "window open." Furthermore, if the manufacturer keeps these specific PIDs hidden from standard OBD-II gateways, the data is physically inaccessible to any external device plugged into the port.
The Reality of Commercial Solutions
The products mentioned in your source material exist because they are not generic software solutions; they are hardware dongles pre-flashed with proprietary firmware. These devices likely contain:
- Specific Authentication Keys: Hardcoded secrets that mimic a legitimate key fob or internal command sequence.
- Vehicle-Specific Maps: Pre-loaded database files specific to Buick, Chevy, or Cruze models that know exactly which CAN ID triggers the window close event.
- Safety Checks: Logic to ensure the door is open and the switch is not being pressed manually before actuating the motor.
These are not examples of an exposed API; they are examples of reverse-engineered workarounds for specific hardware configurations. They do not work on every car because the underlying network restrictions differ by manufacturer.
Conclusion on Feasibility
If your goal is to build a universal solution that auto-closes windows via OBD for any car, it is currently impossible due to security restrictions and lack of standardized PIDs for non-emission functions. If you are targeting a specific vehicle model, the only viable path is acquiring the manufacturer's ECU database and reverse-engineering the specific UDS services or proprietary CAN IDs required to actuate the window motor safely.