Design and Implementation of a CAN-LIN Gateway for Hybrid In-Vehicle Communication Systems
摘要
We’ve built a gateway to connect CAN (Controller Area Network) and LIN (Local Interconnect Network) buses in heavy-duty vehicles and cars. The gateway lies inside a Body Control Module(BCM) and will translate messages between these two protocols that normally can’t communicate with each other. Our setup uses two Raspberry Pi boards with MCP2515 CAN controllers that have an in-built socketCan library which will enable the CAN communication. The frame formats for CAN and LIN are completely different, the bus speed for both were different, and this possessed as the main challenge. We ran around 5,000 test messages of different types, and we got translation accuracy above 99% for the majority of the signals, though we did see some issues with multi-byte data. Latency averaged around 4.7 ms for translated messages, which is higher than expensive commercial gateways but is good enough for body control functions like windows and seats, which is the target for this research.