Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server responds with different ids #54

Open
d84812 opened this issue Oct 14, 2024 · 1 comment
Open

Server responds with different ids #54

d84812 opened this issue Oct 14, 2024 · 1 comment

Comments

@d84812
Copy link

d84812 commented Oct 14, 2024

Today I faced with a weird behavior with doipclient + udsoncan library, after connection is established, my app sends data identifier requests, but receives replies to the other ones. This is related to the only one DOIP server.

Seems like some garbage on rx buffer. I managed this by deleting Ethernet adapter and reinstalling it.
But after 5-10 minutes it happened again. No antivirus SW on that PC.

Example: requested f186, but received db94, etc.

What is going on there? Any ideas?

2024-10-14 13:21:25 [INFO] UdsClient: ReadDataByIdentifier<0x22> - Reading data identifier : 0xf186 (ActiveDiagnosticSessionDataIdentifier)
2024-10-14 13:21:25 [DEBUG] Connection: Sending 3 bytes : [22f186]
2024-10-14 13:21:25 [DEBUG] Connection: Received 7 bytes : [62db9441400000]
2024-10-14 13:21:25 [INFO] UdsClient: Received positive response for service ReadDataByIdentifier (0x22) from server.
2024-10-14 13:21:25 [ERROR] UdsClient: [UnexpectedResponseException] : ReadDataByIdentifier service execution returned a valid response but unexpected. Details : Server returned values for data identifier 0xdb94 that was not requested and no Codec was defined for it. Parsing must be stopped. 
2024-10-14 13:21:25 [INFO] UdsClient: TesterPresent<0x3e> - Sending TesterPresent request
2024-10-14 13:21:25 [DEBUG] Connection: Sending 2 bytes : [3e80]
2024-10-14 13:21:25 [INFO] UdsClient: ReadDataByIdentifier<0x22> - Reading data identifier : 0xf186 (ActiveDiagnosticSessionDataIdentifier)
2024-10-14 13:21:25 [DEBUG] Connection: Sending 3 bytes : [22f186]
2024-10-14 13:21:25 [DEBUG] Connection: Received 7 bytes : [62dba000000000]
2024-10-14 13:21:25 [INFO] UdsClient: Received positive response for service ReadDataByIdentifier (0x22) from server.
2024-10-14 13:21:25 [ERROR] UdsClient: [UnexpectedResponseException] : ReadDataByIdentifier service execution returned a valid response but unexpected. Details : Server returned values for data identifier 0xdba0 that was not requested and no Codec was defined for it. Parsing must be stopped. 
2024-10-14 13:21:25 [INFO] UdsClient: TesterPresent<0x3e> - Sending TesterPresent request
2024-10-14 13:21:25 [DEBUG] Connection: Sending 2 bytes : [3e80]
2024-10-14 13:21:26 [INFO] UdsClient: ReadDataByIdentifier<0x22> - Reading data identifier : 0xf186 (ActiveDiagnosticSessionDataIdentifier)
2024-10-14 13:21:26 [DEBUG] Connection: Sending 3 bytes : [22f186]
2024-10-14 13:21:26 [DEBUG] Connection: Received 4 bytes : [62f18601]
2024-10-14 13:21:26 [INFO] UdsClient: Received positive response for service ReadDataByIdentifier (0x22) from server.
2024-10-14 13:21:26 [INFO] UdsClient: TesterPresent<0x3e> - Sending TesterPresent request
2024-10-14 13:21:26 [DEBUG] Connection: Sending 2 bytes : [3e80]
2024-10-14 13:21:26 [INFO] UdsClient: ReadDataByIdentifier<0x22> - Reading data identifier : 0xf106 (IdentificationOptionVehicleManufacturerSpecificDataIdentifier)
2024-10-14 13:21:26 [DEBUG] Connection: Sending 3 bytes : [22f106]
2024-10-14 13:21:26 [DEBUG] Connection: Received 7 bytes : [62db9441400000]
@jacobschaer
Copy link
Owner

Do you do UDS resets or otherwise reset the socket? Seems suspicious of the ECU though if you're getting the wrong DID but not the wrong service. I'd be more inclined to think your DID codec is wrong size or the ECU is not following the spec. This is at the UDS layer though, I don't see any evidence to implicate the DOIP layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants