Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Where to start

Welcome to the machbus guided walkthrough. This is a hands-on, build-along track: you start a real Rust program, add a few lines, run it, watch ISOBUS traffic happen, and then keep extending the same program until it does something genuinely useful on a tractor bus. Every chapter ends with a program you can actually run.

If the rest of the book is the reference manual, this track is the lab course.

New here? Read The session facade first — it shows the whole shape of the API end to end. Most chapters below teach the protocols one at a time using that same session facade, building one program up step by step; chapters 7 and 8 drop down to the lower-level VT and Task-Controller client codec APIs to show how a subsystem works underneath the facade.

Who this is for

  • You know a little Rust (enough to build a project with cargo) and want to learn ISOBUS by doing.
  • Or you know ISOBUS and want to see how it maps onto the machbus API.

You do not need a CAN adapter or a tractor. The first ten chapters run entirely in software on a simulated bus. Real hardware shows up in chapter 10, and it is optional.

How the track is structured

The chapters build on each other. Each one keeps the program from the previous chapter and adds to it:

#ChapterYou will buildLevel
1The ISOBUS Hello WorldA node that claims an address on a busBeginner
2The Hello World, line by lineThe same program, fully understoodBeginner
3Sending and receiving messagesBroadcast and receive a PGNBeginner
4Requests and acknowledgementsAsk another node for dataBeginner
5Moving big data with transportSend a payload too large for one frameIntermediate
6Talking diagnosticsPublish and read fault codesIntermediate
7Your first Virtual Terminal clientPut a screen on the terminalIntermediate
8Your first Task Controller clientReport a working value to a TCIntermediate
9Tractor and implement personasA tractor and an implement talkingAdvanced
10Onto real hardware with SocketCANThe same code on a vcan interfaceAdvanced
11Async event streamsAn async, await-driven event loopAdvanced
12Capstone: a complete implement ECUEverything, combinedAdvanced

How to follow along

Every chapter is anchored to a real example that ships in the repository, so the code you read is code that compiles and runs. Wherever you see a code block pulled from examples/, you can run that exact example:

cargo run --example session_minimal
# or, equivalently, through the Makefile:
make run EXAMPLE=session_minimal

The recommended way to work through the track is to keep your own scratch example file open beside the book and paste each step into it as you go. If you get stuck, the finished example for that chapter is named at the top of the page — diff your version against it.

What you need installed

  • A recent stable Rust toolchain (see Install Rust).
  • The repository checked out, so cargo run --example ... works.
  • Nothing else for chapters 1–9 and 11. Chapter 10 uses Linux SocketCAN and a vcan virtual interface.

Before you dive in

You will get more out of the track if you have skimmed two short concept pages first. They are quick reads and the walkthrough refers back to them:

Everything else is explained as it comes up.

A word on what this proves

The walkthrough teaches the machbus API and ISOBUS behavior in software. It is a learning resource, not a certification. machbus is not certified; shipping a real machine still needs the official standards, real hardware, and interoperability testing with the actual terminals, task controllers, and ECUs you intend to work with.

Ready? Start with The ISOBUS Hello World.