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
| Pin | Description | I/O | Active |
|---|---|---|---|
| 1 | Ignition Sense | I | HIGH |
| 2 | Battery − (Main Supply) | — | LOW |
| 3 | 3TH Diagnostic Input | I | LOW |
| 4 | Driver's Sill Up | I | LOW |
| 5 | Passenger's Sill Up | I | LOW |
| 6 | Passenger / Rear Doors Open | I | LOW |
| 7 | Driver's Door Open | I | LOW |
| 8 | Horn Relay | O | LOW |
| 9 | MEMS ECU Link | O | LOW |
| 10 | Aerial | I | — |
| 11 | CDL Unlock Motor | O | HIGH |
| 12 | 3TH Output | O | LOW |
| 13 | CDL Lock Motor | O | HIGH |
| 14 | Volumetric Sensor Power | O | HIGH |
| 15 | Diagnostic Ground | — | LOW |
| 16 | Diagnostic Comms In | I | LOW |
| 17 | LED | — | LOW |
| 18 | Bonnet Open Switch | I | LOW |
| 19 | Driver's Sill Down | I | LOW |
| 20 | Volumetric Sensor Signal | I | LOW |
| 21 | Boot Open Switch | I | LOW |
| 22 | Key Barrel Switches | I | LOW |
| 23 | Crank Relay | O | LOW |
| 24 | Diagnostic Comms Out | O | LOW |
| 25 | Chime | O | LOW |
| 26 | Battery + (Main Supply) | — | HIGH |
J2 — 12-pin white connector
| Pin | Description | I/O | Active |
|---|---|---|---|
| 1 | Superlock Motors | O | HIGH |
| 4 | BBUS Status * | O | LOW |
| 6 | Hazard Flash Right | O | HIGH |
| 7 | Hazard Flash Left | O | HIGH |
| 8 | Volumetric Program | O | LOW |
| 9 | Inertia Switch | I | HIGH |
| 10 | Courtesy Lamp(s) * | O | LOW |
| 11 | Energiser Coil Signal * | O | LOW |
| 12 | Energiser Coil Power * | O | HIGH |
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
- Diagnostic mode
- 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.
| Device | On | Off | Pin | Active |
|---|---|---|---|---|
| CDL Unlock Motor | 0x31 | 0x21 | J1-11 | HIGH |
| 3TH Output | 0x32 | 0x22 | J1-12 | LOW |
| CDL Lock Motor | 0x33 | 0x23 | J1-13 | HIGH |
| Chime | 0x34 | 0x24 | J1-25 | LOW |
| Volumetric Sensor Power | 0x35 | 0x25 | J1-14 | HIGH |
| ? | 0x36 | 0x26 | ? | ? |
| Superlock Motors | 0x37 | 0x27 | J2-01 | HIGH |
| Horn Relay | 0x38 | 0x28 | J1-08 | LOW |
| LED | 0x39 | 0x29 | J1-17 | LOW |
| Crank Relay | 0x3A | 0x2A | J1-23 | LOW |
| MEMS ECU Link | 0x3B | 0x2B | J1-09 | LOW |
| ? | 0x3C | 0x2C | ? | ? |
| Hazard Flash (L/R) | 0x3D | 0x2D | J2-06/07 | HIGH |
| Energiser Coil Signal | 0x3E | 0x2E | J2-11 | HIGH |
| Volumetric Program | 0x3F | 0x2F | J2-08 | LOW |
Other commands
| Command | Value |
|---|---|
| Keep alive | 0xF0 (assumption) |
| Disconnect | 0xF6 |
| Start key programming | 0x5F |
| End key programming | 0x6F |
| Request data packet | 0x83 |
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.
| Index | Field | How | Pin |
|---|---|---|---|
| 0 | Packet size | — | — |
| 1 | Bonnet | bit 7 (0 / 0x80) | J1-18 |
| 2 | Driver's Sill Up | bit 7 (0 / 0x80) | J1-04 |
| 3 | Driver's Sill Down | bit 7 (0 / 0x80) | J1-19 |
| 4 | Passenger's Sill Up | bit 7 (0 / 0x80) | J1-05 |
| 6 | Ignition | bit 7 (0 / 0x80) | J1-01 |
| 7 | Key Barrel Switch | bit 7 (0 / 0x80) | J1-22 |
| 9 | Driver's Door Open | bit 7 (0 / 0x80) | J1-07 |
| 11 | Boot Open | bit 7 (0 / 0x80) | J1-21 |
| 12 | Inertia Switch | bit 7 (0 / 0x80) | J2-09 |
| 13 | Passenger Door Open | bit 7 (0 / 0x80) | J1-06 |
| 14 | Input bitfield 1 | packed, see below | — |
| 15 | Input bitfield 2 | packed, see below | — |
| 16–19 | Key Counter 1–4 | — | — |
| 20–22 | Serial Number Byte 0–2 | decimal, 3-byte LSB first | — |
| 24–25 | EKA Code Byte 0–1 | BCD, 2 digits per byte | — |
| 30 | Voltage | non-linear (see below) | — |
| 36 on | Unit Description | e.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)
| Bit | Signal | Pin |
|---|---|---|
| 0 | Ignition | J1-01 |
| 1 | Key Barrel Switch | J1-22 |
| 2 | — | — |
| 3 | Driver's Door Open | J1-07 |
| 4 | — | — |
| 5 | Boot Open | J1-21 |
| 6 | Inertia Switch | J2-09 |
| 7 | Passenger Door Open | J1-06 |
Index 15 (0x0F)
| Bit | Signal | Pin |
|---|---|---|
| 0 | Bonnet | J1-18 |
| 1 | Driver's Sill Up | J1-04 |
| 2 | — | — |
| 3 | Driver's Sill Down | J1-19 |
| 4 | — | — |
| 5 | Passenger's Sill Up | J1-05 |
| 6 | — | — |
| 7 | Volumetric Sensor Signal | J1-20 |
Voltage byte
| Voltage | Binary | Decimal | Δ |
|---|---|---|---|
| 10.5 V | 11011110 | 222 | — |
| 11.0 V | 11100101 | 229 | 7 |
| 11.5 V | 11101010 | 234 | 5 |
| 12.0 V | 11101110 | 238 | 4 |
| 12.5 V | 11110001 | 241 | 3 |
| 13.0 V | 11110100 | 244 | 3 |
| 13.5 V | 11110110 | 246 | 2 |
| 14.0 V | 11111000 | 248 | 2 |
EEPROM mode
Setup: 5-baud init with address 0x9D (replies 0x55 0x83 0xF7).
Address spaces:
- EPROM/RAM:
0x00–0xFF - EEPROM:
0x100–0x1FF
A command is always 4 bytes. Write size is always 1; read size is set in byte 0.
| Index | Field | How |
|---|---|---|
| 0 | Bitfield (see below) | — |
| 1 | Address bits 8:1 | address >> 1 |
| 2 | Value to write | 0x00 to read |
| 3 | Terminator | always 0xAA |
Byte 0 bitfield
| Bit | Field | How |
|---|---|---|
| 0 | Address bit 0 | LSB of the target address |
| 1–3 | Read size | value 0–7, reply length = value + 1 (1–8 bytes) |
| 4 | — | unused |
| 5 | Write flag | 1 = write, 0 = read |
| 6 | EEPROM select | 1 if address ≥ 0x100, else 0 |
| 7 | — | unused |
Full address: (byte1 << 1) | (byte0 & 1).
EEPROM map
Offsets are positions within the EEPROM image.
Quick reference
| Offset | Size | Field | Encoding |
|---|---|---|---|
0x00 bit 0 | flag | Microcontroller security flag | active low |
0x00 bit 1 | flag | EEPROM protection flag | active low |
0x20 | 1 | Passive arm time (ignition & door) | ×1 s |
0x21 | 1 | Passive arm time (no ignition) | ×1 s |
0x36 bit 1 | flag | Hazards flash with alarm | active low |
0x36 bit 2 | flag | Superlocking enabled 1 | active low; inverse of 0x9A bit 2 |
0x37 bit 6 | flag | Passive arming enabled | active low |
0x38 bit 2 | flag | Low battery flash LED on unlock | active high |
0x38 bit 3 | flag | Low battery double key press | active high |
0x3B | 2 | MEMS ECU code | hex, LSB first |
0x3E bit 0 | flag | Switch closed when bonnet open | active high |
0x42 | 4 | Key fob 1 code | hex, LSB first |
0x46 | 4 | Key fob 2 code | hex, LSB first |
0x4A | 4 | Key fob 3 code | hex, LSB first |
0x4E | 4 | Key fob 4 code | hex, LSB first |
0x53 | 1 | Number of key fobs | 1–4 |
0x89 | 1 | LED pattern mask (disarmed) | see encoding |
0x92 | 1 | LED pattern mask (armed) | see encoding; Revill said 0x90 |
0x9A bit 2 | flag | Superlocking enabled 2 | active high; inverse of 0x36 bit 2 |
0x9C | 3 | Alarm serial number 1 (this alarm) | decimal, LSB first; copy at 0xC7 |
0xA0 | 2 | Emergency key access code | BCD, MSB first |
0xAD | 1 | Passive arm time (ignition only) | ×8 s |
0xC7 | 3 | Alarm serial number 2 (template used) | decimal, LSB first; copy at 0x9C |
0xCF | 1 | Week of manufacture | BCD |
0xD0 | 2 | Year of manufacture | BCD, MSB first |
Identification and manufacture
Alarm serial number — 0x9C 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 code — 0x3B, 2 bytes, hex, LSB first. Unique immobiliser identity
sent to the MEMS ECU. Any value except 0x0000, 0xFFFF and 0xF0F0.
Week / year of manufacture — 0xCF (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.
| Mask | Bits | Pattern |
|---|---|---|
0x00 | 00000000 | Off (default disarmed) |
0xFF | 11111111 | On 8 ms, off 1016 ms (default armed) |
0xFE | 11111110 | On 16 ms, off 1008 ms |
0xFC | 11111100 | On 32 ms, off 992 ms (preferred armed) |
0xF8 | 11111000 | On 64 ms, off 960 ms |
0xF0 | 11110000 | On 128 ms, off 896 ms |
0xE0 | 11100000 | On 256 ms, off 768 ms |
0xC0 | 11000000 | On 512 ms, off 512 ms |
0xBC | 10111100 | On 32 ms, off 480 ms |
0xA0 | 10100000 | On 256 ms, off 256 ms |
0x90 | 10010000 | On 128 ms, off 128 ms |
0x88 | 10001000 | On 64 ms, off 64 ms |
Decoding:
- Take a 7-bit counter incrementing every 8 ms (wraps after 1024 ms).
- AND the counter with the low 7 bits of the mask.
- If the result is zero, take the mask's high bit; otherwise its inverse.
- That bit is the LED state — 1 = on, 0 = off.
Low battery warning
- Flash LED on unlock —
0x38bit 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 press —
0x38bit 3, active high. When the fob reports low battery, its button must be pressed twice, giving the impression it's failing.
Passive arming
Enabled — 0x37 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 ignition —
0x21, ×1 s, 1–255 s. Unlocked, ignition never on. Default ~30 s. - Ignition & door —
0x20, ×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 only —
0xAD, ×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 alarm —
0x36bit 1, active low. When 0, the hazards pulse with the alarm. - Switch closed when bonnet open —
0x3Ebit 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.