Functional Address
Posted: Tue 19. Mar 2019, 13:09
Hello,
I am trying to define custom functional address 0x750. First of all I defined network address info:
Then I try to send using this part of code:
Everything works fine, but ID of sent message is 0x7DF (as defined in ISO) and I want it to use ID 0x750 so I tried to add mapping:
Mapping returns no error, but functional still uses 0x7FD. How can I force to send functional messages with ID 0x750?
I am trying to define custom functional address 0x750. First of all I defined network address info:
Code: Select all
// Define functional address
TPUDSNetAddrInfo AddressInfoFunctional = new TPUDSNetAddrInfo
{
SA = (byte)TPUDSAddress.PUDS_ISO_15765_4_ADDR_TEST_EQUIPMENT,
TA = (byte)TPUDSAddress.PUDS_ISO_15765_4_ADDR_OBD_FUNCTIONAL,
TA_TYPE = TPUDSAddressingType.PUDS_ADDRESSING_FUNCTIONAL,
RA = 0x00,
PROTOCOL = TPUDSProtocol.PUDS_PROTOCOL_ISO_15765_2_11B
};
Code: Select all
// Part used to send
TPUDSMsg msg = new TPUDSMsg { NETADDRINFO = AddressInfoFunctional };
msg.DATA = new byte[4095];
// here put bytes into message
TPUDSStatus statusSendMsg = UDSApi.Write(Channel, ref msg);
Code: Select all
// Define ISO-TP communication from Tester to All (functional requests)
TPCANTPStatus status = CanTpApi.AddMapping(
Channel,
functionalId,
CanTpApi.CAN_ID_NO_MAPPING,
TPCANTPIdType.PCANTP_ID_CAN_11BIT,
TPCANTPFormatType.PCANTP_FORMAT_NORMAL,
TPCANTPMessageType.PCANTP_MESSAGE_DIAGNOSTIC,
AddressInfo.SA,
AddressInfo.TA,
TPCANTPAddressingType.PCANTP_ADDRESSING_FUNCTIONAL,
0x00);