For instance if i'm trying to connect to a specific loader using the connect command with a key in bytes 3-8 similar to:
01 00 23 58 D2 22 90 99
How would I go about building this message using your C# CCP API?
This information is passed to the PCAN-CCP Api using a structure defined for it. The Api comes together with sample code in different programming languages, one of them is C#. Please look at it for more information.
Thanks for the quick reply.
I have reviewed the included C# materials in great detail but I am still missing something then. With the following code:
CCPResult result = new CCPResult(CCPApi.Connect(m_Channel, ref m_SlaveData, out m_PccpHandle, 1000));
Connect is merely looking for:
[DllImport("PCCP.dll", EntryPoint = "CCP_Connect")]
public static extern TCCPResult Connect(
ref TCCPSlaveData SlaveData,
out TCCPHandle CcpHandle,
the CCPApi command constructors do not include a "Data" field to include additional data - so I can only assume that the first 3 data bytes matter (Command Code, Command Counter, Station Address) and the remaining cannot be edited.
If i'm mistaken I would love help understanding how to do this.
PCAN-CCP Documentation->Introduction->About PCAN-CCP->CCP Commands vs. API Funcitons
Code: Select all
Command Transmission: The CCP API provides one function for each CCP command described within the document “CAN Calibration Protocol Version 2.1” from ASAP. In this way, calling a function causes: *The sending of the associated command with its parameters, if it has some. *The synchronnous wait for the DTO (response) to the command sent. *In case of a positive response, the return of the information associated to that command. *In case of a negative response, the error code as function returned code.
sammonsd wrote:01 00 23 58 D2 22 90 99
- 01 is automatically sent withint the function command CCP_Connect. 01 --> Command Code CONNECT 0x01
- 00 is internally used, that is, you don't need to pass this neather.00 --> Command Counter = CTR
- 23 58 is the ECU Address which receives the command (included within the TCCPSlaveData structure passed to the CCP_Connect function). 23 58 --> station address
- D2 22 90 99 This is not used. The Specification says: "4...7 bytes don't care"