python-can icon indicating copy to clipboard operation
python-can copied to clipboard

Fix so *.asc files created by canASCwriter can be read by Vector CANalyzer

Open nateimig18 opened this issue 4 years ago • 3 comments

https://github.com/hardbyte/python-can/blob/ab793f681017e525244647b8a39a13c1e7ac32b5/can/io/asc.py#L176

Im not sure if this was intentional but it seems like Vector CANalyzer does not like header timestamps in terms of microseconds and refuses to import the "asc" log to view or replay.

The fix:

now = (lambda x: x.strftime('%a %b %m %I:%M:%S.%f')[:-3]+x.strftime(' %p %Y'))(datetime.now())

nateimig18 avatar Oct 07 '21 17:10 nateimig18

Hm, it would be nice if Vector changed their implementation. It would make the tool more robust to other input (e.g. ours) and the data more precise.

felixdivo avatar Nov 10 '21 13:11 felixdivo

Hm, it would be nice if Vector changed their implementation. It would make the tool more robust to other input (e.g. ours) and the data more precise.

The ASC file format is a grown file format from the start of this century. And Vector is pretty clear when you look into the can_log_trigger_asc_format.pdfyou can see the liability disclaimer. It's just a neat documentation - no guaranties ;-)

You might also check asc2log and log2asc from the SocketCAN can-utils (https://github.com/linux-can/can-utils). I did my very best there to provide a CAN FD capable converter for the ASC format (to the SocketCAN/Linux CAN log format).

hartkopp avatar Nov 10 '21 15:11 hartkopp

you can see the liability disclaimer

Sure 😃, but better compatibility with such an easy fix is something that I'd expect as a customer.

felixdivo avatar Nov 10 '21 20:11 felixdivo

@zariiii9003 This was resolved in https://github.com/hardbyte/python-can/pull/1362.

j-c-cook avatar Nov 14 '22 00:11 j-c-cook