Lucas 5AS Reference

Reverse-engineering notes for the Lucas 5AS alarm and immobiliser system.

Reverse-engineering notes for a Lucas 5AS immobiliser.

Sources:

Hardware

  • MCU: Motorola MC68HC05B16 marked ZC99399CFN, Lucas 53873483, OD650J
  • J1 (large connector): TE Multilock 26-pin, 174516-6
  • J2 (small connector): TE Multilock 12-pin, 173851-1

Pinout

Signals marked * exist only on 98MY versions of the 5AS.

J1 — 26-pin grey connector

PinDescriptionI/OActive
1Ignition SenseIHIGH
2Battery − (Main Supply)LOW
33TH Diagnostic InputILOW
4Driver's Sill UpILOW
5Passenger's Sill UpILOW
6Passenger / Rear Doors OpenILOW
7Driver's Door OpenILOW
8Horn RelayOLOW
9MEMS ECU LinkOLOW
10AerialI
11CDL Unlock MotorOHIGH
123TH OutputOLOW
13CDL Lock MotorOHIGH
14Volumetric Sensor PowerOHIGH
15Diagnostic GroundLOW
16Diagnostic Comms InILOW
17LEDLOW
18Bonnet Open SwitchILOW
19Driver's Sill DownILOW
20Volumetric Sensor SignalILOW
21Boot Open SwitchILOW
22Key Barrel SwitchesILOW
23Crank RelayOLOW
24Diagnostic Comms OutOLOW
25ChimeOLOW
26Battery + (Main Supply)HIGH

J2 — 12-pin white connector

PinDescriptionI/OActive
1Superlock MotorsOHIGH
4BBUS Status *OLOW
6Hazard Flash RightOHIGH
7Hazard Flash LeftOHIGH
8Volumetric ProgramOLOW
9Inertia SwitchIHIGH
10Courtesy Lamp(s) *OLOW
11Energiser Coil Signal *OLOW
12Energiser Coil Power *OHIGH

Pins 2, 3 and 5 are not connected. Early 5AS units have only the grey (J1) connector.

Connection

RX/TX at 12 V logic level with inverted RX. A CH340 VAG-KKL cable works: solder the RS232 pin to VCC to invert RX.

On the MGF's OBD port the K-line pins differ from standard — 1 and 3 instead of 7 and 15 — so an adapter is needed.

Modes

  1. Diagnostic mode
  2. EEPROM mode

Diagnostic mode

Setup: 5-baud init with address 0x1C (replies 0x55 0x83 0x76).

Test commands

Each device has an on and an off command. The low nibble selects the device, the high nibble the action (3 = on, 2 = off): on = 0x30 | device, off = 0x20 | device.

DeviceOnOffPinActive
CDL Unlock Motor0x310x21J1-11HIGH
3TH Output0x320x22J1-12LOW
CDL Lock Motor0x330x23J1-13HIGH
Chime0x340x24J1-25LOW
Volumetric Sensor Power0x350x25J1-14HIGH
?0x360x26??
Superlock Motors0x370x27J2-01HIGH
Horn Relay0x380x28J1-08LOW
LED0x390x29J1-17LOW
Crank Relay0x3A0x2AJ1-23LOW
MEMS ECU Link0x3B0x2BJ1-09LOW
?0x3C0x2C??
Hazard Flash (L/R)0x3D0x2DJ2-06/07HIGH
Energiser Coil Signal0x3E0x2EJ2-11HIGH
Volumetric Program0x3F0x2FJ2-08LOW

Other commands

CommandValue
Keep alive0xF0 (assumption)
Disconnect0xF6
Start key programming0x5F
End key programming0x6F
Request data packet0x83

Key programming erases all stored keys. Press each fob's lock button ≥8 times until the horn sounds; up to 4 keys. Test the horn first with the actuator tests.

Diagnostic packet (in progress — likely more fields)

Returned in response to 0x83. Indices not listed are unknown or unused.

