No Flow Control Message
Posted: Mon 4. Apr 2016, 09:54
Hello,
I want to send a CAN UDS Message with the following data:
CAN ID for ECU request is:0x744 data: 03 22 F1 91 55 55 55 55
CAN ID for ECU Response is 0x7AE.
With the following code, the data 03 22 F1 91 00 00 00 00 is send on the correct CAN ID(0x744)
My ECU Responds on this message.
The Problem is that my PEAK CAN USB Adapter does not send a Flow Control Message, after the first message.
So the ECU wont continue sending data.
Can you help me?
Here is my code:
THANK YOU!
I want to send a CAN UDS Message with the following data:
CAN ID for ECU request is:0x744 data: 03 22 F1 91 55 55 55 55
CAN ID for ECU Response is 0x7AE.
With the following code, the data 03 22 F1 91 00 00 00 00 is send on the correct CAN ID(0x744)
My ECU Responds on this message.
The Problem is that my PEAK CAN USB Adapter does not send a Flow Control Message, after the first message.
So the ECU wont continue sending data.
Can you help me?
Here is my code:
Code: Select all
private void Initialize_Click(object sender, EventArgs e)
{
ushort Channel = UDSApi.PUDS_USBBUS1;
TPUDSStatus result;
TPUDSMsg response = new TPUDSMsg();
byte remoteUds = 0x00;
byte ST_MIN = 10;
byte N_SA = 0x05;
byte N_TA = 0x05;
byte N_RA = 0x00;
uint stmin_old = 0;
uint stmin_new = 10;
UInt32 iBuffer = 0x01;
// Define Address
TPUDSStatus s3 = UDSApi.Initialize(UDSApi.PUDS_USBBUS1, TPUDSBaudrate.PUDS_BAUD_500K);
s3 = UDSApi.SetValue(UDSApi.PUDS_USBBUS1, TPUDSParameter.PUDS_PARAM_SERVER_ADDRESS, ref iBuffer, sizeof(UInt32));
TPCANTPStatus s = CanTpApi.AddMapping(Channel, 0x7AE, CanTpApi.CAN_ID_NO_MAPPING,
TPCANTPIdType.PCANTP_ID_CAN_11BIT,
TPCANTPFormatType.PCANTP_FORMAT_NORMAL,
TPCANTPMessageType.PCANTP_MESSAGE_DIAGNOSTIC,
0x01, 0x02,
TPCANTPAddressingType.PCANTP_ADDRESSING_FUNCTIONAL, 0x00);
s = CanTpApi.AddMapping(Channel, 0x7AE, 0x744,
TPCANTPIdType.PCANTP_ID_CAN_11BIT,
TPCANTPFormatType.PCANTP_FORMAT_NORMAL,
TPCANTPMessageType.PCANTP_MESSAGE_DIAGNOSTIC,
0x0, 0x0,
TPCANTPAddressingType.PCANTP_ADDRESSING_PHYSICAL,
remoteUds);
s = CanTpApi.AddMapping(Channel, 0x744, 0x7AE,
TPCANTPIdType.PCANTP_ID_CAN_11BIT,
TPCANTPFormatType.PCANTP_FORMAT_NORMAL,
TPCANTPMessageType.PCANTP_MESSAGE_DIAGNOSTIC,
0x0, 0x0,
TPCANTPAddressingType.PCANTP_ADDRESSING_PHYSICAL, remoteUds);
CanTpApi.SetValue(Channel, TPCANTPParameter.PCANTP_PARAM_SEPERATION_TIME, ref stmin_new, sizeof(uint));
TPUDSMsg request = new TPUDSMsg();
request.NETADDRINFO.SA = (byte)0x0;
request.NETADDRINFO.TA = (byte)0x0;
request.NETADDRINFO.TA_TYPE = TPUDSAddressingType.PUDS_ADDRESSING_PHYSICAL;
request.NETADDRINFO.RA = 0x00;
request.NETADDRINFO.PROTOCOL = TPUDSProtocol.PUDS_PROTOCOL_ISO_15765_2_11B;
//send 0xF191
// Sends a Physical ReadDataByIdentifier Request
ushort[] buffer = { 0xF191, 0x5555, 0x5555 };
result = UDSApi.SvcReadDataByIdentifier(UDSApi.PUDS_USBBUS1, ref request, buffer,1);
}