Click here for back issues.
https://www.simulationroom999.com/blog/diagnostic-communication-en-back-issue/
Introduction.
AUTOSAR-Dcm simulation explanation.
In this article, the simulation results of TesterPresents will be explained.
Results of TesterPresents simulation (message)
For a review of TesterPresents, you may want to refer to the following article.
The simulation results are then shown as follows.
Send msg : 3e00 // TesterPresents
Recv msg : 7e00 //
Send msg : 3e0000 // wrong message length for TesterPresents
Recv msg : 7f3e13 // NRC$13(incorrectMessageLengthOrInvalidFormat)
Send msg : 3e01 // missing sub-function in TesterPresents
Recv msg : 7f3e12 // NRC$12(subFunctionNotSupported)
Send msg : 3e80 // TesterPresents(suppressPosRspMsgIndicationBit exists)
Send msg : 3e8000 // TesterPresents message length wrong (with suppressPosRspMsgIndicationBit)
Send msg : 3e81 // missing sub-function in TesterPresents (suppressPosRspMsgIndicationBit present)
Send msg : 1003 // Go to extendDiagnosticSession
Recv msg : 5003003001f4 // P2 time=48[ms],P2*time=5000
Send msg : 2713 // Seed request
Recv msg : 6713deadbeef // Seed=0xdeadbeef
Send msg : 2714deadbeef // Send Key (Key=0xdeadbeef)
Recv msg : 6714 // send key (Key=0xdeadbeef)
sleep : 4.900000 [ms] // 4.900[ms] Wait
Send msg : 3e80 // TesterPresents(suppressPosRspMsgIndicationBit exists)
sleep : 4.900000 [ms] // 4.900[ms] Wait
Send msg : 3e80 // TesterPresents(suppressPosRspMsgIndicationBit exists)
sleep : 4.900000 [ms] // 4.900[ms] Wait
Send msg : 2713 // Seed request
Recv msg : 671300000000 // Seed=0x00000000 (keep security unlocked)
sleep : 5.100000 [ms] // 5.100[ms] Wait
Send msg : 2713 // Seed request
Recv msg : 7f277f // NRC$7F(serviceNotSupportedInActiveSession)
Exiting
Results of TesterPresents simulation (CAN lines)
The above results are shown in the CAN line log.
Begin Triggerblock
0.000000 Start of measurement
//TesterPresents
0.000000 1 18DA10F1x Rx d 8 02 3E 00 CC CC CC CC
0.009879 1 18DAF110x Rx d 8 02 7E 00 55 55 55 55 55
// Wrong message length for TesterPresents
0.013959 1 18DA10F1x Rx d 8 03 3E 00 00 CC CC CC CC
0.015892 1 18DAF110x Rx d 8 03 7F 3E 13 55 55 55 55
// esterPresents sub-functions that do not exist
0.018858 1 18DA10F1x Rx d 8 02 3E 01 CC CC CC CC
0.020791 1 18DAF110x Rx d 8 03 7F 3E 12 55 55 55 55
// TesterPresents(suppressPosRspMsgIndicationBit available)
0.025125 1 18DA10F1x Rx d 8 02 3E 80 CC CC CC CC
// Wrong message length for TesterPresents (with suppressPosRspMsgIndicationBit)
0.072778 1 18DA10F1x Rx d 8 03 3E 80 00 CC CC CC CC
// Sub-function without TesterPresents (with suppressPosRspMsgIndicationBit)
0.123699 1 18DA10F1x Rx d 8 02 3E 81 CC CC CC CC
// Transition to extendDiagnosticSession
0.177447 1 18DA10F1x Rx d 8 02 10 03 CC CC CC CC CC
0.179364 1 18DAF110x Rx d 8 06 50 03 00 30 01 F4 55
// Seed request
0.183533 1 18DA10F1x Rx d 8 02 27 13 CC CC CC CC CC
0.186343 1 18DAF110x Rx d 8 06 67 13 DE AD BE EF 55
// Send Key (Key=0xdeadbeef)
0.192594 1 18DA10F1x Rx d 8 06 27 14 DE AD BE EF CC
0.195322 1 18DAF110x Rx d 8 02 67 14 55 55 55 55
// 4.900[ms] Wait
// TesterPresents(suppressPosRspMsgIndicationBit available)
5.100740 1 18DA10F1x Rx d 8 02 3E 80 CC CC CC CC CC
// 4.900[ms] Wait
// TesterPresents(with suppressPosRspMsgIndicationBit)
10.052895 1 18DA10F1x Rx d 8 02 3E 80 CC CC CC CC
// 4.900[ms] Wait
// Seed request
15.003722 1 18DA10F1x Rx d 8 02 27 13 CC CC CC CC CC
15.005786 1 18DAF110x Rx d 8 06 67 13 00 00 00 00 55
// 5.100[ms] Wait
// Seed request
20.110475 1 18DA10F1x Rx d 8 02 27 13 CC CC CC CC CC
20.112540 1 18DAF110x Rx d 8 03 7F 27 7F 55 55 55 55
End TriggerBlock
Considerations for the results of the TesterPresents simulation
In the case of TesterPresents, if suppressPosRspMsgIndicationBit is present, NRC is not returned even for error patterns.
This is a violation of the ISO 14229-1 standard because the NRC should be returned even if the suppressPosRspMsgIndicationBit is present.
This is due to the specification as AUTOSAR-Dcm.
TesterPresents with suppressPosRspMsgIndicationBit are treated a bit specially because of their role to unconditionally extend S3 time.
Originally, various services are message-determined by Dsd, a sub-module of Dcm, and handled by Dsp according to the service.
However, only for TesterPresents with suppressPosRspMsgIndicationBit, the S3 time is extended by Dsl, which is also a submodule of Dcm, and then it is discarded.
Therefore, there is no Dsd decision after that, and as a result, NRC is suppressed.
But is it safe against ISO 14229-1?
In practical terms, it is harmless, and in fact, a specification specifically for S3 time extension would be more beneficial.
We just have to understand it as such.
We can also check the session maintenance and other things that are working well, but we can’t be sure.
While sending TesterPresents in 4.9 second cycles, the session is maintained, and when switching to 5.1 seconds, it returns to default session.
This session maintenance is the very purpose of TesterPresents.
Conclusion.
- Check the results of the TesterPresents simulation.
- Verification of messages.
- Checking the CAN line log.
- TesterPresents with suppressPosRspMsgIndicationBit is a special AUTOSAR-Dcm specification.
- After S3 time extension in Dsl, the message is discarded and not passed to Dsd and Dsp.
- The result is different from ISO14229-1, but the practicality is more important.
Click here for back issues.
コメント