Lab 3 - Multi-ECU simulation
Time: 2 hours
Hardware: None
Learning objectives
- Connect multiple ECU simulators on one virtual CAN bus
- Observe distinct source addresses in J1939 traffic
- Identify engine (EEC1) and transmission (ETC1) broadcasts
- Use
DeterministicSchedulerfor periodic ECU ticks
Prerequisites
- Labs 1–2
- Read ECU simulation concepts
Tasks
- Complete the TODOs in
starter/lab.tsto wire engine and transmission ECUs. - Run for 600 ms and verify at least two source addresses appear.
- Confirm EEC1 (
PGN.EEC1) and ETC1 (PGN.ETC1) are both observed. - Write a short bus log excerpt (5 lines) identifying which ECU sent each PGN.
Run
npx tsx labs/lab-03-multi-ecu-simulation/starter/lab.ts
Alternative observation
Compare with the full profile runner:
npx embedded32-tools simulate vehicle/basic-truck
Check your work
npm run test:labs
Related documentation
- Architecture - simulation flow
@embedded32/simREADME