Dear sir
I used the PCAN-UDS function
status = UDSApi.SvcWriteDataByIdentifier(m_PcanHandle, ref request, (ushort)UDSApi.TPUDSSvcParamDI.PUDS_SVC_PARAM_DI_ASFPDID, buffer, (ushort)buffer.Length);
to send data.the length of data is more than 7 ,but when the ECU send 30 00 05,the remain data did't send.why ?
how to solve it ?
best wishes
The data didn't send
The data didn't send
- Attachments
-
- OYY`2BEE1P1@SL9DVZN[4S7.png (3.12 KiB) Viewed 5195 times
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: The data didn't send
Hello Tina,
The CAN IDs 0x702, 0x70A are not standardized CAN IDs. In order to properly use those CAN IDs in your UDS communication, you need to define 2 "Network Address Information" mappings with the parameter PUDS_PARAM_MAPPING_ADD (one mapping for the communication "to the ECU" and another "from the ECU"):
You will find more information and an example in the PCAN-UDS documentation §4.3.2, p.339.
The CAN IDs 0x702, 0x70A are not standardized CAN IDs. In order to properly use those CAN IDs in your UDS communication, you need to define 2 "Network Address Information" mappings with the parameter PUDS_PARAM_MAPPING_ADD (one mapping for the communication "to the ECU" and another "from the ECU"):
Code: Select all
UDS_SetValue(Channel, PUDS_PARAM_MAPPING_ADD, &message, sizeof(Message));
Best regards,
Fabrice
Fabrice
Re: The data didn't send
Dear sir
sorry ,I didn't understand what you said.
I have mapped the ID like this
TPCANTPStatus result;
uint canID = 0x702;
uint canIDResponse = 0x70A;
byte N_SA =(byte)TPUDSAddress.PUDS_ISO_15765_4_ADDR_TEST_EQUIPMENT;
byte N_TA = (byte)TPUDSAddress.PUDS_ISO_15765_4_ADDR_ECU_8;
byte N_RA = 0x00;
result=CanTpApi.AddMapping (m_PcanHandle ,canID,canIDResponse,TPCANTPIdType.PCANTP_ID_CAN_11BIT , TPCANTPFormatType.PCANTP_FORMAT_NORMAL ,TPCANTPMessageType .PCANTP_MESSAGE_DIAGNOSTIC ,N_SA ,N_TA ,TPCANTPAddressingType .PCANTP_ADDRESSING_PHYSICAL ,N_RA );
result =CanTpApi.AddMapping (UDSApi .PUDS_USBBUS1 ,canIDResponse ,canID,TPCANTPIdType.PCANTP_ID_CAN_11BIT , TPCANTPFormatType.PCANTP_FORMAT_NORMAL ,TPCANTPMessageType .PCANTP_MESSAGE_DIAGNOSTIC ,N_TA,N_SA,TPCANTPAddressingType .PCANTP_ADDRESSING_PHYSICAL ,N_RA );
Do you mean before mapping ,I need to do this
sorry ,I didn't understand what you said.
I have mapped the ID like this
TPCANTPStatus result;
uint canID = 0x702;
uint canIDResponse = 0x70A;
byte N_SA =(byte)TPUDSAddress.PUDS_ISO_15765_4_ADDR_TEST_EQUIPMENT;
byte N_TA = (byte)TPUDSAddress.PUDS_ISO_15765_4_ADDR_ECU_8;
byte N_RA = 0x00;
result=CanTpApi.AddMapping (m_PcanHandle ,canID,canIDResponse,TPCANTPIdType.PCANTP_ID_CAN_11BIT , TPCANTPFormatType.PCANTP_FORMAT_NORMAL ,TPCANTPMessageType .PCANTP_MESSAGE_DIAGNOSTIC ,N_SA ,N_TA ,TPCANTPAddressingType .PCANTP_ADDRESSING_PHYSICAL ,N_RA );
result =CanTpApi.AddMapping (UDSApi .PUDS_USBBUS1 ,canIDResponse ,canID,TPCANTPIdType.PCANTP_ID_CAN_11BIT , TPCANTPFormatType.PCANTP_FORMAT_NORMAL ,TPCANTPMessageType .PCANTP_MESSAGE_DIAGNOSTIC ,N_TA,N_SA,TPCANTPAddressingType .PCANTP_ADDRESSING_PHYSICAL ,N_RA );
Do you mean before mapping ,I need to do this
- Attachments
-
- 4Y9GNFXWGJUZHS_4XL@H1TS.png (82.05 KiB) Viewed 5179 times
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: The data didn't send
Using PCAN-ISO-TP API directly to configure mappings is fine (the parameter PUDS_PARAM_MAPPING_ADD with the UDS SetValue function is just another way to do it).
Regarding your issue, do you confirm that the returned values to your calls to CanTpApi.AddMapping are PCANTP_ERROR_OK? FYI, you are using the channel handle "m_PcanHandle" for the first call and "UDSApi .PUDS_USBBUS1" on the second call...
Please provide a more complete excerpt of your code, if it is the case.
Regarding your issue, do you confirm that the returned values to your calls to CanTpApi.AddMapping are PCANTP_ERROR_OK? FYI, you are using the channel handle "m_PcanHandle" for the first call and "UDSApi .PUDS_USBBUS1" on the second call...
Please provide a more complete excerpt of your code, if it is the case.
Best regards,
Fabrice
Fabrice
Re: The data didn't send
Hi, can I use this thread to ask quick related question?
After hours of looking for an error why my custom mappings didn't work, I found out that SA/TA must be set to 0xF1. (I tried to use SA=0x01 and TA=0x02).
I 0xF1 a must have as SA/TA (depending if i'm transmitting or receiving) ?
Thank you in advance for the answer.
After hours of looking for an error why my custom mappings didn't work, I found out that SA/TA must be set to 0xF1. (I tried to use SA=0x01 and TA=0x02).
I 0xF1 a must have as SA/TA (depending if i'm transmitting or receiving) ?
Thank you in advance for the answer.
Re: The data didn't send
Hello,
0xF1 is the physical address for external test equipment, i.e. the address of the diagnostic application (tester). This is defined in ISO 14229 and ISO 15765-4.
0xF1 is the physical address for external test equipment, i.e. the address of the diagnostic application (tester). This is defined in ISO 14229 and ISO 15765-4.
Best regards,
Keneth
Keneth