IndexFieldHowPin
0Packet size
1Bonnetbit 7 (0 / 0x80)J1-18
2Driver's Sill Upbit 7 (0 / 0x80)J1-04
3Driver's Sill Downbit 7 (0 / 0x80)J1-19
4Passenger's Sill Upbit 7 (0 / 0x80)J1-05
6Ignitionbit 7 (0 / 0x80)J1-01
7Key Barrel Switchbit 7 (0 / 0x80)J1-22
9Driver's Door Openbit 7 (0 / 0x80)J1-07
11Boot Openbit 7 (0 / 0x80)J1-21
12Inertia Switchbit 7 (0 / 0x80)J2-09
13Passenger Door Openbit 7 (0 / 0x80)J1-06
14Input bitfield 1packed, see below
15Input bitfield 2packed, see below
16–19Key Counter 1–4
20–22Serial Number Byte 0–2decimal, 3-byte LSB first
24–25EKA Code Byte 0–1BCD, 2 digits per byte
30Voltagenon-linear (see below)
36 onUnit Descriptione.g. P2.005AS-98MY

Indices 14 and 15 pack the input states as individual bits (0 = inactive, 1 = active). These are the same states exposed at bit 7 of indices 1–13.

Index 14 (0x0E)

BitSignalPin
0IgnitionJ1-01
1Key Barrel SwitchJ1-22
2
3Driver's Door OpenJ1-07
4
5Boot OpenJ1-21
6Inertia SwitchJ2-09
7Passenger Door OpenJ1-06

Index 15 (0x0F)

BitSignalPin
0BonnetJ1-18
1Driver's Sill UpJ1-04
2
3Driver's Sill DownJ1-19
4
5Passenger's Sill UpJ1-05
6
7Volumetric Sensor SignalJ1-20

Voltage byte

VoltageBinaryDecimalΔ
10.5 V11011110222
11.0 V111001012297
11.5 V111010102345
12.0 V111011102384
12.5 V111100012413
13.0 V111101002443
13.5 V111101102462
14.0 V111110002482

EEPROM mode

Setup: 5-baud init with address 0x9D (replies 0x55 0x83 0xF7).

Address spaces:

  • EPROM/RAM: 0x000xFF
  • EEPROM: 0x1000x1FF

A command is always 4 bytes. Write size is always 1; read size is set in byte 0.

IndexFieldHow
0Bitfield (see below)
1Address bits 8:1address >> 1
2Value to write0x00 to read
3Terminatoralways 0xAA

Byte 0 bitfield

BitFieldHow
0Address bit 0LSB of the target address
1–3Read sizevalue 0–7, reply length = value + 1 (1–8 bytes)
4unused
5Write flag1 = write, 0 = read
6EEPROM select1 if address ≥ 0x100, else 0
7unused

Full address: (byte1 << 1) | (byte0 & 1).


EEPROM map

Offsets are positions within the EEPROM image.

Quick reference

OffsetSizeFieldEncoding
0x00 bit 0flagMicrocontroller security flagactive low
0x00 bit 1flagEEPROM protection flagactive low
0x201Passive arm time (ignition & door)×1 s
0x211Passive arm time (no ignition)×1 s
0x36 bit 1flagHazards flash with alarmactive low
0x36 bit 2flagSuperlocking enabled 1active low; inverse of 0x9A bit 2
0x37 bit 6flagPassive arming enabledactive low
0x38 bit 2flagLow battery flash LED on unlockactive high
0x38 bit 3flagLow battery double key pressactive high
0x3B2MEMS ECU codehex, LSB first
0x3E bit 0flagSwitch closed when bonnet openactive high
0x424Key fob 1 codehex, LSB first
0x464Key fob 2 codehex, LSB first
0x4A4Key fob 3 codehex, LSB first
0x4E4Key fob 4 codehex, LSB first
0x531Number of key fobs1–4
0x891LED pattern mask (disarmed)see encoding
0x921LED pattern mask (armed)see encoding; Revill said 0x90
0x9A bit 2flagSuperlocking enabled 2active high; inverse of 0x36 bit 2
0x9C3Alarm serial number 1 (this alarm)decimal, LSB first; copy at 0xC7
0xA02Emergency key access codeBCD, MSB first
0xAD1Passive arm time (ignition only)×8 s
0xC73Alarm serial number 2 (template used)decimal, LSB first; copy at 0x9C
0xCF1Week of manufactureBCD
0xD02Year of manufactureBCD, MSB first

