Page 2 of 2

Re: UDS API

Posted: Mon 7. Jan 2019, 11:52
by hanxueqiong129
Dear
And it is not disabled the testerPresent,I don't know why .And I set someone said
After a call to the service UDS_SvcDiagnosticSessionControl and having received a valid response from an ECU, a session information is registered in the API .If you want to disable the default tester present mechanism, you can only do it after processing that response. I do it like this,but the reault made me sad ,it doesn't worked

Re: UDS API

Posted: Mon 7. Jan 2019, 12:11
by K.Wagner
Seems as you are overriding your variable (configuration) before setting it!

you first configure the values you need to set:

Code: Select all

Marshal.StructureToPtr(sessionInfo, sessionPtr, false);
But instead of setting those, you are asking them again:
status = UDSApi.GetValue(m_PcanHandle, TPUDSParameter.PUDS_PARAM_SESSION_INFO, sessionPtr, (uint)sessionSize);
Your problem is "reading". The first post of us had already the answer... and you said "it is not what you're looking for"; here is a "step by step solution, with code " and you still missed to follow the steps...

It feels like I am wasting my time here! :evil: