ICM2

The ICM2 is the Infotainment Control Module in the 2003-2006 9-3 (9440). It sits between the two CAN buses, the dash top SID and the MOST optical ring, so it's the only thing in the car that talks to the radio side at all.

Everything below is read out of the factory GlobalTIS firmware, vip_icm2.gbf, SW part number 12782531 AA, build VIP405_ICM2-2.1.5.RC1. The CAN IDs, DLCs, periods and timeouts come straight from the message tables in the binary. The bit level stuff comes from the code that packs and unpacks the frames. Where a bit is only known as "this customization option goes here" the name is my guess, so treat the CustomOpt ones as placeholders.

Buses

The VIP (Vehicle Interface Processor) is a little endian NEC V850/SF1 running a cooperative task loop on a 10 ms tick.

InterfacePhysicalSpeedRole
Channel 0, P-bus2-wire HS CAN (ISO 11898)500 kbit/s26 RX IDs of powertrain and chassis data, 0x740 TX, and the diagnostic gateway to the MOST nodes
Channel 1, I-busSingle wire CAN (GMLAN SWCAN)33.333 kbit/s67 RX IDs, 11 TX IDs: dimmer, buttons, customizations, clock set, network management, security
SID-HPDUART on CAN wiring115200 baudThe dash top SID, 384x64 green LCD plus a 64x64 orange icon area. Checksum is the MSB of all the non-DLC bytes
O-bus (MOST25)Plastic optical fibre ring22.5 MHzRing master for EHU, AMP1/AMP2, CD/CDC, DVD, CU/PU and the chimes and clicks

In the firmware tables the 11-bit ID is shifted left 2 in the upper halfword of a 32-bit entry, so id = (word >> 18) & 0x7FF if you go digging yourself.

What the ICM2 sends

P-bus, 23 handles

Only one of them is a real message. The other 22 are diagnostic responses.

HandleIDDLCPeriodMin delayWhat
0x000x74063000 ms100 msMenu/aux status, same frame goes out on the I-bus as handle 0x17
0x01-0x0A0x65A-0x6518eventUSDT responses for the MOST nodes, answering 0x25A-0x251
0x0B0x6478eventICM2's own USDT response, answering 0x247
0x0C-0x150x55A-0x5518eventUUDT responses for the MOST nodes, DTC and DPID streaming
0x160x5478eventICM2's own UUDT response

I-bus, 11 handles

HandleIDDLCPeriodMin delayWhat
0x170x74063000 ms100 msMenu/aux status, mirrors the P-bus one
0x180x6708event100 msClock and date write command to the BCM
0x190x6478eventUSDT diagnostic response, answering 0x247
0x1A0x62783000 msGMLAN virtual network management, node 0x07
0x1B0x5478eventUUDT diagnostic response
0x1C0x46051000 ms + event100 msIllumination, dimmer, ambient light, night panel
0x1D0x31083000 ms + event100 msESP button, service reset, customizations
0x1E0x2005event200 msAux status/command
0x1F0x1351100 ms50 msVariant switch status, 0x00 on a plain sedan
0x200x1000eventSWCAN high voltage wakeup, empty frame
0x210x0458event50 msInfotainment security / marriage response to the CIM's 0x040

What the ICM2 listens for

P-bus, 26 handles

IDDLCTimeoutUsed for
0x7428eventTransport RX
0x7418eventTransport RX
0x51822500 msb1
0x51022500 msb1
0x3808250 ms(b7 & 0x1F) >> 4
0x3206250 msb5[7:2], b3[0] is a SID warning
0x3011250 msb0[3] SID warning
0x3002250 msb1[7] driving state
0x2F03250 msb0[0] and b2[4] driving lockout, b0[1], b1[5], b2[5] SID warnings
0x2908250 msFour 14-bit ESP/chassis values, ((hi & 0x3F) << 8) | lo, valid bit is hi[7]
0x280850 msFour 15-bit wheel speeds, ((hi & 0x7F) << 8) | lo, valid bit is hi[7]
0x25A-0x2510Physical diagnostic requests, bridged to the MOST nodes
0x2470ICM2's own physical diagnostic request
0x180430 ms16-bit BE (b2 << 8) | b3, valid bit b0[6]
0x120330 ms12-bit (b1 << 4) | (b2 >> 4), valid bit b0[7]
0x110430 ms16-bit BE (b1 << 8) | b2, valid bit b0[7]. b3 > 204 is a driving lockout
0x1018Functional diagnostic broadcast

