SvcReadDataByIdentifier only single frame??

A free API for the communication with control devices according to UDS (ISO 14229-1)
Locked
sojunsoo
Posts: 2
Joined: Wed 24. Nov 2021, 07:32

SvcReadDataByIdentifier only single frame??

Post by sojunsoo » Wed 24. Nov 2021, 07:36

Hello, I have a question about the SvcReadDataByIdentifier_2013 function.

When I use this function, if I use several uds_svc_param_di to request more than five ids, such as {F180, F187, F18A, F180 and F187}, the first message to be sent should be FIRST FRAME, but the SINGLE FRAME is going out.
Expected value:
10 0A 22 F1 80 F1 87 F1
30 00 00
21 8A F1 80 F1 87 55 55

Results:
0A 22 F1 80 F1 87 F1 8A

How can I solve this problem?

F.Vergnaud
Software Development
Software Development
Posts: 274
Joined: Mon 9. Sep 2013, 12:21

Re: SvcReadDataByIdentifier only single frame??

Post by F.Vergnaud » Wed 24. Nov 2021, 10:28

Hello Sojunsoo,

We were not able to reproduce your issue, could you share a sample of your code with the problem?
Here is a modified version of sample "06_client_all_request", it is modified to match your request:

Code: Select all

void testReadDataByIdentifier(cantp_handle channel, uds_msgconfig config) {

	uds_status status;
	uds_msg request;
	uds_msg response;
	//uint16_t data_identifier[2] = { PUDS_SVC_PARAM_DI_ADSDID, PUDS_SVC_PARAM_DI_ECUMDDID };
	uint16_t data_identifier[5] = { 0xF180, 0xF187, 0xF18A, 0xF180, 0xF187 };                                        // <---- MODIFICATION
	uds_msg confirmation;

	memset(&request, 0, sizeof(uds_msg));
	memset(&response, 0, sizeof(uds_msg));
	memset(&confirmation, 0, sizeof(uds_msg));

	CLEAR_CONSOLE;
	printf("\n\n*** UDS Service: ReadDataByIdentifier ***\n");

	// Sends a physical ReadDataByIdentifier message
	printf("\n\nSends a physical ReadDataByIdentifier message: \n");
	//status = UDS_SvcReadDataByIdentifier_2013(channel, config, &request, data_identifier, 2);
	status = UDS_SvcReadDataByIdentifier_2013(channel, config, &request, data_identifier, 5);            // <---- MODIFICATION: size is now 5 
	if (UDS_StatusIsOk_2013(status, PUDS_STATUS_OK, false))
		status = UDS_WaitForService_2013(channel, &request, &response, &confirmation);
	printf(" UDS_SvcReadDataByIdentifier_2013: %i\n", (int)status);
	if (UDS_StatusIsOk_2013(status, PUDS_STATUS_OK, false))
		display_uds_msg(&confirmation, &response, false);
	else
		display_uds_msg(&request, NULL, false);

	// Free messages
	status = UDS_MsgFree_2013(&request);
	printf(" Free request message: %i\n", status);
	status = UDS_MsgFree_2013(&response);
	printf(" Free response message: %i\n", status);
	status = UDS_MsgFree_2013(&confirmation);
	printf(" Free confirmation message: %i\n", status);
	waitGetch();
}
Here is the result:
1 14593.877 DT 07E0 Rx 8 10 0B 22 F1 80 F1 87 F1
2 14595.877 DT 07E8 Rx 8 30 00 00 55 55 55 55 55
3 14596.625 DT 07E0 Rx 8 21 8A F1 80 F1 87 55 55
Best regards,
Fabrice

sojunsoo
Posts: 2
Joined: Wed 24. Nov 2021, 07:32

Re: SvcReadDataByIdentifier only single frame??

Post by sojunsoo » Fri 26. Nov 2021, 02:43

Thank you for your answer.

I found a problem.

The problem was that dlc was set to 0xF.

It's working normally because dlc is set to 0x8.

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

Re: SvcReadDataByIdentifier only single frame??

Post by K.Wagner » Fri 26. Nov 2021, 07:52

Thanks for the feedback. Closed.
Best regards,
Keneth

Locked