pylessard / python-udsoncan

Python implementation of UDS (ISO-14229) standard.
MIT License
564 stars 195 forks source link

WriteDataByIdentifier service execution returned a negative response IncorrectMessageLengthOrInvalidFormat (0x13) when data length is correct #215

Closed funnyrabbitvu closed 4 months ago

funnyrabbitvu commented 4 months ago

Hi @pylessard,

While using service 2E, I received NRC 13 even the data length is correct and used bytes format. [NegativeResponseException] : WriteDataByIdentifier service execution returned a negative response IncorrectMessageLengthOrInvalidFormat (0x13) Server refused our request for service WriteDataByIdentifier with code "IncorrectMessageLengthOrInvalidFormat" (0x13)

Please help me to check this. Thank you!

pylessard commented 4 months ago

I cannot check anything, you haven't shared anything. Share code and log to get help

The negative response comes from your ECU, not this lib

funnyrabbitvu commented 4 months ago

I cannot check anything, you haven't shared anything. Share code and log to get help

The negative response comes from your ECU, not this lib

Hi, I tried writing 16 bytes data to the ECU's DID (defined by the ECU). I also defined this DID codec in my configurations.

client.write_data_by_identifier(DID, b"\x00\x20\x00 \x00\x00\x25\x00\x000\x00\x00%\x00\x00\x00")

pylessard commented 4 months ago

Your ECU refuses it. I can't do much. Check your log

funnyrabbitvu commented 4 months ago

Checked issue from ECU side. I will close this issue. Thank you!