Hello, thank you for your help!
1) <the target address was 0x01 instead of 0x33”>
I've changed the content here :“PUDS_ADDRESS_ISO_15765_4_ADDR_ECU_1 = 0x33 ”
2) <a variable "channel" was used instead of "client_handle">
You are right. This is an error in the code I posted
3) I added the function code of of the function SvcRequestDownload_2013:
Code: Select all
status = UDSApi.SvcRequestDownload_2013(channel, config, out request, 0x00, 0x00, lBufferMemAddr, (byte)lBufferMemAddr.Length, lBufferMemSize, (byte)lBufferMemSize.Length);
if (UDSApi.StatusIsOk_2013(status))
status = UDSApi.WaitForService_2013(channel, ref request, out response, out confirmation);
Console.WriteLine(" UDS_SvcRequestDownload_2013: {0}", (int)status);
if (UDSApi.StatusIsOk_2013(status))
display_uds_msg(ref confirmation, ref response, false);
else
display_uds_msg_request(ref request, false);
// Free messages
status = UDSApi.MsgFree_2013(ref request);
Console.WriteLine(" Free request message: {0}", (int)status);
status = UDSApi.MsgFree_2013(ref response);
Console.WriteLine(" Free response message: {0}", (int)status);
status = UDSApi.MsgFree_2013(ref confirmation);
Console.WriteLine(" Free confirmation message: {0}", (int)status);
Program run result and he Consecutive frame is not sent by the API.
As shown below message:
Code: Select all
11:01:09:0640 Rx 1 0x18DA33F1 x 8 10 0B 34 00 44 00 01 00
11:01:09:0644 Rx 1 0x18DAF133 x 8 30 10 05 FF 00 00 B2 00
11:01:09:0658 Rx 1 0x18DAF133 x 8 30 00 00 55 55 55 55 55
Console:
Code: Select all
*** UDS Service: RequestDownload ***
UDS_SvcRequestDownload_2013: 654311424
UDS request from 0x00F1 (to 0x0033, with extension address 0x00) - result: 0 - OK !
-> Length: 11, Data= 34 00 44 00 01 00 00 00 04 00 00
/!\ ERROR: NO UDS RESPONSE !!
Free request message: 0
Free response message: 0
Free confirmation message: 0
4) If I add code of "PCANBasic.Write(PCANBasic.PCAN_USBBUS1, ref CANMsg)" to send Consecutive frame, then the ECU can give positive feedback.