AndruinoXTrail/firmware/shared/can_ids.h
kykaevv f182df290f Add T31 CAN fold-on-lock Arduino firmware.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 13:26:49 +03:00

42 lines
1.2 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Nissan X-Trail T31 CAN map — lock, doors, ignition, mirrors.
*
* Platform: T31 (20072014). Same CAN COMM as Qashqai J10.
* Bus: 500 kbit/s, 11-bit IDs.
*
* Tap:
* OBD-II pin 6 CAN-H, pin 14 CAN-L
* or BCM (behind glovebox), green 40-pin: pin 20 CAN-H blue, pin 40 CAN-L pink
* Do not fit extra 120 ohm — the bus is already terminated.
*
* T31 has electric folding mirrors on some trims, but BCM does not publish
* a cyclic "fold mirrors" frame. The door switch reverses motor polarity.
*/
#pragma once
#define CAN_XTRAIL_BCM_STATUS 0x60D
/*
* 0x60D data[0]: door-open bits (driver bit4 … rear RH bit7)
* 0x60D data[1] bits 2-3 ignition: 00 OFF, 01 ACC, 11 ON, 10 START
* 0x60D data[2] bits 3-4 locked (mask 0x18)
*/
#define CAN_XTRAIL_LOCK_DETAIL 0x358
/*
* 0x358 data[5]: bit0 driver locked, bit1 other doors locked
*/
#define CAN_XTRAIL_BCM_DIAG_REQ 0x745
#define CAN_XTRAIL_BCM_DIAG_RES 0x765
/*
* CONSULT ISO-TP. Not used for lock/unlock or fold in this project.
*/
/*
* Mirror fold/unfold is analog on T31 (switch in the door).
* Facelift T31 (≈20102014) uses a different fold-switch connector
* than pre-facelift. Parallel the switch with relays, do not drive
* motors from the Arduino.
*/