I-bus, 67 handles

IDDLCTimeoutUsed for
0x75B, 0x74E, 0x745, 0x7418Multiframe / extended data
0x700, 0x6908ASCII VIN. 0x690 is characters 2-9, 0x700 is 10-17
0x6808Extended vehicle configuration
0x582-0x570119 node alive monitors. Healthy is (b0 >> 5) == 1, so 0x20
0x53532500 msFuel level and warnings
0x53232500 msb0[4] and b0[3] SID warnings
0x53072500 msTPMS, four 3-bit corner states in b0 and b1. 2 is low, 3 is flat
0x52062500 msBCM clock. b0 year +2000, b1 month, b2 day, b3 hour, b4 minute, b5[6:0] second, b5[7] set means not set
0x50037500 msb0[1] SPA / external audio mute request
0x49027500 msFive door/trunk/hood ajar bits. FL and FR swap on the LHD/RHD bit from 0x210
0x48117500 msSecurity / anti theft status
0x48017500 msb0[0] immobilizer / key not accepted
0x47017500 msBody status, 0x00 idle
0x45052500 msOdometer and trip, feeds the service interval counter
0x44542500 msOutside temperature
0x44037500 ms13 body, alarm and lighting warning bits across b0-b2
0x43013000 msb0[3], gated on the powertrain
0x40032500 msClimate / ACC status
0x39047500 msb0[1], gated on ignition
0x38067500 msb0[5] (0x20) brake switch, b1-b3 bulb and body warnings
0x37037500 msb1[7] (0x80) parking lights or headlights on, this is the dimmer gate. b0[3], b1[2:0], b2[7:5] reverse, fog and bulb out
0x35037500 msb2[5]
0x34037500 msb2[5]
0x33027500 msb0[1]
0x32067500 msBCM lock and door status, b5[6] warning
0x30022500 msLight switch, 00 10 / 00 20 / 00 00. b1[3] warning
0x29052500 msTurn signal stalk, b4 & 0x40 left, b4 & 0x80 right
0x2470ICM2 physical diagnostic request, this is where Tech 2 and SPS come in on the I-bus
0x23017500 msb0[7] warning, b0[6:4] gear/shift display
0x22087500 msSteering wheel angle and status, b0[1] and b0[3]
0x2114Turn signal click trigger. b2 & 0xC0, 0xA8 left and 0x54 right, b3 >> 1 is the on time in 10 ms ticks
0x21087500 msb5[7] LHD/RHD, b4[6:3] == 3 variant button mode, b0/b1/b5/b7 SID warnings
0x19012500 msb0[7] and b0[6]
0x1833b0[7:6] == 1 and b0[5] gate the b0[4:2] warnings
0x18052500 msTransmission / drivetrain
0x17037500 msCoolant temp and service flags. b0[3:0], and b2 == 0xFF is the service reset ack
0x16012500 msb0[0] and b0[4]
0x14052500 msIgnition / crank status
0x10862500 msPowertrain gate. b0[0] engine running, b0[2:1] of 1 or 2 gates the oil and coolant alerts
0x1010Functional diagnostic broadcast
0x09142500 msb1[7] (0x80) brake switch, b0[3:2], b1[4,1,0] and b3[7:5,1] warnings
0x09012500 msISM status, b0[6] warns after a 100 tick ignition settle
0x07022500 msb0[7] and b0[5]
0x06032500 msIgnition and battery. b0:b1 is 0000 off, 4000 key in, 0020 lock/acc, 0060 on, 00A0 run. b2 is battery voltage
0x0408CIM security / marriage challenge, answered on 0x045

