Hi,
One of my project requires an application to read & write from an ECU using PCAN-UDS & ISOTP. I have used the sample code using c# 10_client_uds_and_isotp.
For testing the ECU, i used the PCAN-View and was able to read the 8 byte results. For reading the larger frame results tried using ISOTP.
Getting NOT OK status in "Add a sample isotp mapping" and "Add the reverse isotp mapping". I have attached the output and the codes for reference.
The following data is shared by the customer with regard to the ECU address.
1. Now to check UDS you have to send all queries to : 0x1BDA08F1 and get responses from 0x1BDAF108
2. Sample query sent 03 22 22 0F 00 00 00 00 and the result received 05 62 22 0F EC 00 00 00 (this was verified by us using PCAN View)
By sending Data: 22 F1 91; ExtendedData: ; Header: 1B DA 08 F1
we should be able to read : Data: 62 F1 91 35 30 34 35 31 36 31 39 32 30 30 31 5F 30 41; ExtendedData: ; Header: 1B DA F1 08
Can you please help us and tell us what needs to be corrected ?
APPLICATION USING PCAN-UDS & ISOTP
-
- Posts: 1
- Joined: Mon 17. Mar 2025, 10:31
APPLICATION USING PCAN-UDS & ISOTP
- Attachments
-
- PCAN_ISOTP_Code-10042025.xlsx
- (119.95 KiB) Downloaded 1877 times
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: APPLICATION USING PCAN-UDS & ISOTP
Hello,
I think you took an example that doesn't really match your need:
- based on your description, you only need to do UDS communication,
- the ISOTP part is for transport and is managed by the PCAN-UDS API.
You should draft your code application with sample 02_client_request_ecu_reset_USDT.
Your customer mentions non-standardized 29bit CAN IDs to communicate with the ECU, so you have to configure specific mappings to be able to communicate:
- please check documentation to read more information on this: p.774, §4.3.3 "PCAN-UDS 2.x Example - Configuration of Mappings".
- make sure to adapt the configuration to your need: you have to use 29 bit normal addressing
- and keep in mind to add 2 mappings: one for the request "Tester to ECU", and its reverse for response "ECU to Tester"
- here is some extra help on how it should be configured:
Finally your sample query is actually a UDS ReadDataByIdentifier request (Service 0x22) with parameter 0xF191:
- you should call function SvcReadDataByIdentifier_2013.
- and read the response with function WaitForService_2013.
I think you took an example that doesn't really match your need:
- based on your description, you only need to do UDS communication,
- the ISOTP part is for transport and is managed by the PCAN-UDS API.
You should draft your code application with sample 02_client_request_ecu_reset_USDT.
Your customer mentions non-standardized 29bit CAN IDs to communicate with the ECU, so you have to configure specific mappings to be able to communicate:
- please check documentation to read more information on this: p.774, §4.3.3 "PCAN-UDS 2.x Example - Configuration of Mappings".
- make sure to adapt the configuration to your need: you have to use 29 bit normal addressing
- and keep in mind to add 2 mappings: one for the request "Tester to ECU", and its reverse for response "ECU to Tester"
- here is some extra help on how it should be configured:
Code: Select all
mapping.can_id = 0x1BDA08F1;
mapping.can_id_flow_ctrl = 0x1BDAF108;
mapping.can_msgtype = PCANTP_CAN_MSGTYPE_EXTENDED;
mapping.can_tx_dlc = 8;
mapping.nai.extension_addr = 0;
mapping.nai.protocol = PUDS_MSGPROTOCOL_ISO_15765_2_29B_NORMAL;
mapping.nai.source_addr = PUDS_ISO_15765_4_ADDR_TEST_EQUIPMENT;
mapping.nai.target_addr = 0x08;
mapping.nai.target_type = PCANTP_ISOTP_ADDRESSING_PHYSICAL;
- you should call function SvcReadDataByIdentifier_2013.
- and read the response with function WaitForService_2013.
Best regards,
Fabrice
Fabrice