Closed stanislavZemek closed 7 months ago
Another problem is when I send diagnostic session frame I get from my developed ECU "P2* timer" = 0x03E8, which means 1000 milliseconds in decimal. This software showed me 10000 milliseconds and I don't know if the problem is inside my ECU or in this library. Below you can find sniffed communication and output from library. Thank you.
Sniffed: (1712232095.121765) can0 760 [3] 02 10 03 --> from your library (1712232095.123560) can0 768 [7] 06 50 03 01 F4 03 E8 --> from my developed ECU
The output: 2024-04-04 14:01:35 [INFO] UdsClient: DiagnosticSessionControl<0x10> - Received new timing parameters. P2=0.500s and P2*=10.000s. Using these value from now on.
Regarding the initial message, The timeout of 0.2sec is a bit of a tight fit. Enable python logging for Debug. The time you show in your can log shows times from start to end of the transmission of the transport layer, maybe the application layer has a latency to read the underlying layer. Since you don't have much margin, not impossible that it is the case. logs will tell us.
For the 2nd question, see this excerpt from ISO-14229
Thank you very much for your fast reply :+1: I increased the P2 timer for 500ms and it works properly now, but it's strange that it did not accept "response pending" packet when I tried with P2 timer 100ms before attempt with 200ms. I am absolutely beginner with Python. I commonly used C for microcontrollers so I don't know if I am able to properly logging data. :smile: Will try.
Thank you very much for explanation of P2 resolution.. I missed that.. I will correct that in my uds library in C on the server.
To enable logging, you can do something like
import logging
logging.basicConfig(level=logging.DEBUG)
I forgot! To have time printed out, you can do this.
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s [%(levelname)s] <%(name)s> %(message)s')
And call that line before creating the connection and the client
Hello,
thank you so much for your help. I will switch back the timer to 100ms and will send you a log.
Hello,
I tried to get working the logging , but I think you wanted much advanced log. Correct? I think the output is the same as without logging. I did not find any .log file so I think Python is sending all information directly to command line.
python3 uds_flasher_STM32.py
2024-04-08 14:06:50 [INFO] Connection: Connection opened
2024-04-08 14:06:50 [INFO] UdsClient: DiagnosticSessionControl<0x10> - Switching session to extendedDiagnosticSession (0x03)
2024-04-08 14:06:50 [DEBUG] Connection: Sending 2 bytes : [1003]
2024-04-08 14:06:50 [DEBUG] Connection: Received 6 bytes : [500300640064]
2024-04-08 14:06:50 [INFO] UdsClient: Received positive response for service DiagnosticSessionControl (0x10) from server.
2024-04-08 14:06:50 [INFO] UdsClient: DiagnosticSessionControl<0x10> - Received new timing parameters. P2=0.100s and P2=1.000s. Using these value from now on.
2024-04-08 14:06:50 [INFO] UdsClient: RoutineControl<0x31> - ControlType=0x01 - Starting routine ID 0xff00 (EraseMemory) with a payload of 9 bytes
2024-04-08 14:06:50 [DEBUG] Connection: Sending 13 bytes : [3101ff00440801000000004a8c]
2024-04-08 14:06:50 [DEBUG] Connection: Received 3 bytes : [7f3178]
2024-04-08 14:06:50 [DEBUG] Connection: Received 5 bytes : [7101ff0001]
2024-04-08 14:06:50 [INFO] UdsClient: Received positive response for service RoutineControl (0x31) from server.
2024-04-08 14:06:50 [INFO] UdsClient: RequestDownload<0x34> - Requesting a download (client to server) for memory location [Address=0x8010000 (32 bits), Size=0x6000 (32 bits)] and DataFormatIdentifier 0x00 (Compression:0x0, Encryption:0x0)
2024-04-08 14:06:50 [DEBUG] Connection: Sending 11 bytes : [3400440801000000006000]
2024-04-08 14:06:50 [DEBUG] Connection: Received 4 bytes : [74200026]
2024-04-08 14:06:50 [INFO] UdsClient: Received positive response for service RequestDownload (0x34) from server.
2024-04-08 14:06:50 [INFO] UdsClient: TransferData<0x36> - Sending a block of data with SequenceNumber=1 that is 2048 bytes long .
2024-04-08 14:06:50 [DEBUG] Connection: Sending 2050 bytes : [360100000120010a01087d09010883090108890901088f0901089509010800000000000000000000000000000000d15101089b09010800000000b1530108f9530108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108a9090108bd090108490a0108490a0108490a0108490a0108d1090108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a010800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005ff8e0f100000000000000000000000010b5054c237833b9044b13b10448aff300800123237010bd6c00002000000000785a010808b5034b1bb103490348aff3008008bd0000000070000020785a010880b584b000af03463a60fb710b46bb80174800f09cfff860fb68002b1dd0fb68032b1ad8fb79134a1361124b00229a60104b0022da60bb880e4a13600d4b00221a750d4b3a680b49094800f0b1fe0346002b08d000f0ecf905e0fb68032b02d900f04af8ffe700bf1037bd4680bd00bfa400002088000020a000002080b58cb000af0346fb710b46bb8013467b800123bb62fb79fb610023bb61bb885b01bb600023fb607b885b013b614ff6ff737b6100233b6201237b621b23fb6207f108031946034800f01efd00bf3037bd4680bda400002080b500af4ff6f0724ff4ec610120fff7cbff4ff6ff7240f2df710220fff7c4ff00bf80bd80b500af0a4800f0defc00f0a5f8fff7e5ff074800f0c3fd0221054800f04fff0346002b01d000f087f900bf80bd00bfa400002080b500af62b600bf00f072fb00f04ef800f0e8f800f0bcf800f084f8fff7c4ff194800f0a2fd4ff47a7302221749184802f006fc4ff47a7000f08cfb4ff47a7302221249124802f0fbfb4ff47a7000f081fb0e4a4ff4e0610220fff73bff02f06ffd0c4a00210c4802f0d0fd03460b4a13600b4a00210b4802f0c8fd03460a4a136002f08ffdfee7a400002000000020cc000020d85a0108d505010814010020fc5a0108090601081801002080b590b000af07f1180328220021184605f048fa3b1d00221a605a609a60da601a610223bb610123bb621023fb6200237b6307f11803184601f0acfc0346002b01d000f009f90f237b600023bb600023fb6000233b6100237b613b1d0021184601f01aff0346002b01d000f0f5f800bf4037bd4680bd000080b500af174b184a1a60164b02225a60144b00229a60134b0022da60114b4ff4a0221a610f4b00225a610e4b00221a760c4b01225a760b4b01229a76094b0022da76084b00221a77064b01225a77054800f012fb0346002b01d000f0c1f800bf80bd00bfa40000200064004080b500af114b124a1a60104b4ff4e1325a600e4b00229a600c4b0022da600b4b00221a61094b0c225a61084b00229a61064b0022da61054802f0eafa0346002b01d000f097f800bf80bd00bfcc0000200044004080b588b000af07f1100300221a605a609a60da601d4b9b691c4a43f0400393611a4b9b6903f04003fb60fb68174b9b69164a43f004039361144b9b6903f00403bb60bb68114b9b69104a43f0080393610e4b9b6903f008037b607b68002240210b4801f0e3fb40233b6101237b610023bb610223fb6107f110031946044801f075f900bf2037bd4680bd00bf001002400018014080b584b000af7860094a07f1080392e8030083e8030007f108031a464ff4e0610820fff71bfe4ff47a7002f05dfdebe7ac5a010880b586b000af7860094a07f10c0307ca03c31a8007f10c031a4640f201710220fff702fe40f6b83002f044fdece700bfb45a010880b582b000af78607b681b68044a934201d100f013fa00bf0837bd4680bd00bf002c014080b400af72b600bffee7000080b584b000af184b9b69174a43f001039361154b9b6903f00103bb60bb68124bdb69114a43f08053d3610f4bdb6903f080537b607b6800220f216ff0010001f0c6f80a4b5b68fb60fb6823f0e063fb60fb6843f08073fb60044afb68536000bf1037bd4680bd00bf001002400000014080b58ab000af786007f1140300221a605a609a60da607b681b682d4a934253d12c4bdb692b4a43f00073d361294bdb6903f000733b613b69264b9b69254a43f008039361234b9b6903f00803fb60fb684ff480737b610023bb610023fb6107f1140319461c4801f0b3f84ff400737b610223bb6103233b6207f114031946164801f0a6f8154b5b687b627b6a23f4c0437b627b6a43f0e0637b627b6a43f480437b620e4a7b6a536000220521132001f056f8132001f06ff800220521142001f04ef8142001f067f800bf2837bd4680bd0064004000100240000c01400000014080b582b000af78607b681b680b4a934210d10b4bdb690a4a23f00073d3614ff44071084801f0f8f9132001f052f8142001f04ff800bf0837bd4680bd0064004000100240]
2024-04-08 14:06:50 [DEBUG] Connection: No data received: [TimeoutException] - Did not received ISOTP frame in time (timeout=0.1 sec)
2024-04-08 14:06:50 [ERROR] UdsClient: [TimeoutException] : Did not receive response in time. P2 timeout time has expired (timeout=0.100 sec)
2024-04-08 14:06:50 [INFO] Connection: Connection closed
Traceback (most recent call last):
File "/home/standa/Documents/MWMotors/git Folders/STM32_bootloader/Python_flasher/uds_flasher_STM32.py", line 58, in
Here is udsoncan.log udsoncan.log
Hi, thank you for this. Unfortunately, I forgot to give you the parameter to include millisecond timing in the log. Sorry.
Can you setup your logging like this? (I forgot %(msecs)03d
)
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s.%(msecs)03d [%(levelname)s] <%(name)s> %(message)s')
It looks like it's necessary to edit your code as well, because the answer is from your library and does not contain milliseconds. Only output from my own code contains milliseconds. Where should I add msecs to your code? Thank you.
I gave you the line of code to edit. It is not inside my library. My library sends logs to the python logging module, then this modules format the log and prints
Okay, I will doublecheck that. For now first two rows are in milliseconds, but it's not usefull for us.
2024-04-08 15:11:56.106 INFO: Logging Info
2024-04-08 15:11:56.106 DEBUG: Logging Debug
2024-04-08 15:11:56 [INFO] Connection: Connection opened
2024-04-08 15:11:56 [INFO] UdsClient: DiagnosticSessionControl<0x10> - Switching session to extendedDiagnosticSession (0x03)
2024-04-08 15:11:56 [DEBUG] Connection: Sending 2 bytes : [1003]
2024-04-08 15:11:56 [DEBUG] Connection: Received 6 bytes : [500300640064]
2024-04-08 15:11:56 [INFO] UdsClient: Received positive response for service DiagnosticSessionControl (0x10) from server.
2024-04-08 15:11:56 [INFO] UdsClient: DiagnosticSessionControl<0x10> - Received new timing parameters. P2=0.100s and P2=1.000s. Using these value from now on.
2024-04-08 15:11:56 [INFO] UdsClient: RoutineControl<0x31> - ControlType=0x01 - Starting routine ID 0xff00 (EraseMemory) with a payload of 9 bytes
2024-04-08 15:11:56 [DEBUG] Connection: Sending 13 bytes : [3101ff00440801000000004a8c]
2024-04-08 15:11:56 [DEBUG] Connection: Received 3 bytes : [7f3178]
2024-04-08 15:11:56 [DEBUG] Connection: Received 5 bytes : [7101ff0001]
2024-04-08 15:11:56 [INFO] UdsClient: Received positive response for service RoutineControl (0x31) from server.
2024-04-08 15:11:56 [INFO] UdsClient: RequestDownload<0x34> - Requesting a download (client to server) for memory location [Address=0x8010000 (32 bits), Size=0x6000 (32 bits)] and DataFormatIdentifier 0x00 (Compression:0x0, Encryption:0x0)
2024-04-08 15:11:56 [DEBUG] Connection: Sending 11 bytes : [3400440801000000006000]
2024-04-08 15:11:56 [DEBUG] Connection: Received 4 bytes : [74200026]
2024-04-08 15:11:56 [INFO] UdsClient: Received positive response for service RequestDownload (0x34) from server.
2024-04-08 15:11:56 [INFO] UdsClient: TransferData<0x36> - Sending a block of data with SequenceNumber=1 that is 2048 bytes long .
2024-04-08 15:11:56 [DEBUG] Connection: Sending 2050 bytes : [360100000120010a01087d09010883090108890901088f0901089509010800000000000000000000000000000000d15101089b09010800000000b1530108f9530108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108a9090108bd090108490a0108490a0108490a0108490a0108d1090108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a010800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005ff8e0f100000000000000000000000010b5054c237833b9044b13b10448aff300800123237010bd6c00002000000000785a010808b5034b1bb103490348aff3008008bd0000000070000020785a010880b584b000af03463a60fb710b46bb80174800f09cfff860fb68002b1dd0fb68032b1ad8fb79134a1361124b00229a60104b0022da60bb880e4a13600d4b00221a750d4b3a680b49094800f0b1fe0346002b08d000f0ecf905e0fb68032b02d900f04af8ffe700bf1037bd4680bd00bfa400002088000020a000002080b58cb000af0346fb710b46bb8013467b800123bb62fb79fb610023bb61bb885b01bb600023fb607b885b013b614ff6ff737b6100233b6201237b621b23fb6207f108031946034800f01efd00bf3037bd4680bda400002080b500af4ff6f0724ff4ec610120fff7cbff4ff6ff7240f2df710220fff7c4ff00bf80bd80b500af0a4800f0defc00f0a5f8fff7e5ff074800f0c3fd0221054800f04fff0346002b01d000f087f900bf80bd00bfa400002080b500af62b600bf00f072fb00f04ef800f0e8f800f0bcf800f084f8fff7c4ff194800f0a2fd4ff47a7302221749184802f006fc4ff47a7000f08cfb4ff47a7302221249124802f0fbfb4ff47a7000f081fb0e4a4ff4e0610220fff73bff02f06ffd0c4a00210c4802f0d0fd03460b4a13600b4a00210b4802f0c8fd03460a4a136002f08ffdfee7a400002000000020cc000020d85a0108d505010814010020fc5a0108090601081801002080b590b000af07f1180328220021184605f048fa3b1d00221a605a609a60da601a610223bb610123bb621023fb6200237b6307f11803184601f0acfc0346002b01d000f009f90f237b600023bb600023fb6000233b6100237b613b1d0021184601f01aff0346002b01d000f0f5f800bf4037bd4680bd000080b500af174b184a1a60164b02225a60144b00229a60134b0022da60114b4ff4a0221a610f4b00225a610e4b00221a760c4b01225a760b4b01229a76094b0022da76084b00221a77064b01225a77054800f012fb0346002b01d000f0c1f800bf80bd00bfa40000200064004080b500af114b124a1a60104b4ff4e1325a600e4b00229a600c4b0022da600b4b00221a61094b0c225a61084b00229a61064b0022da61054802f0eafa0346002b01d000f097f800bf80bd00bfcc0000200044004080b588b000af07f1100300221a605a609a60da601d4b9b691c4a43f0400393611a4b9b6903f04003fb60fb68174b9b69164a43f004039361144b9b6903f00403bb60bb68114b9b69104a43f0080393610e4b9b6903f008037b607b68002240210b4801f0e3fb40233b6101237b610023bb610223fb6107f110031946044801f075f900bf2037bd4680bd00bf001002400018014080b584b000af7860094a07f1080392e8030083e8030007f108031a464ff4e0610820fff71bfe4ff47a7002f05dfdebe7ac5a010880b586b000af7860094a07f10c0307ca03c31a8007f10c031a4640f201710220fff702fe40f6b83002f044fdece700bfb45a010880b582b000af78607b681b68044a934201d100f013fa00bf0837bd4680bd00bf002c014080b400af72b600bffee7000080b584b000af184b9b69174a43f001039361154b9b6903f00103bb60bb68124bdb69114a43f08053d3610f4bdb6903f080537b607b6800220f216ff0010001f0c6f80a4b5b68fb60fb6823f0e063fb60fb6843f08073fb60044afb68536000bf1037bd4680bd00bf001002400000014080b58ab000af786007f1140300221a605a609a60da607b681b682d4a934253d12c4bdb692b4a43f00073d361294bdb6903f000733b613b69264b9b69254a43f008039361234b9b6903f00803fb60fb684ff480737b610023bb610023fb6107f1140319461c4801f0b3f84ff400737b610223bb6103233b6207f114031946164801f0a6f8154b5b687b627b6a23f4c0437b627b6a43f0e0637b627b6a43f480437b620e4a7b6a536000220521132001f056f8132001f06ff800220521142001f04ef8142001f067f800bf2837bd4680bd0064004000100240000c01400000014080b582b000af78607b681b680b4a934210d10b4bdb690a4a23f00073d3614ff44071084801f0f8f9132001f052f8142001f04ff800bf0837bd4680bd0064004000100240]
2024-04-08 15:11:56 [DEBUG] Connection: No data received: [TimeoutException] - Did not received ISOTP frame in time (timeout=0.1 sec)
2024-04-08 15:11:56 [ERROR] UdsClient: [TimeoutException] : Did not receive response in time. P2 timeout time has expired (timeout=0.100 sec)
2024-04-08 15:11:56 [INFO] Connection: Connection closed
Traceback (most recent call last):
File "/home/standa/Documents/MWMotors/git Folders/STM32_bootloader/Python_flasher/uds_flasher_STM32.py", line 64, in
Oh.. I see the problem.. I will correct that and send you back correct log. Sorry :smile:
I had already set logging with udsoncan.setup_logging() :smile: :smile: So I've had overwrite previous logging settings.
Here is the correct log:
2024-04-08 15:17:52.395 INFO: Logging Info
2024-04-08 15:17:52.395 DEBUG: Logging Debug
2024-04-08 15:17:52.396 INFO: Connection opened
2024-04-08 15:17:52.396 INFO: DiagnosticSessionControl<0x10> - Switching session to extendedDiagnosticSession (0x03)
2024-04-08 15:17:52.396 DEBUG: Sending request to server
2024-04-08 15:17:52.396 DEBUG: Sending 2 bytes : [1003]
2024-04-08 15:17:52.396 DEBUG: Waiting for server response
2024-04-08 15:17:52.398 DEBUG: Received 6 bytes : [500300640064]
2024-04-08 15:17:52.398 DEBUG: Received response from server
2024-04-08 15:17:52.398 INFO: Received positive response for service DiagnosticSessionControl (0x10) from server.
2024-04-08 15:17:52.398 INFO: DiagnosticSessionControl<0x10> - Received new timing parameters. P2=0.100s and P2=1.000s. Using these value from now on.
2024-04-08 15:17:52.399 INFO: RoutineControl<0x31> - ControlType=0x01 - Starting routine ID 0xff00 (EraseMemory) with a payload of 9 bytes
2024-04-08 15:17:52.399 DEBUG: Payload data : 440801000000004a8c
2024-04-08 15:17:52.399 DEBUG: Sending request to server
2024-04-08 15:17:52.399 DEBUG: Sending 13 bytes : [3101ff00440801000000004a8c]
2024-04-08 15:17:52.399 DEBUG: Waiting for server response
2024-04-08 15:17:52.470 DEBUG: Received 3 bytes : [7f3178]
2024-04-08 15:17:52.470 DEBUG: Received response from server
2024-04-08 15:17:52.470 DEBUG: Server requested to wait with response code RequestCorrectlyReceived_ResponsePending (0x78), single request timeout is now set to P2 (1.000 seconds)
2024-04-08 15:17:52.470 DEBUG: Waiting for server response
2024-04-08 15:17:52.678 DEBUG: Received 5 bytes : [7101ff0001]
2024-04-08 15:17:52.678 DEBUG: Received response from server
2024-04-08 15:17:52.679 INFO: Received positive response for service RoutineControl (0x31) from server.
2024-04-08 15:17:52.679 INFO: RequestDownload<0x34> - Requesting a download (client to server) for memory location [Address=0x8010000 (32 bits), Size=0x6000 (32 bits)] and DataFormatIdentifier 0x00 (Compression:0x0, Encryption:0x0)
2024-04-08 15:17:52.679 DEBUG: Sending request to server
2024-04-08 15:17:52.679 DEBUG: Sending 11 bytes : [3400440801000000006000]
2024-04-08 15:17:52.679 DEBUG: Waiting for server response
2024-04-08 15:17:52.683 DEBUG: Received 4 bytes : [74200026]
2024-04-08 15:17:52.684 DEBUG: Received response from server
2024-04-08 15:17:52.684 INFO: Received positive response for service RequestDownload (0x34) from server.
2024-04-08 15:17:52.685 INFO: TransferData<0x36> - Sending a block of data with SequenceNumber=1 that is 2048 bytes long .
2024-04-08 15:17:52.685 DEBUG: Data to transfer : 00000120010a01087d09010883090108890901088f0901089509010800000000000000000000000000000000d15101089b09010800000000b1530108f9530108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108a9090108bd090108490a0108490a0108490a0108490a0108d1090108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a010800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005ff8e0f100000000000000000000000010b5054c237833b9044b13b10448aff300800123237010bd6c00002000000000785a010808b5034b1bb103490348aff3008008bd0000000070000020785a010880b584b000af03463a60fb710b46bb80174800f09cfff860fb68002b1dd0fb68032b1ad8fb79134a1361124b00229a60104b0022da60bb880e4a13600d4b00221a750d4b3a680b49094800f0b1fe0346002b08d000f0ecf905e0fb68032b02d900f04af8ffe700bf1037bd4680bd00bfa400002088000020a000002080b58cb000af0346fb710b46bb8013467b800123bb62fb79fb610023bb61bb885b01bb600023fb607b885b013b614ff6ff737b6100233b6201237b621b23fb6207f108031946034800f01efd00bf3037bd4680bda400002080b500af4ff6f0724ff4ec610120fff7cbff4ff6ff7240f2df710220fff7c4ff00bf80bd80b500af0a4800f0defc00f0a5f8fff7e5ff074800f0c3fd0221054800f04fff0346002b01d000f087f900bf80bd00bfa400002080b500af62b600bf00f072fb00f04ef800f0e8f800f0bcf800f084f8fff7c4ff194800f0a2fd4ff47a7302221749184802f006fc4ff47a7000f08cfb4ff47a7302221249124802f0fbfb4ff47a7000f081fb0e4a4ff4e0610220fff73bff02f06ffd0c4a00210c4802f0d0fd03460b4a13600b4a00210b4802f0c8fd03460a4a136002f08ffdfee7a400002000000020cc000020d85a0108d505010814010020fc5a0108090601081801002080b590b000af07f1180328220021184605f048fa3b1d00221a605a609a60da601a610223bb610123bb621023fb6200237b6307f11803184601f0acfc0346002b01d000f009f90f237b600023bb600023fb6000233b6100237b613b1d0021184601f01aff0346002b01d000f0f5f800bf4037bd4680bd000080b500af174b184a1a60164b02225a60144b00229a60134b0022da60114b4ff4a0221a610f4b00225a610e4b00221a760c4b01225a760b4b01229a76094b0022da76084b00221a77064b01225a77054800f012fb0346002b01d000f0c1f800bf80bd00bfa40000200064004080b500af114b124a1a60104b4ff4e1325a600e4b00229a600c4b0022da600b4b00221a61094b0c225a61084b00229a61064b0022da61054802f0eafa0346002b01d000f097f800bf80bd00bfcc0000200044004080b588b000af07f1100300221a605a609a60da601d4b9b691c4a43f0400393611a4b9b6903f04003fb60fb68174b9b69164a43f004039361144b9b6903f00403bb60bb68114b9b69104a43f0080393610e4b9b6903f008037b607b68002240210b4801f0e3fb40233b6101237b610023bb610223fb6107f110031946044801f075f900bf2037bd4680bd00bf001002400018014080b584b000af7860094a07f1080392e8030083e8030007f108031a464ff4e0610820fff71bfe4ff47a7002f05dfdebe7ac5a010880b586b000af7860094a07f10c0307ca03c31a8007f10c031a4640f201710220fff702fe40f6b83002f044fdece700bfb45a010880b582b000af78607b681b68044a934201d100f013fa00bf0837bd4680bd00bf002c014080b400af72b600bffee7000080b584b000af184b9b69174a43f001039361154b9b6903f00103bb60bb68124bdb69114a43f08053d3610f4bdb6903f080537b607b6800220f216ff0010001f0c6f80a4b5b68fb60fb6823f0e063fb60fb6843f08073fb60044afb68536000bf1037bd4680bd00bf001002400000014080b58ab000af786007f1140300221a605a609a60da607b681b682d4a934253d12c4bdb692b4a43f00073d361294bdb6903f000733b613b69264b9b69254a43f008039361234b9b6903f00803fb60fb684ff480737b610023bb610023fb6107f1140319461c4801f0b3f84ff400737b610223bb6103233b6207f114031946164801f0a6f8154b5b687b627b6a23f4c0437b627b6a43f0e0637b627b6a43f480437b620e4a7b6a536000220521132001f056f8132001f06ff800220521142001f04ef8142001f067f800bf2837bd4680bd0064004000100240000c01400000014080b582b000af78607b681b680b4a934210d10b4bdb690a4a23f00073d3614ff44071084801f0f8f9132001f052f8142001f04ff800bf0837bd4680bd0064004000100240
2024-04-08 15:17:52.685 DEBUG: Sending request to server
2024-04-08 15:17:52.685 DEBUG: Sending 2050 bytes : [360100000120010a01087d09010883090108890901088f0901089509010800000000000000000000000000000000d15101089b09010800000000b1530108f9530108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108a9090108bd090108490a0108490a0108490a0108490a0108d1090108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a0108490a010800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005ff8e0f100000000000000000000000010b5054c237833b9044b13b10448aff300800123237010bd6c00002000000000785a010808b5034b1bb103490348aff3008008bd0000000070000020785a010880b584b000af03463a60fb710b46bb80174800f09cfff860fb68002b1dd0fb68032b1ad8fb79134a1361124b00229a60104b0022da60bb880e4a13600d4b00221a750d4b3a680b49094800f0b1fe0346002b08d000f0ecf905e0fb68032b02d900f04af8ffe700bf1037bd4680bd00bfa400002088000020a000002080b58cb000af0346fb710b46bb8013467b800123bb62fb79fb610023bb61bb885b01bb600023fb607b885b013b614ff6ff737b6100233b6201237b621b23fb6207f108031946034800f01efd00bf3037bd4680bda400002080b500af4ff6f0724ff4ec610120fff7cbff4ff6ff7240f2df710220fff7c4ff00bf80bd80b500af0a4800f0defc00f0a5f8fff7e5ff074800f0c3fd0221054800f04fff0346002b01d000f087f900bf80bd00bfa400002080b500af62b600bf00f072fb00f04ef800f0e8f800f0bcf800f084f8fff7c4ff194800f0a2fd4ff47a7302221749184802f006fc4ff47a7000f08cfb4ff47a7302221249124802f0fbfb4ff47a7000f081fb0e4a4ff4e0610220fff73bff02f06ffd0c4a00210c4802f0d0fd03460b4a13600b4a00210b4802f0c8fd03460a4a136002f08ffdfee7a400002000000020cc000020d85a0108d505010814010020fc5a0108090601081801002080b590b000af07f1180328220021184605f048fa3b1d00221a605a609a60da601a610223bb610123bb621023fb6200237b6307f11803184601f0acfc0346002b01d000f009f90f237b600023bb600023fb6000233b6100237b613b1d0021184601f01aff0346002b01d000f0f5f800bf4037bd4680bd000080b500af174b184a1a60164b02225a60144b00229a60134b0022da60114b4ff4a0221a610f4b00225a610e4b00221a760c4b01225a760b4b01229a76094b0022da76084b00221a77064b01225a77054800f012fb0346002b01d000f0c1f800bf80bd00bfa40000200064004080b500af114b124a1a60104b4ff4e1325a600e4b00229a600c4b0022da600b4b00221a61094b0c225a61084b00229a61064b0022da61054802f0eafa0346002b01d000f097f800bf80bd00bfcc0000200044004080b588b000af07f1100300221a605a609a60da601d4b9b691c4a43f0400393611a4b9b6903f04003fb60fb68174b9b69164a43f004039361144b9b6903f00403bb60bb68114b9b69104a43f0080393610e4b9b6903f008037b607b68002240210b4801f0e3fb40233b6101237b610023bb610223fb6107f110031946044801f075f900bf2037bd4680bd00bf001002400018014080b584b000af7860094a07f1080392e8030083e8030007f108031a464ff4e0610820fff71bfe4ff47a7002f05dfdebe7ac5a010880b586b000af7860094a07f10c0307ca03c31a8007f10c031a4640f201710220fff702fe40f6b83002f044fdece700bfb45a010880b582b000af78607b681b68044a934201d100f013fa00bf0837bd4680bd00bf002c014080b400af72b600bffee7000080b584b000af184b9b69174a43f001039361154b9b6903f00103bb60bb68124bdb69114a43f08053d3610f4bdb6903f080537b607b6800220f216ff0010001f0c6f80a4b5b68fb60fb6823f0e063fb60fb6843f08073fb60044afb68536000bf1037bd4680bd00bf001002400000014080b58ab000af786007f1140300221a605a609a60da607b681b682d4a934253d12c4bdb692b4a43f00073d361294bdb6903f000733b613b69264b9b69254a43f008039361234b9b6903f00803fb60fb684ff480737b610023bb610023fb6107f1140319461c4801f0b3f84ff400737b610223bb6103233b6207f114031946164801f0a6f8154b5b687b627b6a23f4c0437b627b6a43f0e0637b627b6a43f480437b620e4a7b6a536000220521132001f056f8132001f06ff800220521142001f04ef8142001f067f800bf2837bd4680bd0064004000100240000c01400000014080b582b000af78607b681b680b4a934210d10b4bdb690a4a23f00073d3614ff44071084801f0f8f9132001f052f8142001f04ff800bf0837bd4680bd0064004000100240]
2024-04-08 15:17:52.685 DEBUG: Waiting for server response
2024-04-08 15:17:52.786 DEBUG: No data received: [TimeoutException] - Did not received ISOTP frame in time (timeout=0.1 sec)
2024-04-08 15:17:52.786 ERROR: [TimeoutException] : Did not receive response in time. P2 timeout time has expired (timeout=0.100 sec)
2024-04-08 15:17:52.851 INFO: Connection closed
Traceback (most recent call last):
File "/home/standa/Documents/MWMotors/git Folders/STM32_bootloader/Python_flasher/uds_flasher_STM32.py", line 64, in
And here is raw data sniffed from can bus with timestamps:
(1712582272.396791) can0 760 [3] 02 10 03 (1712582272.398496) can0 768 [7] 06 50 03 00 64 00 64 (1712582272.399198) can0 760 [8] 10 0D 31 01 FF 00 44 08 (1712582272.401067) can0 768 [3] 30 00 00 (1712582272.401234) can0 760 [8] 21 01 00 00 00 00 4A 8C (1712582272.470013) can0 768 [4] 03 7F 31 78 (1712582272.678129) can0 768 [6] 05 71 01 FF 00 01 (1712582272.679824) can0 760 [8] 10 0B 34 00 44 08 01 00 (1712582272.681748) can0 768 [3] 30 00 00 (1712582272.681875) can0 760 [6] 21 00 00 00 60 00 (1712582272.683751) can0 768 [5] 04 74 20 00 26 (1712582272.685952) can0 760 [8] 18 02 36 01 00 00 01 20 (1712582272.687740) can0 768 [3] 30 00 00 (1712582272.687845) can0 760 [8] 21 01 0A 01 08 7D 09 01 (1712582272.688031) can0 760 [8] 22 08 83 09 01 08 89 09 (1712582272.688231) can0 760 [8] 23 01 08 8F 09 01 08 95 (1712582272.688390) can0 760 [8] 24 09 01 08 00 00 00 00 (1712582272.688578) can0 760 [8] 25 00 00 00 00 00 00 00 (1712582272.688734) can0 760 [8] 26 00 00 00 00 00 D1 51 (1712582272.688874) can0 760 [8] 27 01 08 9B 09 01 08 00 (1712582272.689015) can0 760 [8] 28 00 00 00 B1 53 01 08 (1712582272.689160) can0 760 [8] 29 F9 53 01 08 49 0A 01 (1712582272.689286) can0 760 [8] 2A 08 49 0A 01 08 49 0A (1712582272.689410) can0 760 [8] 2B 01 08 49 0A 01 08 49 (1712582272.689549) can0 760 [8] 2C 0A 01 08 49 0A 01 08 (1712582272.689710) can0 760 [8] 2D 49 0A 01 08 49 0A 01 (1712582272.689849) can0 760 [8] 2E 08 49 0A 01 08 49 0A (1712582272.689987) can0 760 [8] 2F 01 08 49 0A 01 08 49 (1712582272.690126) can0 760 [8] 20 0A 01 08 49 0A 01 08 (1712582272.690265) can0 760 [8] 21 49 0A 01 08 49 0A 01 (1712582272.690410) can0 760 [8] 22 08 49 0A 01 08 49 0A (1712582272.690549) can0 760 [8] 23 01 08 49 0A 01 08 49 (1712582272.690710) can0 760 [8] 24 0A 01 08 A9 09 01 08 (1712582272.690848) can0 760 [8] 25 BD 09 01 08 49 0A 01 (1712582272.690987) can0 760 [8] 26 08 49 0A 01 08 49 0A (1712582272.691126) can0 760 [8] 27 01 08 49 0A 01 08 D1 (1712582272.691265) can0 760 [8] 28 09 01 08 49 0A 01 08 (1712582272.691410) can0 760 [8] 29 49 0A 01 08 49 0A 01 (1712582272.691551) can0 760 [8] 2A 08 49 0A 01 08 49 0A (1712582272.691694) can0 760 [8] 2B 01 08 49 0A 01 08 49 (1712582272.691833) can0 760 [8] 2C 0A 01 08 49 0A 01 08 (1712582272.691967) can0 760 [8] 2D 49 0A 01 08 49 0A 01 (1712582272.692108) can0 760 [8] 2E 08 49 0A 01 08 49 0A (1712582272.692241) can0 760 [8] 2F 01 08 49 0A 01 08 49 (1712582272.692373) can0 760 [8] 20 0A 01 08 49 0A 01 08 (1712582272.692512) can0 760 [8] 21 49 0A 01 08 49 0A 01 (1712582272.692712) can0 760 [8] 22 08 49 0A 01 08 49 0A (1712582272.692845) can0 760 [8] 23 01 08 49 0A 01 08 49 (1712582272.692979) can0 760 [8] 24 0A 01 08 49 0A 01 08 (1712582272.693113) can0 760 [8] 25 49 0A 01 08 49 0A 01 (1712582272.693246) can0 760 [8] 26 08 49 0A 01 08 49 0A (1712582272.693387) can0 760 [8] 27 01 08 49 0A 01 08 49 (1712582272.693519) can0 760 [8] 28 0A 01 08 49 0A 01 08 (1712582272.693703) can0 760 [8] 29 49 0A 01 08 49 0A 01 (1712582272.693836) can0 760 [8] 2A 08 49 0A 01 08 49 0A (1712582272.693968) can0 760 [8] 2B 01 08 49 0A 01 08 00 (1712582272.694100) can0 760 [8] 2C 00 00 00 00 00 00 00 (1712582272.694232) can0 760 [8] 2D 00 00 00 00 00 00 00 (1712582272.694364) can0 760 [8] 2E 00 00 00 00 00 00 00 (1712582272.694497) can0 760 [8] 2F 00 00 00 00 00 00 00 (1712582272.694637) can0 760 [8] 20 00 00 00 00 00 00 00 (1712582272.694769) can0 760 [8] 21 00 00 00 00 00 00 00 (1712582272.694887) can0 760 [8] 22 00 00 00 00 00 00 00 (1712582272.695019) can0 760 [8] 23 00 00 00 00 00 00 00 (1712582272.695159) can0 760 [8] 24 00 00 00 00 00 00 00 (1712582272.695291) can0 760 [8] 25 00 00 00 00 00 00 00 (1712582272.695409) can0 760 [8] 26 00 00 00 00 00 00 00 (1712582272.695541) can0 760 [8] 27 00 00 00 00 00 00 00 (1712582272.695703) can0 760 [8] 28 00 00 00 00 00 00 00 (1712582272.695835) can0 760 [8] 29 00 00 00 00 00 00 00 (1712582272.695968) can0 760 [8] 2A 00 00 00 00 00 00 00 (1712582272.696100) can0 760 [8] 2B 00 00 00 00 00 00 00 (1712582272.696233) can0 760 [8] 2C 00 00 00 00 00 00 00 (1712582272.696365) can0 760 [8] 2D 00 00 00 00 00 00 00 (1712582272.696497) can0 760 [8] 2E 00 00 00 00 00 00 00 (1712582272.696637) can0 760 [8] 2F 00 00 00 00 00 00 00 (1712582272.696770) can0 760 [8] 20 00 00 00 00 00 00 00 (1712582272.696909) can0 760 [8] 21 00 00 00 00 00 00 00 (1712582272.697042) can0 760 [8] 22 00 00 00 00 00 00 00 (1712582272.697183) can0 760 [8] 23 00 00 00 00 00 00 00 (1712582272.697332) can0 760 [8] 24 00 00 00 00 00 00 00 (1712582272.697473) can0 760 [8] 25 5F F8 E0 F1 00 00 00 (1712582272.697615) can0 760 [8] 26 00 00 00 00 00 00 00 (1712582272.697788) can0 760 [8] 27 00 00 10 B5 05 4C 23 (1712582272.697984) can0 760 [8] 28 78 33 B9 04 4B 13 B1 (1712582272.698126) can0 760 [8] 29 04 48 AF F3 00 80 01 (1712582272.698265) can0 760 [8] 2A 23 23 70 10 BD 6C 00 (1712582272.698399) can0 760 [8] 2B 00 20 00 00 00 00 78 (1712582272.698535) can0 760 [8] 2C 5A 01 08 08 B5 03 4B (1712582272.698721) can0 760 [8] 2D 1B B1 03 49 03 48 AF (1712582272.698855) can0 760 [8] 2E F3 00 80 08 BD 00 00 (1712582272.698988) can0 760 [8] 2F 00 00 70 00 00 20 78 (1712582272.699119) can0 760 [8] 20 5A 01 08 80 B5 84 B0 (1712582272.699275) can0 760 [8] 21 00 AF 03 46 3A 60 FB (1712582272.699413) can0 760 [8] 22 71 0B 46 BB 80 17 48 (1712582272.699546) can0 760 [8] 23 00 F0 9C FF F8 60 FB (1712582272.699817) can0 760 [8] 24 68 00 2B 1D D0 FB 68 (1712582272.700046) can0 760 [8] 25 03 2B 1A D8 FB 79 13 (1712582272.700284) can0 760 [8] 26 4A 13 61 12 4B 00 22 (1712582272.700512) can0 760 [8] 27 9A 60 10 4B 00 22 DA (1712582272.700809) can0 760 [8] 28 60 BB 88 0E 4A 13 60 (1712582272.701056) can0 760 [8] 29 0D 4B 00 22 1A 75 0D (1712582272.701296) can0 760 [8] 2A 4B 3A 68 0B 49 09 48 (1712582272.701534) can0 760 [8] 2B 00 F0 B1 FE 03 46 00 (1712582272.701806) can0 760 [8] 2C 2B 08 D0 00 F0 EC F9 (1712582272.702127) can0 760 [8] 2D 05 E0 FB 68 03 2B 02 (1712582272.702294) can0 760 [8] 2E D9 00 F0 4A F8 FF E7 (1712582272.702644) can0 760 [8] 2F 00 BF 10 37 BD 46 80 (1712582272.702887) can0 760 [8] 20 BD 00 BF A4 00 00 20 (1712582272.703139) can0 760 [8] 21 88 00 00 20 A0 00 00 (1712582272.703367) can0 760 [8] 22 20 80 B5 8C B0 00 AF (1712582272.703603) can0 760 [8] 23 03 46 FB 71 0B 46 BB (1712582272.703873) can0 760 [8] 24 80 13 46 7B 80 01 23 (1712582272.704164) can0 760 [8] 25 BB 62 FB 79 FB 61 00 (1712582272.704402) can0 760 [8] 26 23 BB 61 BB 88 5B 01 (1712582272.704702) can0 760 [8] 27 BB 60 00 23 FB 60 7B (1712582272.704876) can0 760 [8] 28 88 5B 01 3B 61 4F F6 (1712582272.705130) can0 760 [8] 29 FF 73 7B 61 00 23 3B (1712582272.705359) can0 760 [8] 2A 62 01 23 7B 62 1B 23 (1712582272.705595) can0 760 [8] 2B FB 62 07 F1 08 03 19 (1712582272.705831) can0 760 [8] 2C 46 03 48 00 F0 1E FD (1712582272.706060) can0 760 [8] 2D 00 BF 30 37 BD 46 80 (1712582272.706307) can0 760 [8] 2E BD A4 00 00 20 80 B5 (1712582272.706628) can0 760 [8] 2F 00 AF 4F F6 F0 72 4F (1712582272.706855) can0 760 [8] 20 F4 EC 61 01 20 FF F7 (1712582272.707091) can0 760 [8] 21 CB FF 4F F6 FF 72 40 (1712582272.707322) can0 760 [8] 22 F2 DF 71 02 20 FF F7 (1712582272.707558) can0 760 [8] 23 C4 FF 00 BF 80 BD 80 (1712582272.707808) can0 760 [8] 24 B5 00 AF 0A 48 00 F0 (1712582272.708036) can0 760 [8] 25 DE FC 00 F0 A5 F8 FF (1712582272.708272) can0 760 [8] 26 F7 E5 FF 07 48 00 F0 (1712582272.708502) can0 760 [8] 27 C3 FD 02 21 05 48 00 (1712582272.708785) can0 760 [8] 28 F0 4F FF 03 46 00 2B (1712582272.709013) can0 760 [8] 29 01 D0 00 F0 87 F9 00 (1712582272.709243) can0 760 [8] 2A BF 80 BD 00 BF A4 00 (1712582272.709479) can0 760 [8] 2B 00 20 80 B5 00 AF 62 (1712582272.709707) can0 760 [8] 2C B6 00 BF 00 F0 72 FB (1712582272.709933) can0 760 [8] 2D 00 F0 4E F8 00 F0 E8 (1712582272.710161) can0 760 [8] 2E F8 00 F0 BC F8 00 F0 (1712582272.710397) can0 760 [8] 2F 84 F8 FF F7 C4 FF 19 (1712582272.710627) can0 760 [8] 20 48 00 F0 A2 FD 4F F4 (1712582272.710955) can0 760 [8] 21 7A 73 02 22 17 49 18 (1712582272.711182) can0 760 [8] 22 48 02 F0 06 FC 4F F4 (1712582272.711409) can0 760 [8] 23 7A 70 00 F0 8C FB 4F (1712582272.711643) can0 760 [8] 24 F4 7A 73 02 22 12 49 (1712582272.711894) can0 760 [8] 25 12 48 02 F0 FB FB 4F (1712582272.712137) can0 760 [8] 26 F4 7A 70 00 F0 81 FB (1712582272.712364) can0 760 [8] 27 0E 4A 4F F4 E0 61 02 (1712582272.712591) can0 760 [8] 28 20 FF F7 3B FF 02 F0 (1712582272.712820) can0 760 [8] 29 6F FD 0C 4A 00 21 0C (1712582272.713056) can0 760 [8] 2A 48 02 F0 D0 FD 03 46 (1712582272.713284) can0 760 [8] 2B 0B 4A 13 60 0B 4A 00 (1712582272.713675) can0 760 [8] 2C 21 0B 48 02 F0 C8 FD (1712582272.713808) can0 760 [8] 2D 03 46 0A 4A 13 60 02 (1712582272.714087) can0 760 [8] 2E F0 8F FD FE E7 A4 00 (1712582272.714315) can0 760 [8] 2F 00 20 00 00 00 20 CC (1712582272.714547) can0 760 [8] 20 00 00 20 D8 5A 01 08 (1712582272.714829) can0 760 [8] 21 D5 05 01 08 14 01 00 (1712582272.715061) can0 760 [8] 22 20 FC 5A 01 08 09 06 (1712582272.715297) can0 760 [8] 23 01 08 18 01 00 20 80 (1712582272.715602) can0 760 [8] 24 B5 90 B0 00 AF 07 F1 (1712582272.715791) can0 760 [8] 25 18 03 28 22 00 21 18 (1712582272.716022) can0 760 [8] 26 46 05 F0 48 FA 3B 1D (1712582272.716252) can0 760 [8] 27 00 22 1A 60 5A 60 9A (1712582272.716480) can0 760 [8] 28 60 DA 60 1A 61 02 23 (1712582272.716705) can0 760 [8] 29 BB 61 01 23 BB 62 10 (1712582272.716936) can0 760 [8] 2A 23 FB 62 00 23 7B 63 (1712582272.717169) can0 760 [8] 2B 07 F1 18 03 18 46 01 (1712582272.717531) can0 760 [8] 2C F0 AC FC 03 46 00 2B (1712582272.717703) can0 760 [8] 2D 01 D0 00 F0 09 F9 0F (1712582272.717931) can0 760 [8] 2E 23 7B 60 00 23 BB 60 (1712582272.718159) can0 760 [8] 2F 00 23 FB 60 00 23 3B (1712582272.718554) can0 760 [8] 20 61 00 23 7B 61 3B 1D (1712582272.718708) can0 760 [8] 21 00 21 18 46 01 F0 1A (1712582272.718941) can0 760 [8] 22 FF 03 46 00 2B 01 D0 (1712582272.719171) can0 760 [8] 23 00 F0 F5 F8 00 BF 40 (1712582272.719409) can0 760 [8] 24 37 BD 46 80 BD 00 00 (1712582272.719638) can0 760 [8] 25 80 B5 00 AF 17 4B 18 (1712582272.719864) can0 760 [8] 26 4A 1A 60 16 4B 02 22 (1712582272.720090) can0 760 [8] 27 5A 60 14 4B 00 22 9A (1712582272.720315) can0 760 [8] 28 60 13 4B 00 22 DA 60 (1712582272.720698) can0 760 [8] 29 11 4B 4F F4 A0 22 1A (1712582272.720867) can0 760 [8] 2A 61 0F 4B 00 22 5A 61 (1712582272.721093) can0 760 [8] 2B 0E 4B 00 22 1A 76 0C (1712582272.721341) can0 760 [8] 2C 4B 01 22 5A 76 0B 4B (1712582272.721571) can0 760 [8] 2D 01 22 9A 76 09 4B 00 (1712582272.721826) can0 760 [8] 2E 22 DA 76 08 4B 00 22 (1712582272.722084) can0 760 [8] 2F 1A 77 06 4B 01 22 5A (1712582272.722359) can0 760 [8] 20 77 05 48 00 F0 12 FB (1712582272.722515) can0 760 [8] 21 03 46 00 2B 01 D0 00 (1712582272.722797) can0 760 [8] 22 F0 C1 F8 00 BF 80 BD (1712582272.723056) can0 760 [8] 23 00 BF A4 00 00 20 00 (1712582272.723284) can0 760 [8] 24 64 00 40 80 B5 00 AF (1712582272.723512) can0 760 [8] 25 11 4B 12 4A 1A 60 10 (1712582272.723695) can0 760 [8] 26 4B 4F F4 E1 32 5A 60 (1712582272.724067) can0 760 [8] 27 0E 4B 00 22 9A 60 0C (1712582272.724208) can0 760 [8] 28 4B 00 22 DA 60 0B 4B (1712582272.724523) can0 760 [8] 29 00 22 1A 61 09 4B 0C (1712582272.724703) can0 760 [8] 2A 22 5A 61 08 4B 00 22 (1712582272.724931) can0 760 [8] 2B 9A 61 06 4B 00 22 DA (1712582272.725173) can0 760 [8] 2C 61 05 48 02 F0 EA FA (1712582272.725399) can0 760 [8] 2D 03 46 00 2B 01 D0 00 (1712582272.725732) can0 760 [8] 2E F0 97 F8 00 BF 80 BD (1712582272.725873) can0 760 [8] 2F 00 BF CC 00 00 20 00 (1712582272.726256) can0 760 [8] 20 44 00 40 80 B5 88 B0 (1712582272.726409) can0 760 [8] 21 00 AF 07 F1 10 03 00 (1712582272.726636) can0 760 [8] 22 22 1A 60 5A 60 9A 60 (1712582272.726861) can0 760 [8] 23 DA 60 1D 4B 9B 69 1C (1712582272.727087) can0 760 [8] 24 4A 43 F0 40 03 93 61 (1712582272.727409) can0 760 [8] 25 1A 4B 9B 69 03 F0 40 (1712582272.727581) can0 760 [8] 26 03 FB 60 FB 68 17 4B (1712582272.727816) can0 760 [8] 27 9B 69 16 4A 43 F0 04 (1712582272.728046) can0 760 [8] 28 03 93 61 14 4B 9B 69 (1712582272.728284) can0 760 [8] 29 03 F0 04 03 BB 60 BB (1712582272.728682) can0 760 [8] 2A 68 11 4B 9B 69 10 4A (1712582272.728816) can0 760 [8] 2B 43 F0 08 03 93 61 0E (1712582272.729059) can0 760 [8] 2C 4B 9B 69 03 F0 08 03 (1712582272.729285) can0 760 [8] 2D 7B 60 7B 68 00 22 40 (1712582272.729512) can0 760 [8] 2E 21 0B 48 01 F0 E3 FB (1712582272.729806) can0 760 [8] 2F 40 23 3B 61 01 23 7B (1712582272.730034) can0 760 [8] 20 61 00 23 BB 61 02 23 (1712582272.730265) can0 760 [8] 21 FB 61 07 F1 10 03 19 (1712582272.730491) can0 760 [8] 22 46 04 48 01 F0 75 F9 (1712582272.730715) can0 760 [8] 23 00 BF 20 37 BD 46 80 (1712582272.730943) can0 760 [8] 24 BD 00 BF 00 10 02 40 (1712582272.731185) can0 760 [8] 25 00 18 01 40 80 B5 84 (1712582272.731505) can0 760 [8] 26 B0 00 AF 78 60 09 4A (1712582272.731743) can0 760 [8] 27 07 F1 08 03 92 E8 03 (1712582272.731932) can0 760 [8] 28 00 83 E8 03 00 07 F1 (1712582272.732198) can0 760 [8] 29 08 03 1A 46 4F F4 E0 (1712582272.732436) can0 760 [8] 2A 61 08 20 FF F7 1B FE (1712582272.732724) can0 760 [8] 2B 4F F4 7A 70 02 F0 5D (1712582272.732859) can0 760 [8] 2C FD EB E7 AC 5A 01 08 (1712582272.733087) can0 760 [8] 2D 80 B5 86 B0 00 AF 78 (1712582272.733316) can0 760 [8] 2E 60 09 4A 07 F1 0C 03 (1712582272.733699) can0 760 [8] 2F 07 CA 03 C3 1A 80 07 (1712582272.733871) can0 760 [8] 20 F1 0C 03 1A 46 40 F2 (1712582272.734105) can0 760 [8] 21 01 71 02 20 FF F7 02 (1712582272.734337) can0 760 [8] 22 FE 40 F6 B8 30 02 F0 (1712582272.734565) can0 760 [8] 23 44 FD EC E7 00 BF B4 (1712582272.734796) can0 760 [8] 24 5A 01 08 80 B5 82 B0 (1712582272.735034) can0 760 [8] 25 00 AF 78 60 7B 68 1B (1712582272.735262) can0 760 [8] 26 68 04 4A 93 42 01 D1 (1712582272.735583) can0 760 [8] 27 00 F0 13 FA 00 BF 08 (1712582272.735813) can0 760 [8] 28 37 BD 46 80 BD 00 BF (1712582272.736047) can0 760 [8] 29 00 2C 01 40 80 B4 00 (1712582272.736274) can0 760 [8] 2A AF 72 B6 00 BF FE E7 (1712582272.736512) can0 760 [8] 2B 00 00 80 B5 84 B0 00 (1712582272.736690) can0 760 [8] 2C AF 18 4B 9B 69 17 4A (1712582272.737042) can0 760 [8] 2D 43 F0 01 03 93 61 15 (1712582272.737196) can0 760 [8] 2E 4B 9B 69 03 F0 01 03 (1712582272.737432) can0 760 [8] 2F BB 60 BB 68 12 4B DB (1712582272.737705) can0 760 [8] 20 69 11 4A 43 F0 80 53 (1712582272.737933) can0 760 [8] 21 D3 61 0F 4B DB 69 03 (1712582272.738159) can0 760 [8] 22 F0 80 53 7B 60 7B 68 (1712582272.738386) can0 760 [8] 23 00 22 0F 21 6F F0 01 (1712582272.738612) can0 760 [8] 24 00 01 F0 C6 F8 0A 4B (1712582272.738931) can0 760 [8] 25 5B 68 FB 60 FB 68 23 (1712582272.739138) can0 760 [8] 26 F0 E0 63 FB 60 FB 68 (1712582272.739362) can0 760 [8] 27 43 F0 80 73 FB 60 04 (1712582272.739719) can0 760 [8] 28 4A FB 68 53 60 00 BF (1712582272.739858) can0 760 [8] 29 10 37 BD 46 80 BD 00 (1712582272.740086) can0 760 [8] 2A BF 00 10 02 40 00 00 (1712582272.740482) can0 760 [8] 2B 01 40 80 B5 8A B0 00 (1712582272.740614) can0 760 [8] 2C AF 78 60 07 F1 14 03 (1712582272.740839) can0 760 [8] 2D 00 22 1A 60 5A 60 9A (1712582272.741064) can0 760 [8] 2E 60 DA 60 7B 68 1B 68 (1712582272.741297) can0 760 [8] 2F 2D 4A 93 42 53 D1 2C (1712582272.741534) can0 760 [8] 20 4B DB 69 2B 4A 43 F0 (1712582272.741806) can0 760 [8] 21 00 73 D3 61 29 4B DB (1712582272.742053) can0 760 [8] 22 69 03 F0 00 73 3B 61 (1712582272.742307) can0 760 [8] 23 3B 69 26 4B 9B 69 25 (1712582272.742558) can0 760 [8] 24 4A 43 F0 08 03 93 61 (1712582272.742808) can0 760 [8] 25 23 4B 9B 69 03 F0 08 (1712582272.743062) can0 760 [8] 26 03 FB 60 FB 68 4F F4 (1712582272.743297) can0 760 [8] 27 80 73 7B 61 00 23 BB (1712582272.743532) can0 760 [8] 28 61 00 23 FB 61 07 F1 (1712582272.743703) can0 760 [8] 29 14 03 19 46 1C 48 01 (1712582272.743946) can0 760 [8] 2A F0 B3 F8 4F F4 00 73 (1712582272.744252) can0 760 [8] 2B 7B 61 02 23 BB 61 03 (1712582272.744479) can0 760 [8] 2C 23 3B 62 07 F1 14 03 (1712582272.744705) can0 760 [8] 2D 19 46 16 48 01 F0 A6 (1712582272.744932) can0 760 [8] 2E F8 15 4B 5B 68 7B 62 (1712582272.745158) can0 760 [8] 2F 7B 6A 23 F4 C0 43 7B (1712582272.745552) can0 760 [8] 20 62 7B 6A 43 F0 E0 63 (1712582272.745707) can0 760 [8] 21 7B 62 7B 6A 43 F4 80 (1712582272.745931) can0 760 [8] 22 43 7B 62 0E 4A 7B 6A (1712582272.746160) can0 760 [8] 23 53 60 00 22 05 21 13 (1712582272.746386) can0 760 [8] 24 20 01 F0 56 F8 13 20 (1712582272.746611) can0 760 [8] 25 01 F0 6F F8 00 22 05 (1712582272.746836) can0 760 [8] 26 21 14 20 01 F0 4E F8 (1712582272.747159) can0 760 [8] 27 14 20 01 F0 67 F8 00 (1712582272.747386) can0 760 [8] 28 BF 28 37 BD 46 80 BD (1712582272.747612) can0 760 [8] 29 00 64 00 40 00 10 02 (1712582272.747846) can0 760 [8] 2A 40 00 0C 01 40 00 00 (1712582272.748090) can0 760 [8] 2B 01 40 80 B5 82 B0 00 (1712582272.748331) can0 760 [8] 2C AF 78 60 7B 68 1B 68 (1712582272.748561) can0 760 [8] 2D 0B 4A 93 42 10 D1 0B (1712582272.748833) can0 760 [8] 2E 4B DB 69 0A 4A 23 F0 (1712582272.749017) can0 760 [8] 2F 00 73 D3 61 4F F4 40 (1712582272.749262) can0 760 [8] 20 71 08 48 01 F0 F8 F9 (1712582272.749489) can0 760 [8] 21 13 20 01 F0 52 F8 14 (1712582272.749847) can0 760 [8] 22 20 01 F0 4F F8 00 BF (1712582272.749980) can0 760 [8] 23 08 37 BD 46 80 BD 00 (1712582272.750206) can0 760 [8] 24 64 00 40 00 10 02 40 (1712582272.829463) can0 768 [4] 03 7F 36 78 (1712582272.923409) can0 768 [3] 02 76 01
Alright, we see that it fails to receive and that you have 30msec margin. Now, what if you increase the timeout value, we could see the latency for the application layer to pickup the readiness of the transport layer. Most likely above 30msec.
I've changed "latency" parameter inside my program and the result is the same: Could be a problem that the uds client library send last CAN message to TX buffer to PEAK cable and then immediately starts count time to 100ms without "sent check"? Thank you :-)
last few rows of sniffed communication: (1712584566.234136) can0 760 [8] 22 20 01 F0 4F F8 00 BF (1712584566.234364) can0 760 [8] 23 08 37 BD 46 80 BD 00 (1712584566.234592) can0 760 [8] 24 64 00 40 00 10 02 40 (1712584566.293713) can0 768 [4] 03 7F 36 78 (1712584566.408078) can0 768 [3] 02 76 01
By the way -> Do you know what is common P2 Timer in UDS-CAN devices? I saw 150ms in devices which I have. The communication is working well from around 500ms.
Please reshare both full logs with a timeout that is long enough
For the correct value, it's tricky. it's a matter of the interval boundary location. ISO-14229 says end of transmit, begin of receive. But this repo does begin of transmit, end of receive. It is possible to have end of transmit/end of receive by using a blocking send.
Here are logs of communication between my bootloader of ECU and UDS client with 500ms P2 Timer. I bet it's caused by filling of buffer as you mentioned that you start timeout when you begin transmit. I'll check if there is possible to set TX buffer only for one message as parameter of PEAK. Logs are in attachment, because they are large. Thank you for your support. :+1: python_log.txt can_sniff.txt
Check the logs. Start of transmit : 701ms End of transmit : 765ms Receive response: 939ms
Therefore, you need 238 ms from start to finish. And 174ms to get a response. The issue is that the transmit time is part of the timeout calculation. This issue as been flagged a long time ago.
You can do a blocking send to start the timer at the end of the transmission. Depends on your connection. If you use the isotp socket, there's a flag you can set. If you use my isotp python implementation, there's a parameter for this, given that you use the latest version.
Hello Pylessard,
thank you. I appreciate your help! The response is long, because timer P2 doesn't require sending of "response pending frame" during writing to flash memory. I will set P2 timer to 500ms and it will be sufficient. I am using this type of connection - conn = IsoTPSocketConnection('can0', isotp.Address(isotp.AddressingMode.Normal_11bits, rxid=0x768, txid=0x760)) How can I add the parameter to IsoTPSocketConnection setup? To be honest I don't know if I am using your isotp implementation or isotp socket. :sweat_smile: According to connection setup from your example I bet I am using isotp socket. Or should I set that during can0 initialization?
yeah ok, you would find allt he information in the doc. I can recap quickly.
The comm stack is Application -> Transport -> DataLink (uds -> isotp -> can).
On linux, you can do isotp/can with a kernel module that you interact with with a socket. By using IsoTPSocketConnection
, you use that.
You can also use a pure python implementation of isotp that I wrote, it will send the data to python-can, another library to do CAN in python.
You can make your own socket and give it to the IsoTPSocketConnection
object. You want to create a socket with the WAIT_TX_DONE
flag set and give it to the connection. Something likethis (untested)
import isotp
from udsoncan.connections import IsoTPSocketConnection
sock = isotp.socket()
flags = socket.get_opts().optflag
sock.set_opts(optflags=flags | isotp.flags.WAIT_TX_DONE)
conn = IsoTPSocketConnection('can0', address, tpsock=sock)
But looking at the doc, this flags blocks the send() method until the data is passed down to the CAN layer. The CAN layer will most likely buffers the data, emptying the isotp layer. Since you have a blocksize of 0, all the data will be sent a once. This might not give much improvement actually... that is a design weakness
ISO-15765 specify that each lyer should inform the upper layer when it is finished, but neither my python implementation nor the kernel module does it.
If you think the issue is resolved, please close it. Thanks
Hello Pylessard,
wow, interesting. Thank you for your final summary. I will try to create my own socket. If I will be successful I paste here a solution. Now it's absolutely clear and thank you very much for your help. Your python program is cool. :-)
Standa.
Hi @stanislavZemek @pylessard I want to ask about memory location to check memory after finished transfering driver data. I used method client.start_routine(RID, byte_checksum) after request transfer exit, I also calculated crc of all data chunk transfered and it matched with crc calculated from .s19 file, but it seemed ECU return incorrectResult then I was not able to clear Application memory (received NRC24). Was it because I was checking in wrong memloc? Do I need to point to that particular memloc?
To clear memory: client.start_routine(0xFF00, byte 0x44 + byte memory address + byte memory size)
Thank you guys.
Hello @funnyrabbitvu, if I understand correctly, you are attempting to erase memory inside some ECU via UDS protocol. Due to mentioned NRC I think you are not in programming UDS session. I don't know if your ECU require Secure Access (0x27) to start erase memory routine. The start address of the program and the memory size depends on the ECU manufacturer.
For different problems, please open a new issue. Also you need to shares can logs + description of the issue you encountered.
Note that all ECU are differents, and a given NRC can happens in different conditions based on the ecu.
Hello, at first, very nice library which works with socketcan. Good job! I maybe found a problem with this library. I am sending 2048 bytes of data to my developed ECU via UDS protocol from tester program which contains your python library. After receiving first block of data from PEAK cable my ECU sent confirm frame back to tester in properly time, but the udsoncan library either wrote warning: 2024-04-04 13:31:03 [ERROR] UdsClient: [TimeoutException] : Did not receive response in time. P2 timeout time has expired (timeout=0.200 sec)
Sniffed communication: (1712230262.871388) can0 760 [8] 18 02 36 01 00 00 01 20 (1712230262.873197) can0 768 [3] 30 00 00 (1712230262.873296) can0 760 [8] 21 A1 06 01 08 45 06 01 (1712230262.873443) can0 760 [8] 22 08 4B 06 01 08 51 06 (1712230262.873588) can0 760 [8] 23 01 08 57 06 01 08 5D (1712230262.873726) can0 760 [8] 24 06 01 08 00 00 00 00 (1712230262.873864) can0 760 [8] 25 00 00 00 00 00 00 00 (1712230262.874002) can0 760 [8] 26 00 00 00 00 00 E1 40 (1712230262.874158) can0 760 [8] 27 01 08 63 06 01 08 00 (1712230262.874296) can0 760 [8] 28 00 00 00 C1 42 01 08 ** next messages **** (1712230262.934464) can0 760 [8] 2E 60 00 BF 14 37 BD 46 (1712230262.934738) can0 760 [8] 2F 80 BC 70 47 00 BF 00 (1712230262.934872) can0 760 [8] 20 ED 00 E0 80 B4 00 AF (1712230262.935191) can0 760 [8] 21 04 4B DB 68 1B 0A 03 (1712230262.935418) can0 760 [8] 22 F0 07 03 18 46 BD 46 (1712230262.935647) can0 760 [8] 23 80 BC 70 47 00 BF 00 (1712230262.935874) can0 760 [8] 24 ED 00 E0 80 B4 83 B0 (1712230263.103335) can0 768 [3] 02 76 01
As you can see last row contain response from my unit and the response time from last message is is lower than P2 time. Do you have any idea where should be a problem? Can be that a problem with buffering inside PEAK cable? Thank you very much for your response in advance and wish you good luck with projects like this.