as mentioned in your documentation it should be possible to disable the periodic TestPresent requests.
We have the problem as mentioned in earlier posts, that the ECU has some problems with successive TransferData requests and responses. Our partner how did the ECU UDS counterpart says while waiting for a response the TestPresent requests could be a problem. So we want to disable them for testing.Note: this only affects the API client side ONLY, no communication with any ECUs is made. If a user wants
to disable the automatic transmission of TesterPresent requests that keeps alive a non‐default diagnostic
session, he/she should set the SESSION_TYPE to the default diagnostic session
(TPUDSSvcParamDSC.PUDS_SVC_PARAM_DSC_DS).
It is assumed that the channel was already initialized and the user retrieved the current session
information with the GetValue API function.
Here's the code, but it does not seem to work. We still get TesterPresent while waiting for responses.
Code: Select all
TPUDSSessionInfo session = {};
TPUDSStatuss = UDS_GetValue( ch, PUDS_PARAM_SESSION_INFO, &session, sizeof(TPUDSSessionInfo));
std::cout << "get session: " << PcanUdsUtils::toMessage( s ).toString() << std::endl;
session.SESSION_TYPE = PUDS_SVC_PARAM_DSC_DS;
s = UDS_SetValue( ch, PUDS_PARAM_SESSION_INFO, &session, sizeof(TPUDSSessionInfo));
std::cout << "set session: " << PcanUdsUtils::toMessage( s ).toString() << std::endl;
Thanks,
Tobias