Lab 2 - J1939 messaging
Time: 90 minutes
Hardware: None
Learning objectives
- Parse a 29-bit J1939 CAN identifier into priority, PGN, and source address
- Decode a catalog PGN payload to a human-readable name
- Build a J1939 ID from logical fields
- Explain PDU1 vs PDU2 at a conceptual level (see J1939 concepts)
Prerequisites
- Lab 1 or equivalent CAN familiarity
npm run buildcompleted
Tasks
- Run the starter and observe parsed fields for ID
0x18F00400. - Complete the
buildJ1939IdTODO soLAB02_BUILT_ID=0x18F00400. - Answer in your lab report:
- What is the PGN for EEC1?
- Which ECU source address is in the sample frame?
- Why must
extended: truebe set when decoding?
Run
npx tsx labs/lab-02-j1939-messaging/starter/lab.ts
Scope note
Embedded32 ships a partial PGN catalog suitable for education - not full SAE J1939-71 coverage.
Check your work
npm run test:labs