Frame layouts

0x460, illumination and night panel, I-bus, DLC 5

Every 1000 ms, and right away on any change with 100 ms minimum between frames.

ByteBitsSignalNotes
07 (0x80)AmbientInvalid0 means b3 is good, 1 means the sensor is faulty
06 (0x40)NightPanelActive1 is night panel on
05:00
17:0ClusterBrightness0x00-0xFF. Forced to 0x00 when the exterior lights are off, 0x370 b1[7] clear
27:0SwitchBrightness0x00-0xFF. Follows b1 at night, scaled down in night panel, 0x00 with the lights off
37:0AmbientLightLevelFiltered reading off the dash phototransistor
47:0DisplayBrightnessLCD and SID-HPD. Rheostat plus ambient through a LUT, hysteresis on every change except dropping to 0x00

Full brightness, night panel off: 00 FF FF 03 FC. Dimmed with night panel on: 40 40 20 03 40.

0x310, ESP button, service reset and customizations, I-bus, DLC 8

Every 3000 ms, and right away on a button edge or a menu change, 100 ms minimum.

ByteBitsSignalNotes
07 (0x80)AuxToggleInvalidValidity for b5[5], 0 is valid
06 (0x40)AuxFlagInvalidValidity for b5[4], 0 is valid
05:4 (0x30)UnitConfig1 or 2, the display and climate unit system
03 (0x08)CustomOpt_00 or 1
02:1 (0x06)CustomOpt_10b00 or 0b11
00 (0x01)ServiceResetReq1 asks for a service reset, cleared when 0x108 is online and 0x170 b2 reads 0xFF
15 (0x20)CustomOpt_2Speed warning / alarm option
14 (0x10)CustomOpt_30 or 1, default 0
12 (0x04)CustomOpt_40 or 1
10 (0x01)EspOffButtonLive state of the dash ESP/TCS OFF switch, 1 while held
27:00x00
37:6 (0xC0)CustomOpt_50 or 1, factory 1 so 0x40
34:2 (0x1C)CustomOpt_60, 1 or 4, default 0
31:0 (0x03)CustomOpt_71 or 2, factory 2
46 (0x40)CustomOpt_80 or 1, factory 1
45 (0x20)CustomOpt_90 or 1, default 0
44:2 (0x1C)CustomOpt_102, 3 or 4
55 (0x20)AuxBtnToggleLatched by the secondary dash switch when 0x210 b4[6:3] != 3 and ignition is on. Clears when the ignition goes off
54 (0x10)AuxFlagPaired with the b0[6] validity bit
53:2 (0x0C)AuxMode2Bit2-bit mode request 0-3, holds VN 0x0B awake 6 s on a change
67:4 (0xF0)DoorLockMask3-bit XOR customization mask, default 0x00
77:4 (0xF0)AuxStatusFlagsTwo value/validity pairs, b7[7]/b7[6] and b7[5]/b7[4]

Factory default idle payload: 00 00 00 42 40 00 00 00.

0x670, set the clock, I-bus, DLC 8

Event only, 100 ms minimum.

ByteBitsFieldEncoding
07:5CommandMode(cmd & 0x07) << 5, 1 sets clock and date
04:00x00 for a normal set
17:30x00 for a normal set
27:0YearYears since 2000, so 2026 is 0x1A
37:4Month(month & 0x0F) << 4, December is 0xC0
47:3Day(day & 0x1F) << 3
57:3Hour(hour & 0x1F) << 3
67:2Minute(minute & 0x3F) << 2
77:2Second(second & 0x3F) << 2
71 (0x02)InvalidFlag0 is valid

0x627, network management, I-bus, DLC 8

One frame with b0 = 0x01 the moment a virtual network goes active, then b0 = 0x00 every 3000 ms while it stays active. Stops on sleep so the bus times out after 8000 ms.

