AUTOSAR (AUTomotive Open System Architecture) defines a set of supporting distributed, function-driven software development methods and automotive electronic control units on the software architecture standardization program. KWP2000 (Keyword Protocol 2000) is a widely used automotive vehicle diagnostic protocol, the protocol to achieve a complete vehicle diagnostic services, and meet the OBDII (On Board Diagnose II) standard. This article describes the whole process which the KWP2000 communication software components based on K-line is designed in the MATLAB platform according to the AUTOSAR standard. The simulation tests and real tests showed good diagnostic performance of communication software. The software development methodology according to AUTOSAR not only improves the reusability and portability, but also reduces the software development lifecycle.