A free API for the communication with control devices according to UDS (ISO 14229-1)
-
RicoBer
- Posts: 2
- Joined: Tue 19. Mar 2019, 17:42
Post
by RicoBer » Tue 19. Mar 2019, 17:49
Hello everyone,
I'm trying to send large amounts of data (a few kBytes) and want to use the APIs own Options.
So I'm starting of with the SvcRequestDownload (no comp/encryp) and other correct data.
Next I want to use SvcTransferData.
Example data as follows:
Code: Select all
byte[] Buffer = new byte[2000]; (with content)
ushort bufferLength = 2000;
UDSApi.SvcTransferData(UDSApi.PUDS_USBBUS1, ref request, 0x01, Buffer, bufferLength);
But only the First Frame with the first 4 Bytes is sent, the other data is not sent out.
What steps do I have to take to send all the data?
And is it possible to track the progress of the sending?
Thanks in Advance!
-
K.Wagner
- Software Development

- Posts: 1080
- Joined: Wed 22. Sep 2010, 13:36
Post
by K.Wagner » Wed 20. Mar 2019, 09:08
Hello,
RicoBer wrote:But only the First Frame with the first 4 Bytes is sent, the other data is not sent out.
note that UDS is a protocol based on communication between a tester (client) and an ECU (server). When you send large messages, there is a handshake between participants. If you just see one package out would mean that your ECU is not responding to this and that is why the message is not transmitted.
RicoBer wrote:And is it possible to track the progress of the sending?
You can use a PCAN-View for data tracing. Just connect the PCAN-View to the same channel your application is using for UDS and start a trace. Alternative, you can use the underlying PCAN-Basic API. Use the same channel handle that you have initialized with UDS with the function CAN_Setvalue to start a trace. In this way PCAN-Basic will generate a trace file with all CAN data used by UDS. More information for this can be found in the PCAN-Basic documentation files, for instance, "PCAN-Parameter_Documentation.pdf".
Best regards,
Keneth
-
RicoBer
- Posts: 2
- Joined: Tue 19. Mar 2019, 17:42
Post
by RicoBer » Wed 20. Mar 2019, 09:49
Hello,
sorry, I should have been more clearer.
For the first question, the ECU does respond, I am reading CAN bus traffic while transmitting. But the function does not continue sending the other data. Does the function wait for a specific answer or just a general one?
For the second question, I am aware that I can read traffic while it is sent, I am asking more for a sending progress in the application, like 'Block 15 of 92 sending'.
EDIT: I have just read that you wrote I can use the UDS parameters for this, I will try this.
With regards,
Rico