ByteValueMeaning
00x01 / 0x000x01 initial activation, 0x00 keep alive
1bitmaskVirtual networks 0-7 the ICM2 (node 0x07) wants up
2bitmaskVirtual networks 8-11
3-70x00Padding

0x045, marriage response, I-bus, DLC 8

Event only, 50 ms minimum, sent in answer to the CIM's 0x040 whenever that frame has b1 & 0x40 set.

ByteFieldValues
0Status0x01 married / code present, 0x02 blank
1NodeMask0x40, the ICM2
2:3ResponseCode16-bit BE stored response code, 0x0000 if blank
40x00
5SubStatus0x00 married and verified, 0x01 married flag set but codes blank, 0x02 unmarried with a code present, 0x03 unmarried and blank
6:70x00 0x00

The rest

How it behaves

Ignition and sleep

The CIM walks 0x060 b0:b1 through 00 00 off, 40 00 key in, 00 20 lock/acc, 00 60 on, 00 A0 run. On wake the ICM2 fires the wakeup frame 0x100, sends 0x627 with b0 = 0x01, then keeps it alive with 0x00 every 3000 ms. When 0x060 goes back to 00 00 and all the virtual networks clear it stops sending 0x627, 0x460, 0x310 and 0x135, and the I-bus sleeps 8000 ms later.

Dimming and night panel

It watches 0x370 b1[7] for the exterior lights along with its own phototransistor, rheostat and the night panel switch. With the lights off the cluster and switch brightness bytes go to 0x00 but the display brightness keeps running off the daytime ambient LUT. 0x460 goes out every second and immediately on any change, and that's what drives the MIU, the interior switches, the SID and the MOST displays.

The clock

The BCM owns the clock and is the only thing sending 0x520, once a second. After a battery disconnect it starts ticking from 2000-01-01 00:00:01 with b5[7] set to say it's never been set. The ICM2 never sends 0x520. When you set the time it sends one 0x670, the BCM takes it, clears b5[7] and broadcasts the new time.

Buttons

It scans the front button matrix, the steering wheel resistor ladder and the rotary encoders. ESP OFF held sets 0x310 b1[0]. A customization menu change gets written to NVM and broadcast on 0x310. A service reset holds 0x310 b0[0] until 0x108 is live and 0x170 b2 reads 0xFF.

Turn signal click

0x211 from the CIM/BCM carries b2 = 0xA8 for left, 0x54 for right, 0x00 for off, and b3 is the blink half period. Click on when b2 & 0xC0 is non zero, then count down b3 >> 1 ticks at 10 ms each and click off, so 0x43 is 330 ms. Nothing goes back out on CAN, the click is audio only, over MOST on a factory car. 0x500 b0[1] is the mute request for SPA and chimes.

SID warnings

There are 92 warning conditions in there, all gated on the ignition state and on 0x108 b0[0] for engine running. The inputs are 0x490 for the five door, trunk and hood bits with front left and right swapped by the LHD/RHD bit, 0x530 for the four TPMS corners, 0x440, 0x380 and 0x370 for lighting and body faults, and 0x570-0x582 for the 19 node alive monitors that each want b0 >> 5 == 1. Output is text and icons on the local LCD and the SID, plus the chimes.

Marriage, 0x040 to 0x045

On key insert or unlock the CIM broadcasts an 8-byte challenge on 0x040: b0 is the command, 0x00 verify and 0x03 divorce, b1 is the target mask with 0x40 meaning the ICM2, and b2:b3 is the 16-bit vehicle secret.

If the secret matches what the ICM2 has stored it clears its mismatch flag, passes the security DTC and answers 01 40 <RespHi> <RespLo> 00 00 00 00. If it doesn't match it sets the mismatch flag, logs a DTC and ignores 0x040 for 60 seconds (6000 ticks). If it's unmarried or blank it processes the incoming code and answers with b5 set to 0x01, 0x02 or 0x03.

Diagnostics, 0x247 to 0x647 and 0x547

