read message segment

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
clem69
Posts: 22
Joined: Thu 24. Feb 2022, 18:54

read message segment

Post by clem69 » Thu 23. Mar 2023, 13:27

Hello,

I notice that when I receive an iso tp message with more than 8 bytes of data,
the function UDS_read_2013() first sends a message which allows us to prevent that we are going to receive a segmented message and then we receive the complete message.
can we delete the message that prevents the frame to segment.

thank you

clem69
Posts: 22
Joined: Thu 24. Feb 2022, 18:54

Re: read message segment

Post by clem69 » Thu 23. Mar 2023, 13:45

for instance :

normally I have to receive 2 frames but I receive 4

0x88 CA CA CA 00 00 00 00 00
0x88 00 00 00 00 00 00 00 00

0x88 CA CA CA 00 00 00 00 00
0x88 B2 B0 B1 00 00 00 00 00

I want to receive only the last two frames

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: read message segment

Post by K.Wagner » Thu 23. Mar 2023, 15:08

Hello,

not sure to understand. Please post some code of what you are trying to do in order to better help.

If I understand well, you are sending an UDS request (UDS_Write_2013 ?) and receiving the corresponding confirmation and response. This is the way the protocol works. The confirmation cannot be avoided. If you use the function UDS_WaitForSingleMessage_2013 for dealin with the UDS data, then you can read the confirmation first and discard it, as this function has a parameter (boolean) for this.

Code: Select all

result = UDS_WaitForSingleMessage_2013(PCANTP_HANDLE_USBBUS1, &request, true, 10,
100, &confirmation);

...

result = UDS_WaitForSingleMessage_2013(PCANTP_HANDLE_USBBUS1, &request, false, 10,
100, &response);
Best regards,
Keneth

Post Reply