How to identify the protocol of an unfamiliar CAN network?

How to identify the protocol of an unfamiliar CAN network?

In a CAN network, all nodes share a bus for data transmission and reception. When faced with an unknown multi-node CAN bus network, how can we accurately analyze the communication protocol between nodes?

1. CAN bus communication mode

Similar to 485, CAN-Bus also communicates in a bus mode, and all CAN nodes are connected to a pair of differential lines. However, there is no master-slave concept in the nodes of the CAN bus. When a node has data to upload, it can send it autonomously and instantly, and the advanced arbitration mechanism ensures that the data will not conflict.

[[223364]]

Figure 1 CAN bus communication mode

2. CAN bus protocol analysis

Compared with the standard seven-layer communication model, the CAN bus can be roughly divided into the physical layer, link layer, and application layer. The node ID number can be obtained by analyzing the link layer. If you want to analyze the link layer of an "unencrypted" CAN bus, you can use a CAN bus interface card (also known as a CAN box). This type of tool can convert CAN communication to USB, PCI and other communication methods, and is generally used with a computer. If you want to do a comprehensive analysis of the CAN bus, you need a professional bus analyzer. CANScope is a comprehensive instrument that integrates CAN node testing and calibration, CAN bus fault diagnosis and resolution.

Figure 2 CAN bus packet capture tool and method

3. Application of Multi-channel CAN Card

The bus protocol analysis mentioned above is performed under the premise that there are few bus nodes and the node ID is known. When facing a network with unknown protocol, many nodes and unknown node ID, the first thing to do is to extract the messages in each CAN channel and identify each node ID.

Figure 3 Data separation and extraction

If each node is taken out for testing separately, the original communication rules will inevitably be destroyed. How to figure out an unfamiliar transceiver protocol without destroying the original communication? As the saying goes, if you want to do your work well, you must first sharpen your tools. You need a CAN card that can send, receive and transfer multiple CAN data at the same time. USBCAN-8E-U is such a test tool.

Figure 4 USBCAN-8E-U

USBCAN-8E-U integrates 8 CAN-bus interfaces, and each channel can perform routing (forwarding) functions. When identifying the node ID, the node can be connected to 8 CAN interfaces at the same time, and then the 8-way CAN communication can be freely forwarded to ensure that the original network communication rules are not damaged. The powerful host computer software displays the CAN messages sent and received by each channel separately by channel, and the data analysis is clear at a glance.

Figure 5 Multi-node CAN network analysis

<<:  No wonder your Wi-Fi is so slow if you place your router like this

>>:  Building "China's Most Secure Cloud"! Huawei Cloud Passes the Most Stringent PCI-DSS Security Certification in History

Recommend

IPv6+, a new starting point for the next generation Internet

As of July 2020, the number of users allocated IP...

On the "Kung Fu" of IT Operation and Maintenance

One day, Master Ma was walking on the street and ...

5G has nothing to do with WiFi

A quick note: the Wi-Fi that all of our connected...

What is RedCap technology in 5G R17?

A few days ago, 3GPP announced the freezing of th...

5G new scenarios and technologies bring new security threats

Compared with the traditional mobile Internet sce...

5G technology has just emerged, so don’t rush to pour cold water on it

After 3G and 4G have successively gone from unfam...

5G latency: Why faster networks matter

When you look at your mobile network or home broa...