PCAN UDS Address Mapping

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
Shail
Posts: 25
Joined: Tue 28. Apr 2020, 10:09

PCAN UDS Address Mapping

Post by Shail » Thu 18. Jun 2020, 15:18

Hello,

We are using PCUClient and PCUServer Example code in C++.

Question : In spite of commenting CAN ID Message->DATA.RAW[0] we are able to send request on CAN ID 18DA01FA and 18DAFA01.

(1) What is significance of CAN ID which we are putting in Message->DATA.RAW array?
(2) What is significance of SA and TA ?
(3) is any way we can configure PUDS_ADDRESSING_PHYSICAL and PUDS_ADDRESSING_FUNCTIONAL request with different CAN ID?

PCUClient :
Source : FA Destination : 01
Request CAN ID : 18DA01FA
Response CAN ID : 18DAFA01

// Note: Channel is properly initialized with UDS_Initialize
// Add mapping for physical request from External_Equipment to ECU_X : ID=0x18DA01FA
Message->NETADDRINFO.SA = 0xFA;
Message->NETADDRINFO.TA = 0x01;
Message->NETADDRINFO.TA_TYPE = PUDS_ADDRESSING_PHYSICAL;
Message->NETADDRINFO.RA = 0x00;
Message->NETADDRINFO.PROTOCOL = PUDS_PROTOCOL_ISO_15765_2_29B;
Message->LEN = 8;

// data[0..3] holds CAN ID
Message->DATA.RAW[0] = 0x18;
Message->DATA.RAW[1] = 0xDA;
Message->DATA.RAW[2] = 0xFA;
Message->DATA.RAW[3] = 0x01;
// data[4..7] holds CAN ID Response (for Flow Control) (?1 if none)
Message->DATA.RAW[4] = 0x18;
Message->DATA.RAW[5] = 0xDA;
Message->DATA.RAW[6] = 0x01;
Message->DATA.RAW[7] = 0xFA;

Thanks !

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

Re: PCAN UDS Address Mapping

Post by F.Vergnaud » Thu 18. Jun 2020, 15:45

Hello Shail,

You're mixing a lot of things, before further development you should have a look at the documentation "UDS and ISO-TP Network Addressing Information" §4.3 page 339: It explains the default mapping configuration when you initialize a UDS channel.
Please also check §4.3.2 page 342, to understand when you need to configure mapping and what it means (it will answer your questions regarding Source and Target addresses).

You want to make 29 bit standardized UDS communication because your CAN IDs match the format 0x18DAXXYY, thus you do not need to configure mapping. It is automatically handled by the API.
If you want different CAN IDs, then do not use protocol PUDS_PROTOCOL_ISO_15765_2_29B, but 11B ones (or 29B_NORMAL) and configure mappings as showed in the documentation page 343.
Best regards,
Fabrice

Shail
Posts: 25
Joined: Tue 28. Apr 2020, 10:09

Re: PCAN UDS Address Mapping

Post by Shail » Tue 23. Jun 2020, 12:08

Hello,

Thanks for explanation.
Initially we only used to refer 4.3.3 PCAN-UDS Example.

Thanks.

Post Reply