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?
PCAN-UDS functions using CAN FD
Re: PCAN-UDS functions using CAN FD
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.
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
Keneth
Re: PCAN-UDS functions using CAN FD
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?
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?
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: PCAN-UDS functions using CAN FD
Hello,
The message type is wrong: you're using a PCAN type instead of a PCANTP message type. It should be:
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
Fabrice