What is really interesting about CAN bus is the actual usage model: each packet has single address of either 11 or 29 bits (the latter is called extended frame), and a maximum payload of 8 bytes. The bus runs up to 1Mbps, and the speed directly influences the max bus length. The bus is physically deployed as a terminated differential twisted pair with a ground reference, and it’s usually in a trunk-drop topology, where many nodes are connected to a main trunk cable with short drop lines, sometimes using T junctions. If you are new to field busses, CAN bus may appear weird at first sight. This is based on my experiences hacking into my Toyota… Toyothack! In this post I’ll show how to tap into a modern car local bus, dump a bunch of data and analyze the trace offline to write a decoder from scratch using the SocketCAN APIs and utilities. The Linux kernel has native CAN bus support at network layer since some years, with a lot of drivers for both embedded and USB CAN bus controllers, so it’s now fairly easy to add a CAN bus interface to any Linux laptop and have a playaround with it. CAN bus is an automation fieldbus commonly used in the automotive industry as the main network bus to allow communications between the many on-board ECUs on modern vehicles.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |