[Dcm] Vehicle Diagnostic Communication Part 83 [Simulation 22]

[Dcm] Vehicle Diagnostic Communication Part 83 [Simulation 22] 車両診断通信
[Dcm] Vehicle Diagnostic Communication Part 83 [Simulation 22]

Click here for back issues.
https://www.simulationroom999.com/blog/diagnostic-communication-en-back-issue/

Introduction.

Explanation of AUTOSAR-Dcm simulation.
In this article, we will explain the simulation results of WriteDataByIdentifier.

Results of WriteDataByIdentifier simulation (message)

For a review of WriteDataByIdentifier, you may refer to the following article.

The simulation results are shown as follows.

Send msg : 225678 // confirm value of DID=5678
Recv msg : 62567801020304	
Send msg : 2e567811223344 // Write to DID=5678
Recv msg : 7f2e7f // NRC$7F(serviceNotSupportedInActiveSession)
Send msg : 1003 // Transit to extendDiagnosticSession
Recv msg : 500300300064
Send msg : 225678 // Check value of DID=5678 (make sure it hasn't changed)
Recv msg : 62567801020304
Send msg : 2e567811223344 // Write to DID=5678
Recv msg : 7f2e33 // NRC$33(securityAccessDenied)
Send msg : 2713 // Seed request
Recv msg : 6713deadbeef // write to DID=5678
Send msg : 225678 // Check value of DID=5678 (make sure it hasn't changed)
Recv msg : 62567801020304 // Send msg : 2714deadbeef // Seed request 
Send msg : 2714deadbeef // Send Key
Recv msg : 6714 // Send msg : 2e567811
Send msg : 2e567811223344 // Write to DID=5678
Recv msg : 7f2e78 // NC$78(ResponsePending)
Recv msg : 7f2e78 // NC$78(ResponsePending)
Recv msg : 7f2e78 // NC$78(ResponsePending)
Recv msg : 6e5678 // 
Send msg : 225678 // Check the value of DID=5678 (make sure it is rewritten)
Recv msg : 62567811223344 // Send msg : 2e5678010 
Send msg : 2e567801020304 // Write to DID=5678
Recv msg : 7f2e78 // NC$78(ResponsePending)
Recv msg : 7f2e78 // NC$78(ResponsePending)
Recv msg : 7f2e78 // NC$78(ResponsePending)
Recv msg : 6e5678 // 
Send msg : 225678 // Check the value of DID=5678 (make sure it is rewritten)
Recv msg : 62567801020304 // Send msg : 225678 // Confirm value of DID=5678 (Confirm rewrite)
Exiting

WriteDataByIdentifier simulation results (CAN line)

And the CAN line log is as follows.

Begin Triggerblock Sat Oct 10 01:07:49.830 AM 2020
 0.000000 Start of measurement
 
 // Check the value of DID=5678
 0.000000 1 18DA10F1x Rx d 8 03 22 56 78 CC CC CC CC CC
 0.002245 1 18DAF110x Rx d 8 07 62 56 78 01 02 03 04
 
 // Write to DID=5678
 0.005857 1 18DA10F1x Rx d 8 07 2E 56 78 11 22 33 44
 0.007913 1 18DAF110x Rx d 8 03 7F 2E 7F 55 55 55 55
 
 // Transition to extendDiagnosticSession
 0.011903 1 18DA10F1x Rx d 8 02 10 03 CC CC CC CC CC CC
 0.013746 1 18DAF110x Rx d 8 06 50 03 00 30 00 64 55
 
 // Check the value of DID=5678 (make sure it has not changed)
 0.017842 1 18DA10F1x Rx d 8 03 22 56 78 CC CC CC CC CC
 0.019931 1 18DAF110x Rx d 8 07 62 56 78 01 02 03 04
 
 // Write to DID=5678
 0.023847 1 18DA10F1x Rx d 8 07 2E 56 78 11 22 33 44
 0.025870 1 18DAF110x Rx d 8 03 7F 2E 33 55 55 55 55
 
 // Seed Request
 0.029835 1 18DA10F1x Rx d 8 02 27 13 CC CC CC CC CC CC
 0.031719 1 18DAF110x Rx d 8 06 67 13 DE AD BE EF 55
 
 // Check the value of DID=5678 (make sure it has not changed)
 0.038781 1 18DA10F1x Rx d 8 03 22 56 78 CC CC CC CC CC
 0.040690 1 18DAF110x Rx d 8 07 62 56 78 01 02 03 04
 
 // Key Sending
 0.044794 1 18DA10F1x Rx d 8 06 27 14 DE AD BE EF CC
 0.046678 1 18DAF110x Rx d 8 02 67 14 55 55 55 55 55 55
 
 // Write to DID=5678
 0.053830 1 18DA10F1x Rx d 8 07 2E 56 78 11 22 33 44
 0.103596 1 18DAF110x Rx d 8 03 7F 2E 78 55 55 55 55 55
 1.103176 1 18DAF110x Rx d 8 03 7F 2E 78 55 55 55 55
 2.102608 1 18DAF110x Rx d 8 03 7F 2E 78 55 55 55 55
 3.055043 1 18DAF110x Rx d 8 03 6E 56 78 55 55 55 55
 
 // Check the value of DID=5678 (confirm that it has been rewritten)
 3.063022 1 18DA10F1x Rx d 8 03 22 56 78 CC CC CC CC CC
 3.064996 1 18DAF110x Rx d 8 07 62 56 78 11 22 33 44
 
 // Write to DID=5678
 3.072352 1 18DA10F1x Rx d 8 07 2E 56 78 01 02 03 04
 3.120783 1 18DAF110x Rx d 8 03 7F 2E 78 55 55 55 55
 4.121174 1 18DAF110x Rx d 8 03 7F 2E 78 55 55 55 55
 5.121565 1 18DAF110x Rx d 8 03 7F 2E 78 55 55 55 55
 6.072902 1 18DAF110x Rx d 8 03 6E 56 78 55 55 55 55
 
 // Check the value of DID=5678 (confirm that it has been rewritten)
 6.078095 1 18DA10F1x Rx d 8 03 22 56 78 CC CC CC CC CC
 6.079996 1 18DAF110x Rx d 8 07 62 56 78 01 02 03 04
End TriggerBlock

Consideration of simulation results for WriteDataByIdentifier

Since it is paired with ReadDataByIdentifier, we can check its operation by reading it before writing and then reading it again after writing.
There are read-only DIDs, but there are almost no write-only DIDs, so we often check the operation like this.

In this case, it is implemented so that NRC$78 is returned.
In order to make it more noticeable, I implemented it so that it does not return a PositiveResponse for 3 seconds, and the P2* time on the ECU side is set to 1 second, so it behaves as if it returns NRC$78 three times.

This completes the simulation check that was initially envisioned.
However, there is one more point to check about WriteDataByIdentifier, which we will do next time.

Conclusion.

  • Check the results of the WriteDataByIdentifier simulation.
    • Confirmation of the message.
    • Confirmation of CAN line.
  • Often used in conjunction with ReadDataByIdentifier to check operation for reading after writing.
  • NRC$78 returned atmosphere.
    • In fact, NRC$78 is rarely followed three times.

Click here for back issues.

コメント

タイトルとURLをコピーしました