Plain ISO 15765-2: 0x0N single frame, 0x1N first frame, 0x2N consecutive, 0x30/0x31 flow control. Max payload is 255 bytes on the I-bus and 266 on the P-bus. The session times out after 5.04 s (504 ticks) without a 0x3E.

The interesting part is that the write and security services are blocked on the I-bus. They only work from the P-bus or from MOST.

SIDServiceAllowed on
0x04ClearDiagnosticInformationP, I, O
0x10InitiateDiagnosticOperationP, I, O
0x1AReadDataByIdentifierP, I, O
0x20ReturnToNormalModeP, I, O
0x23ReadMemoryByAddressP and O only
0x27SecurityAccessP and O only
0x28DisableNormalCommunicationP, I, O
0x34 / 0x36RequestDownload / TransferDataP and O only
0x3BWriteDataByIdentifierP and O only
0x3ETesterPresentP, I, O
0xA2ReportProgrammedStateP and O only
0xA5ProgrammingModeP, I, O
0xA9ReadDiagnosticInformationP, I, O
0xAAReadDataByPacketIdentifierP, I, O
0xAEDeviceControlP and O only

There are 64 DTC slots with an active/history mask of 0x7E. On a 0xA9 each matching DTC streams on 0x547 as 81 <DTC hi> <DTC lo> <symptom> <status> and the list ends with 81 00 00 00 7E. Periodic count updates come as 82 00 <count>.

Replacing the ICM2

The minimum to keep the car happy

BusIDWhenWhat it has to do
I-bus0x460, DLC 51000 ms + changeDimmer, ambient and night panel. Gate b1 and b2 to 0x00 when 0x370 b1[7] is clear
I-bus0x310, DLC 83000 ms + change00 00 00 42 40 00 00 00 or the user's settings, b1[0] for ESP OFF, b0[0] for a service reset
I-bus0x627, DLC 83000 ms while awake01 00 ... on wake then 00 00 ... every 3 s while 0x060 isn't 00 00. Has to stop with the ignition off or the bus never sleeps
I-bus0x670, DLC 8eventOne frame to set the BCM clock when 0x520 b5[7] is set or the user edits the time. Never send 0x520 yourself
I-bus0x045, DLC 8on 0x04001 40 <RespHi> <RespLo> 00 00 00 00 when b1 & 0x40 and the secret matches
I-bus0x211, RXeventMake the turn signal click yourself from b2 & 0xC0 and b3 >> 1 if the factory MOST audio is gone
P-buslisten onlyNo powertrain module needs anything from the ICM2 to start or run the car. Keep it passive unless you want Tech 2 diagnostics or the virtual O-bus

Marrying and unmarrying

You can grab your car's pair without a Tech 2. Log 0x040 and 0x045 on the I-bus once with the factory ICM2 still married in the car. The 16-bit vehicle secret is 0x040 b2:b3 when b1 & 0x40 is set, the response code is 0x045 b2:b3. Store both with married = true.

For the real thing, listen on P-bus 0x247 and answer on 0x647 and 0x547, and support 0x10, 0x3E, 0x27, 0x1A, 0x3B, 0xAE, 0xA9 and 0x04. Tech 2's Remove, or a 0x040 with b0 = 0x03, clears married and zeroes both codes so the unit goes back to delivery state, 0x045 b0 = 0x02 and b5 = 0x03.

Faking the whole MOST ring

Nothing else in the car is on the optical ring. Not the CIM, not the BCM, the MIU, the T8, the TCM or the ABS. The ICM2 is the only gateway to it, so if you pull the ring, the EHU and the amps you can make the car and a Tech 2 believe there's a healthy ring in there purely in software.

Two things to get right. Never set a ring break or missing slave DTC in your own DTC table, always answer 0xA9 with 81 00 00 00 7E. And when Tech 2 scans the infotainment modules it sends normal GMLAN requests to P-bus 0x251-0x25A, so instead of bridging those to fibre, answer them yourself on 0x651-0x65A (USDT) and 0x551-0x55A (UUDT) for whichever nodes the CIM's module list says the car has.

