PCAN-UDS functions using CAN FD

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
Alfred
Posts: 3
Joined: Tue 9. Oct 2018, 10:48

PCAN-UDS functions using CAN FD

Post by Alfred » Tue 9. Oct 2018, 11:05

I'm using the PCAN-UDS.dll and the handle is initialised:
TPUDSCANHandle Channel;
TPUDSStatus status;
Channel = PUDS_USBBUS1;
status = UDS_Initialize(Channel, PUDS_BAUD_500K, 0, 0, 0);

For the requests the address infos are set in this kind:
NETADDRINFO->SA = PUDS_ISO_15765_4_ADDR_TEST_EQUIPMENT;
NETADDRINFO->TA = 0;
NETADDRINFO->TA_TYPE = PUDS_ADDRESSING_PHYSICAL;
NETADDRINFO->RA = 0x00;
NETADDRINFO->PROTOCOL = PUDS_PROTOCOL_ISO_15765_2_29B;

All is working without problems but now I must switch to CAN FD Messages. How I can make this in this PCAN-UDS system?

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

Re: PCAN-UDS functions using CAN FD

Post by K.Wagner » Tue 9. Oct 2018, 11:19

Hello,

PCAN-UDS doesn't support CAN-FD. As far as we know there is still no CAN-FD official specification for CAN-FD on UDS.

Our PCAN-UDS API uses as underlying transport protocol the API PCAN-ISO-TP. This last one supports CAN-FD. You could use this API directly by building your own UDS communication on this, taking care of UDS related processes by yourself.

Note: If you just want to use a PCAN-USB FD device instead of a PCAN-USB, then you don't have to change anything in your code. All adapters from PEAK are compatible with the current PCAN-UDS API.
Best regards,
Keneth

Alfred
Posts: 3
Joined: Tue 9. Oct 2018, 10:48

Re: PCAN-UDS functions using CAN FD

Post by Alfred » Tue 23. Oct 2018, 13:20

Hallo,

Now I try to realise UDS commands via ISO-TP (in the first step without FD) for this device:

WORD st = CANTP_Initialize(PCANTP_USBBUS1, PCANTP_BAUD_500K);
TPCANTPMsg request = {0};
request.SA = PUDS_ISO_15765_4_ADDR_TEST_EQUIPMENT;
request.TA_TYPE = PUDS_ADDRESSING_PHYSICAL;
request.IDTYPE = PCANTP_ID_CAN_29BIT;
request.MSGTYPE = PCAN_MESSAGE_EXTENDED;
request.FORMAT = PCANTP_FORMAT_FIXED_NORMAL;
request.LEN = 3; // Data Length Code of the message
request.DATA[0] = 2;
request.DATA[1] = 0x11; // command ECUReset
request.DATA[2] = 0x01;
st = CANTP_Write(PCANTP_USBBUS1, &request);

But the function CANTP_Write() always returns the error 8 - what is missing again?

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

Re: PCAN-UDS functions using CAN FD

Post by F.Vergnaud » Tue 23. Oct 2018, 13:31

Hello,

The message type is wrong: you're using a PCAN type instead of a PCANTP message type. It should be:

Code: Select all

 request.MSGTYPE = PCANTP_MESSAGE_DIAGNOSTIC;
Best regards,
Fabrice

Post Reply