Sniffing the CAN bus with Arduino Due

It’s worth reposting a link Brian posted on the combine forum a long time ago. It contains a list of some industry standard PGNs, some of which our tractors likely use:

The various SPNs can give you a clue as to how data is encoded. Even if a PGN is proprietary and undocumented, if we know what kind of data we’re expecting, we can find similar things in the documented SPNs that we can try. For example, if we suspect that some data on the CAN bus is giving us a roll value from the IMU (Brian talked about the IMU on his Case tractor), then we can see if it’s encoded like another degree value in the SPN. Likely something like 2 byte little-endian word divide by 128 and subtract 200.

I haven’t yet looked but almost certainly a Trimble receiver will transmit latitude and longitude over the bus using the standard PGN 65267, which has two 32-bit fields like this:

  • bytes 0-3 - little endian latitude: multiply by 1E-7, subtract 210.
  • bytes 4-7 - little endian longitude: multiply by 1E-7, subtract 210.