According to the ISO, in service 0x38, the parameter “filePathAndNameLength” should be encoded on 2 bytes in the Request Message Definition.
This is not the case in your implementation, on RequestFileTransfer.py file, here.
path_ascii = path.encode('ascii')
if len(path_ascii) > 0xFF:
raise ValueError('Path length must be smaller or equal than 255 bytes when encoded in ASCII')
Max path length parameter should be 0xFFFF (65535 bytes).
As a consequence here, since our path is encoded in less than 0xFF, we continue to build a corrupted request:
data += len(path_ascii).to_bytes(1, 'big')
data += path_ascii](url)
So the first byte of the path will be stripped on the ECU side as the second byte of path length.
I hope the issue is clear, let me know if you need any further information.
Hello @pylessard ,
According to the ISO, in service 0x38, the parameter “filePathAndNameLength” should be encoded on 2 bytes in the Request Message Definition.
This is not the case in your implementation, on RequestFileTransfer.py file, here.
Max path length parameter should be 0xFFFF (65535 bytes).
As a consequence here, since our path is encoded in less than 0xFF, we continue to build a corrupted request:
So the first byte of the path will be stripped on the ECU side as the second byte of path length.
I hope the issue is clear, let me know if you need any further information.