Identification and manufacture

Alarm serial number0x9C and 0xC7, 3 bytes each, decimal, LSB first. The serial printed on the case-front label. Stored twice, normally identical; believed informational only. Revill's convention for re-flashed units: this unit's real serial at 0x9C, the donor template's serial at 0xC7.

MEMS ECU code0x3B, 2 bytes, hex, LSB first. Unique immobiliser identity sent to the MEMS ECU. Any value except 0x0000, 0xFFFF and 0xF0F0.

Week / year of manufacture0xCF (1 byte) and 0xD0 (2 bytes), BCD, MSB digit first. From the case label; believed informational only.

LED flash patterns (in progress — offsets may differ)

Armed at 0x92, disarmed at 0x89, 1 byte each, identical encoding. The mask ranges from permanently off, through one or more flashes per cycle, to permanently on.

MaskBitsPattern
0x0000000000Off (default disarmed)
0xFF11111111On 8 ms, off 1016 ms (default armed)
0xFE11111110On 16 ms, off 1008 ms
0xFC11111100On 32 ms, off 992 ms (preferred armed)
0xF811111000On 64 ms, off 960 ms
0xF011110000On 128 ms, off 896 ms
0xE011100000On 256 ms, off 768 ms
0xC011000000On 512 ms, off 512 ms
0xBC10111100On 32 ms, off 480 ms
0xA010100000On 256 ms, off 256 ms
0x9010010000On 128 ms, off 128 ms
0x8810001000On 64 ms, off 64 ms

Decoding:

  1. Take a 7-bit counter incrementing every 8 ms (wraps after 1024 ms).
  2. AND the counter with the low 7 bits of the mask.
  3. If the result is zero, take the mask's high bit; otherwise its inverse.
  4. That bit is the LED state — 1 = on, 0 = off.

Low battery warning

  • Flash LED on unlock0x38 bit 2, active high. LED double-pulses for a few seconds after unlock when the fob reports low battery. A further setting is believed to control how many consecutive low-battery messages trigger it, but hasn't been located.
  • Double key press0x38 bit 3, active high. When the fob reports low battery, its button must be pressed twice, giving the impression it's failing.

Passive arming

Enabled0x37 bit 6, active low. When 0, the immobiliser (not the alarm) re-engages automatically after a timeout. When 1, it never re-engages once disengaged, and this persists across power cycles.

Three timeouts apply depending on state. 0 fires immediately (it does not wrap to 256):

  • No ignition0x21, ×1 s, 1–255 s. Unlocked, ignition never on. Default ~30 s.
  • Ignition & door0x20, ×1 s, 1–255 s. Unlocked, ignition on then off, then driver's door opened. Default ~30 s. (No driver's-door switch on a Caterham, so this case never arises there.)
  • Ignition only0xAD, ×8 s, 8–2040 s. Unlocked, ignition on then off. Default 75 (= 600 s / 10 min). Ticks come from a free-running 8 s clock, so N×8 s actually fires between (N−1)×8 s and N×8 s.

Locking and alarm behaviour

Superlocking — Rover deadlocking, where a double-click of the fob lock button mechanically locks out the doors. Controlled by two bits that are always inverses: 0x36 bit 2 (active low) and 0x9A bit 2 (active high). To disable, set 0x36 bit 2 = 1 and 0x9A bit 2 = 0. Both appear to be required — every unit seen with it disabled has both inverted. Irrelevant on a Caterham.

  • Hazards flash with alarm0x36 bit 1, active low. When 0, the hazards pulse with the alarm.
  • Switch closed when bonnet open0x3E bit 0, active high. When 1, the bonnet reads as closed when the input is open-circuit (and open when shorted to ground); when 0, the sense is inverted.