Introduction to CAN

Cars are prior means of transportation, in older cars they had basic electrical wiring as time went on the demand on the more features was increased to gain competitive advantage and also comply with new regulations, As we are literally and figuratively turning the corner into the era of the driver-less or autonomous car, hacking automobiles will become even more important and dangerous.

The most widely used protocols in Automobiles is CAN and its flavors, Let’s learn about CAN, it was first developed by Bosch and released in SAE {1986}
it was designed for robust communications within the vehicle micro controllers and devices without the need of a computer.

CAN protocol runs over two wires CAN-H and CAN-L, it works on the method of differential signalling it transmits the message by differing the voltage between two wires.

CAN is a multi-master serial bus connected with ECU’s{nodes}. all of them are connected to each other through a two-wire bus which consists of a 120 ohm resistor at the end of them to terminate the can messages.
CAN-H will be at 5 v and CAN-L at 0 v and while transmitting a dominant (0) and does not drive either wire when transmitting a recessive (1). Designating “0” as dominant gives the nodes with the lower ID numbers priority on the bus. The dominant differential voltage is a nominal 2 V. The termination resistor passively returns the two wires to a nominal differential voltage of 0 V. The dominant common mode voltage must be within 1.5 to 3.5 V of common and the recessive common mode voltage must be within +/-12 of common. The high speed CAN work at a speed of 512 kbps and low speed CAN work at a speed of 128 kbps.

CAN base format
  • Data frame: a frame containing node data for transmission.
  • Remote frame: a frame requesting the transmission of a specific identifier.
  • Error frame: a frame transmitted by any node detecting an error.
  • Overload frame: a frame to inject a delay between data or remote frame.
  • Arbitration ID : This i different for different nodes and acts as unique identifier to each node .
  • Data Length Code : represents the bytes of data in the message.
  • Data : The data sent or received.
  • SOF and EOF these are used to separate messages.

The data is autonomous in CAN network and if a receiver node wants to request certain data from a sender the remote frame is used. if an error is detected from the network by an node it reacts with,
six dominant bits – error active.
six recessive bits – error passive.
The overload  frame has two fields These are the Overload Flag and the Overload Delimiter. The overload frame is triggered when either by the internal conditions of a receiver or the detection of dominant bit (0) during transmission.

On Board Diagnostics (OBD)-II Connector
Most of the modern vehicles contain an OBD port and helps us to directly connect with the CAN network and monitor it.

NO encryption or authentication, by default. This can lead to man-in-the middle attacks (no encryption) and spoofing attacks (no authentication). Manufacturers in some cases have implemented authentication mechanisms on mission critical systems such as modifying software and controlling brakes, but they have not been implemented by all manufacturers. Even in the cases where passwords have been implemented, they are relatively easy to crack.

References :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s