why mapping the functional adressing with 0x7DF doesn`t work

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
Aaron
Posts: 1
Joined: Mon 21. May 2018, 05:17

why mapping the functional adressing with 0x7DF doesn`t work

Post by Aaron » Tue 22. May 2018, 10:18

Hi:
I am using the pcan_uds.dll to develop a software to download the application program first, i have to use the TP_AddMapping function to map the CANID with the SA and TA, when the targetType is PCANTP_ADDRESSING_PHYSICAL the function works well, but when i use PCANTP_ADDRESSING_FUNCTIONAL with the CANID 0x7DF, it show out the CANID is already mapped.Maybe the pcan_uds.dll use the 0x7DF as functional adressing acquiescently,then i delete the 7DF mapping, but when i use the diagnosticSessionControl service, the request does not send out,so i am very confusing about this question, look up forword for your help!! below is my code.

Code: Select all

 	tpStatus = m_pTP_AddMapping(m_PcanHandle, 0x702, 0x782,
                         PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
                         N_AI.SA, N_AI.TA, PCANTP_ADDRESSING_PHYSICAL, 0x00);

        qDebug() << "addMapping 1" <<  tpStatus;

        tpStatus = m_pTP_AddMapping(m_PcanHandle, 0x782, 0x702,
                         PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
                         N_AI.TA, N_AI.SA, PCANTP_ADDRESSING_PHYSICAL, 0x00);

        qDebug() << "addMapping 2" <<  tpStatus;

        tpStatus = m_pTP_AddMapping(m_PcanHandle, 0x7DF, CAN_ID_NO_MAPPING,
                         PCANTP_ID_CAN_11BIT, PCANTP_FORMAT_NORMAL, PCANTP_MESSAGE_DIAGNOSTIC,
                         N_AI.SA, N_AI.TA, PCANTP_ADDRESSING_FUNCTIONAL, 0x00);

        qDebug() << "addMapping 3" <<  tpStatus;        //the tpStatus is 2.
Last edited by M.Gerber on Tue 22. May 2018, 11:49, edited 1 time in total.
Reason: Added [code] tag to improve readability

K.Wagner
Software Development
Software Development
Posts: 1082
Joined: Wed 22. Sep 2010, 13:36

Re: why mapping the functional adressing with 0x7DF doesn`t

Post by K.Wagner » Wed 23. May 2018, 10:16

Hello,

You cannot add a mapping for the CAN-ID 0x7DF. This ID is reserved, as it is defined within the document PUDS ISO_15765_4 to be the 11-Bit ID for functional request. This is defined within the header file:
CAN-ID definitions for UDS
CAN-ID definitions for UDS
UDS-FunctionalID.PNG (30.73 KiB) Viewed 3241 times
In order to use the functional address with services like DiagnosticSessionControl you need to set the right Network Address Information. For your case, you should use something like this:

Code: Select all

        TPUDSStatus Status;
        TPUDSNetAddrInfo N_AI;
        TPUDSMsg Message = {};

        N_AI.SA = PUDS_ISO_15765_4_ADDR_TEST_EQUIPMENT;
        N_AI.TA = PUDS_ISO_15765_4_ADDR_OBD_FUNCTIONAL;
        N_AI.TA_TYPE = PUDS_ADDRESSING_FUNCTIONAL;
        N_AI.RA = 0x00;
        N_AI.PROTOCOL = PUDS_PROTOCOL_ISO_15765_2_11B;

        Message.NETADDRINFO = N_AI;
        Status = UDS_SvcDiagnosticSessionControl(Channel, &Message, PUDS_SVC_PARAM_DSC_DS);
Best regards,
Keneth

Post Reply