Quantcast
Viewing all articles
Browse latest Browse all 14069

get data from ECU - issue with FD

I'm trying to get information from the ECU. The connection works, and I see that the request has been sent but I don't receive any information. Because the application (which is burned in the unit and I work in front of it) checks that the FDflag exists and therefore I need it. I added the flag but it comes off, not received. In any case, I did not receive the information I requested. (I am using VN5620 as a CAN Interface)

my code to connection:

# Create connectionbus = Bus(interface='vector', app_name='CANalyzer', channel=0, bitrate=250000)# Network layer addressing schemetp_addr = isotp.Address(isotp.AddressingMode.Normal_29bits, txid=0x1C440019, rxid=0x1C460019)# Network/Transport layer (IsoTP protocol)stack = isotp.CanStack(bus=bus, address=tp_addr, params=isotp_params)# Speed First (do not sleep)stack.set_sleep_timing(0, 0)# Set up the ISO-TP connection using the appropriate CAN bus interface and parameterstp_connection = PythonIsoTpConnection(stack)

my code to request:

with Client(tp_connection, request_timeout=1, config=config) as client:    try:        response = client.tester_present()        if response.valid:            # Extract the data from the response            data = response.service_data.values[data_identifier]            # Print the response data            print(f"Response data: {data}")        else:            print("Error: Invalid response")    finally:        client.close()

the log:

2024-02-13 12:39:13 [INFO] Connection: Connection opened2024-02-13 12:39:13 [INFO] UdsClient: TesterPresent<0x3e> - Sending TesterPresent request2024-02-13 12:39:13 [DEBUG] Connection: Sending 2 bytes : [3e00]Traceback (most recent call last):  File "C:\workspace\companion_chip_automation\Tests\UdsOnCanTest\tring_test.py", line 86, in <module>    response = client.tester_present()  File "C:\workspace\venv_3.8\lib\site-packages\udsoncan\client.py", line 174, in decorated    return func(self, *args, **kwargs)  File "C:\workspace\venv_3.8\lib\site-packages\udsoncan\client.py", line 391, in tester_present    response = self.send_request(req)  File "C:\workspace\venv_3.8\lib\site-packages\udsoncan\client.py", line 2184, in send_request    raise TimeoutException('Did not receive response in time. %s time has expired (timeout=%.3f sec)' %udsoncan.exceptions.TimeoutException: Did not receive response in time. Global request timeout time has expired (timeout=1.000 sec)2024-02-13 12:39:14 [DEBUG] Connection: No data received: [TimeoutException] - Did not receive IsoTP frame from the Transport layer in time (timeout=1.0 sec)2024-02-13 12:39:14 [ERROR] UdsClient: [TimeoutException] : Did not receive response in time. Global request timeout time has expired (timeout=1.000 sec)

Could you help me to get the first response and solve this issue?


Viewing all articles
Browse latest Browse all 14069

Trending Articles