Security Access call failing with error 11 - serviceNotSupported

A free API for the communication with control devices according to UDS (ISO 14229-1)
Locked
vmedvedev
Posts: 4
Joined: Sun 28. Apr 2024, 19:39

Security Access call failing with error 11 - serviceNotSupported

Post by vmedvedev » Wed 8. May 2024, 00:26

Hi,
I am trying to run SvcSecurityAccess_2013 to get a seed. I am using custom ECU so I deleted mappings and add custom mapping

Code: Select all

cantp_status mappingResult;
uds_mapping request_mapping = new uds_mapping();
uds_mapping response_mapping;
request_mapping.can_id = 0x781;
request_mapping.can_id_flow_ctrl = 0x7F1;
request_mapping.nai.source_addr = 0x11;
request_mapping.nai.target_addr = 0x22;
request_mapping.nai.extension_addr = 0x0;
request_mapping.can_msgtype = cantp_can_msgtype.PCANTP_CAN_MSGTYPE_STANDARD;// cantp_can_msgtype.PCANTP_CAN_MSGTYPE_STANDARD;
request_mapping.nai.protocol = uds_msgprotocol.PUDS_MSGPROTOCOL_ISO_15765_2_11B_NORMAL;// cantp_isotp_format.PCANTP_ISOTP_FORMAT_NORMAL;
//request_mapping.nai.msgtype = cantp_isotp_msgtype.PCANTP_ISOTP_MSGTYPE_DIAGNOSTIC;
request_mapping.nai.target_type = cantp_isotp_addressing.PCANTP_ISOTP_ADDRESSING_PHYSICAL;

// Defines a second mapping to allow communication from Destination 0x22 to Source 0x11.
response_mapping = request_mapping;
response_mapping.can_id = request_mapping.can_id_flow_ctrl;
response_mapping.can_id_flow_ctrl = request_mapping.can_id;
response_mapping.nai.source_addr = request_mapping.nai.target_addr;
response_mapping.nai.target_addr = request_mapping.nai.source_addr;
Then I created message configuration

Code: Select all

uds_msgconfig config = new uds_msgconfig();
config.can_id = (UInt16)0x781;

config.can_msgtype = cantp_can_msgtype.PCANTP_CAN_MSGTYPE_STANDARD;
config.nai.protocol = uds_msgprotocol.PUDS_MSGPROTOCOL_ISO_15765_2_11B_NORMAL;
config.nai.target_type = cantp_isotp_addressing.PCANTP_ISOTP_ADDRESSING_PHYSICAL;
config.type = uds_msgtype.PUDS_MSGTYPE_USDT;//usdt
config.nai.source_addr = (UInt16)0x11;
config.nai.target_addr = (UInt16)0x22;
and tried to run command

Code: Select all

uds_status status;
uds_msg request = new uds_msg();
uds_msg response = new uds_msg();
uds_msg confirmation = new uds_msg();
UInt32 dw_buffer;
UInt32 value_little_endian;

CLEAR_CONSOLE();
Console.WriteLine("*** UDS Service: SecurityAccess ***");

// Sends a physical SecurityAccess message
Console.WriteLine("Sends a physical SecurityAccess message: ");
status = UDSApi.SvcSecurityAccess_2013(channel, config, out request, UDSApi.PUDS_SVC_PARAM_SA_RSD_1);
if (UDSApi.StatusIsOk_2013(status))
    status = UDSApi.WaitForService_2013(channel, ref request, out response, out confirmation);
Console.WriteLine(" UDS_SvcSecurityAccess_2013: {0}", (int)status);
if (UDSApi.StatusIsOk_2013(status))
    display_uds_msg(ref confirmation, ref response, false);
else
    display_uds_msg_request(ref request, false);
getting back message 03 7F 27 11 which from my understanding means servicenotsuported
securityerror.png
securityerror.png (165.41 KiB) Viewed 2133 times
Could you suggest what I am doing wrong. Using other program everything works fine.
Thank you.

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

Re: Security Access call failing with error 11 - serviceNotSupported

Post by K.Wagner » Wed 8. May 2024, 16:53

Hello,

sorry, but this goes beyond our support. The answer is comming form the ECU stating that it cannot handle your request. Since the error code is not comming from our API but from the ECU itself, you need to check yourself why your ECU is denying to process your request. Since this is a security access you may not have the required rights to do so.
Best regards,
Keneth

Locked