-
Notifications
You must be signed in to change notification settings - Fork 659
Closed
Labels
Description
Describe the bug
I encountered an issue when using python-can to parse BLF files. Specifically, when parsing BLF files generated by certain tools(Tsmaster), I observed incorrect payload data in 64-byte CAN FD frames. The problem consistently appears starting at 48 bytes. However, the same BLF files can be parsed correctly using Tsmasterand CANoe.
CANoe:

python-can:
Please investigate this issue. Thank you!
To Reproduce
I have attached the BLF file.
2024_12_31_14_09_35.zip
from can import BLFReader
import sys
def read_blf(file_path):
try:
with BLFReader(file_path) as reader:
for msg in reader:
if msg.arbitration_id== 0x6a9:
print("***********************************")
print(f"Raw Data: {msg.data.hex()}")
print(f"Timestamp: {msg.timestamp} s")
print(f"Channel: {msg.channel}")
print(f"ID: {hex(msg.arbitration_id)}")
print(f"Data: {msg.data.hex()}")
print(f"Length: {msg.dlc}")
print("-" * 50)
print("***********************************")
except Exception as e:
print(f"read BLF file error: {e}")
if __name__ == "__main__":
if len(sys.argv) != 2:
sys.exit(1)
blf_file = sys.argv[1]
read_blf(blf_file)Expected behavior
Additional context
OS and version: windows 11
Python version:Python 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32
python-can version:4.5.0
python-can interface/s (if applicable):