Code

The packing for 0x460, 0x310, 0x627 and 0x670 is just the bit tables above, so here's only the two bits with actual logic in them.

/* I-bus 0x040 -> 0x045 marriage handler */
typedef struct {
  bool     married;
  uint16_t vehicle_secret;  /* expected in 0x040 b2:b3 */
  uint16_t response_code;   /* sent in 0x045 b2:b3 */
} icm2_marriage_t;

static bool icm2_handle_0x040(icm2_marriage_t *m, const uint8_t rx[8],
                              uint8_t tx[8]) {
  if ((rx[1] & 0x40u) == 0u) return false;  /* not for us */

  uint8_t  cmd       = rx[0];
  uint16_t rx_secret = (uint16_t)((rx[2] << 8) | rx[3]);
  bool     codes_ok  = m->vehicle_secret != 0x0000u && m->vehicle_secret != 0xFFFFu &&
                       m->response_code  != 0x0000u && m->response_code  != 0xFFFFu;

  if (cmd == 0x03u) {  /* divorce */
    m->married        = false;
    m->vehicle_secret = 0x0000u;
    m->response_code  = 0x0000u;
    return false;
  }
  if (cmd != 0x00u) return false;

  memset(tx, 0, 8);
  tx[1] = 0x40u;

  if (m->married && codes_ok) {
    if (rx_secret != m->vehicle_secret) return false;  /* 60 s lockout, no reply */
    tx[0] = 0x01u;
    tx[2] = (uint8_t)(m->response_code >> 8);
    tx[3] = (uint8_t)(m->response_code & 0xFFu);
    return true;
  }

  tx[0] = codes_ok ? 0x01u : 0x02u;
  tx[2] = codes_ok ? (uint8_t)(m->response_code >> 8)    : 0x00u;
  tx[3] = codes_ok ? (uint8_t)(m->response_code & 0xFFu) : 0x00u;
  tx[5] = m->married ? 0x01u : (codes_ok ? 0x02u : 0x03u);
  return true;
}
/* P-bus 0x251-0x25A -> 0x651-0x65A / 0x551-0x55A
 * Answers for virtual MOST nodes with no ring in the car.
 * node_mask bit (id - 0x251) enables that node. */
static bool icm2_virtual_obus(uint16_t id, const uint8_t rx[8],
                              uint16_t node_mask, uint16_t *out_id,
                              uint8_t out[8]) {
  if (id < 0x251u || id > 0x25Au) return false;

  uint8_t slot = (uint8_t)(id - 0x251u);
  if ((node_mask & (1u << slot)) == 0u) return false;  /* car doesn't have it */
  if ((rx[0] & 0xF0u) != 0x00u) return false;          /* single frames only */

  uint8_t sid = rx[1];
  memset(out, 0, 8);

  if (sid == 0xA9u) {  /* ReadDTC, always say zero DTCs */
    *out_id = (uint16_t)(0x551u + slot);
    out[0]  = 0x81u;
    out[4]  = 0x7Eu;
    return true;
  }

  *out_id = (uint16_t)(0x651u + slot);
  switch (sid) {
    case 0x3Eu: out[0] = 0x01u; out[1] = 0x7Eu; return true;  /* TesterPresent */
    case 0x10u: out[0] = 0x01u; out[1] = 0x50u; return true;  /* InitiateDiag */
    case 0x20u: out[0] = 0x01u; out[1] = 0x60u; return true;  /* ReturnToNormal */
    case 0x04u: out[0] = 0x01u; out[1] = 0x44u; return true;  /* ClearDTC */
    case 0x28u: out[0] = 0x01u; out[1] = 0x68u; return true;  /* DisableNormalComm */
    default:
      out[0] = 0x03u; out[1] = 0x7Fu; out[2] = sid; out[3] = 0x11u;
      return true;
  }
}

A 0x1A read gets 0x5A <DID> <data>, or 7F 1A 31 for a DID you haven't implemented.