Decoding Trouble Codes with the PLX Devices Kiwi Bluetooth OBDII Adapter

The Plx Devices Kiwi Bluetooth Obdii Adapter is a powerful tool for diagnosing vehicle issues. This article delves into a code snippet that demonstrates how to request and interpret trouble codes using a PLX Kiwi device. Understanding this process is crucial for anyone who wants to leverage the full potential of their OBDII adapter.

Understanding the Code: Requesting Trouble Codes

The provided code outlines a function, RequestTroubleCodes, designed to retrieve diagnostic trouble codes (DTCs) from a vehicle’s onboard computer using a PLX Kiwi Bluetooth OBDII adapter. The code differentiates between communication protocols, handling both CAN and non-CAN protocols.

Non-CAN Protocol Handling

For non-CAN protocols, the code initiates communication by sending a specific sequence of characters (‘0’, ‘3’, carriage return) via the WriteTCP function. It then enters a loop, using DataRdyTCP and ReadTCP functions to sequentially read the incoming data bytes representing the trouble codes. Each byte is stored in separate variables (b0, b1, b2… b11). The code includes multiple while(!DataRdyTCP()); loops to ensure that data is available before attempting to read it, preventing potential errors. This careful handling of data ensures reliable retrieval of DTCs.

CAN Protocol Handling

The code’s approach to CAN protocols is more complex, accommodating scenarios with varying numbers of trouble codes. For single or double trouble codes, a similar sequence of sending requests and reading responses is followed. However, for three or more codes, the code utilizes a delimiter (‘:’) to separate code sequences, enabling it to read and process multiple DTCs accurately. The use of a delimiter signifies a more robust approach to handling potentially longer data streams encountered when retrieving multiple DTCs. This section highlights the adapter’s ability to efficiently handle different data structures.

Universal Error Code Handling

Regardless of the protocol, the received data bytes are ultimately stored in global variables (errb0, errb1, etc.). This allows for consistent processing and interpretation of DTCs. The code then waits for an “OK>” response, signaling the successful completion of the request, ensuring all data has been transmitted.

Interpreting Trouble Codes: The ErrorCodePrefix Function

Another crucial function, ErrorCodePrefix, translates the first byte of each DTC (b0) into a standardized DTC prefix. This prefix (P, C, B, U) categorizes the type of fault detected:

  • P: Powertrain (engine, transmission, emissions)
  • C: Chassis (ABS, steering, suspension)
  • B: Body (airbags, lighting, power seats)
  • U: Network Communication (CAN bus, modules)

This function is vital for understanding the nature of the detected fault, allowing users to pinpoint the system requiring attention. By providing this context, the PLX Kiwi adapter empowers users to make informed decisions about vehicle maintenance and repair.

Identifying Communication Protocols: The GetProtocol Function

The GetProtocol function determines the communication protocol (CAN or other) used by the vehicle. It sends a command (‘atdp’ followed by a carriage return) and analyzes the response string. Identifying the presence of the character sequence “157” indicates a CAN protocol. This automatic protocol detection feature simplifies the diagnostic process, ensuring the adapter communicates correctly with the vehicle.

Conclusion: PLX Devices Kiwi Bluetooth OBDII Adapter – A Comprehensive Diagnostic Solution

The code analysis demonstrates the comprehensive capabilities of the PLX Devices Kiwi Bluetooth OBDII Adapter. Its ability to handle various communication protocols, retrieve and interpret DTCs, and categorize fault types makes it a valuable tool for car enthusiasts and professionals alike. By enabling users to understand the underlying communication and data interpretation processes, the PLX Kiwi empowers them to take control of vehicle diagnostics and maintenance. The adapter’s versatility and sophisticated functionality make it a powerful asset for anyone seeking to understand and address vehicle issues effectively.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *