Background reading for CrikeyCon

Background reading for CrikeyCon attendees if they want a better understanding of CAN bus.

Photo of books in a library on end
Photo credit to Jessica Ruscello on Unsplash

This is a little light background reading list for anyone looking at doing a touch of CAN bus 101 hackety while at CrikeyCon.


Book cover - The Car Hacker's Handbook by Craig Smith.

First up, is the Car Hacker's Handbook by Craig Smith (click on the ebook link to read it online). I can't say I've read every page yet but the CAN related chapters really helped me get my head around the concepts and topics.


If you want to know more about the actual CAN bus, especially the wiring-up-a-fakey, it's worth having a read of the Basics of CAN-Bus.

Image from Basics of CAN-Bus article (link above).

This provided validation of how we wired up our breadboard based CAN bus before we plugged in the RPi and our CAN based instrument cluster. It's important to get these details right... you don't want to fry the circuits in your gear!


After we received the PICAN3 hardware to go with our Raspberry Pi 4 units, we had to install the driver lines into the RPi config... however then you need the SocketCAN library installed (aka 'can-utils'). Naturally it would be far too easy if the CAN interface (usually can0) would simply stay up...

See https://www.pragmaticlinux.com/2021/07/automatically-bring-up-a-socketcan-interface-on-boot/ for a good, step-by-step (we need that!) guide on getting it running... and keeping it running! (Windows/MacOS has spoilt us.)


Another good primer was Hacking into a vehicle CAN bus and this also has some good examples of CAN frames and how they work. If you're coming from computer networking with TCP or UDP, this is the info you need to understand some more about CAN traffic.


That's it for now - the above should be reading material that either keeps you awake all night... or puts you straight to sleep!

Enjoy the learning.