I use:
I have this releases:
PCAN-Basic: 4.3.1.158 (13.12.2018)
PCAN-ISO-TP: 2.0.3.111 (07.12.2018)
PCAN-UDS: 1.3.1.30 (01.03.2018)
PCAN-USB FD - IPEH-004022
I'm using:
Windows 10 Pro for Workstations 64 bit
Visual Studio Professional 2017
.Net Framework 4.6.1
I need to read the periodic messages of readDataByPeriodicIdentifier service:
At the moment I can use the service (request to ECU and read first response), but I have no celar idea how to read additional messages (ID 0x258), somebody can help me?
I tried this way:
Code: Select all
/* Init code */
UInt16 channel = UDSApi.PUDS_USBBUS1;
status = UDSApi.Initialize(channel, TPUDSBaudrate.PUDS_BAUD_500K,0,0,0);
uint iBuffer = UDSApi.PUDS_SERVER_ADDR_TEST_EQUIPMENT;
status = UDSApi.SetValue(channel, TPUDSParameter.PUDS_PARAM_SERVER_ADDRESS, ref iBuffer, 1);
TPCANTPStatus tpSrarus = CanTpApi.AddMapping(
channel,
0x7E0,
0x258,
TPCANTPIdType.PCANTP_ID_CAN_11BIT,
TPCANTPFormatType.PCANTP_FORMAT_NORMAL,
TPCANTPMessageType.PCANTP_MESSAGE_DIAGNOSTIC,
0x01,
UDSApi.PUDS_SERVER_ADDR_TEST_EQUIPMENT,
TPCANTPAddressingType.PCANTP_ADDRESSING_PHYSICAL,
0);
/* Polling function */
TPCANTPStatus tp_Statud = CanTpApi.Read(Channel, out TPMsg);
if (tp_Statud == TPCANTPStatus.PCANTP_ERROR_OK)
{
/* process whole message */
}
Riccardo