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

CANXL support for ASC conversion tools #573

Merged
merged 11 commits into from
Jan 24, 2025

Conversation

hartkopp
Copy link
Member

With the documentation which comes with the CANalyser 18SP3 Demo version the tools log2asc and asc2log were made CAN XL capable.

While testing with CANalyser 18SP3 a bug in the ASC file generation was found (CAN CC frames with zero data length) which is announced to be fixed in CANalyser 18SP4 and the new CANalyser 19 in April 2025.

@marckleinebudde
Copy link
Member

Please don't forget to send e64d45b to the linux-can ML.

@hartkopp
Copy link
Member Author

hartkopp commented Jan 24, 2025

Yes, it is already here:
https://lore.kernel.org/linux-can/[email protected]/

But the process for the CAN XL bitrate setting is currently stuck as there was no feedback from Vincent.

If you agree that CAN_CTRLMODE_XL_RRS can be set at the (bit) position suggested in my patch, I can send this single patch separately for can-next.

Edit: I can also send the changes for can.h and we leave the referenced CAN_CTRLMODE_XL_RRS open ...

@marckleinebudde
Copy link
Member

Yes, please send a patch adding this bit (+ comment update) only. Let's decide later on if we need CAN_CTRLMODE_XL_RRS and on its semantics.

asc2log.c Outdated Show resolved Hide resolved
asc2log.c Outdated Show resolved Hide resolved
@hartkopp
Copy link
Member Author

Yes, please send a patch adding this bit (+ comment update) only. Let's decide later on if we need CAN_CTRLMODE_XL_RRS and on its semantics.

Ok, I will send a patch only focusing on can.h and on CANXL_RRS.

asc2log.c Outdated Show resolved Hide resolved
asc2log.c Outdated Show resolved Hide resolved
Signed-off-by: Oliver Hartkopp <[email protected]>
TxRq messages are internal measurement messages that document the time of
a transmission request (to the CAN driver) to be checked against the real
transmission time, when the CAN message has been sent.

There is no such feature in the SocketCAN log format, so we detect this
tag but skip TxRq messages in the ASC log files.

Signed-off-by: Oliver Hartkopp <[email protected]>
The Remote Request Substitution bit is a dominant bit ("0") in the CAN XL
frame. As some CAN XL controllers support to access this bit a new
CANXL_RRS value has been defined for the canxl_frame.flags element.

Signed-off-by: Oliver Hartkopp <[email protected]>
Since using the %n feature the tmp1 buffer is only used for the handling
of the CAN identifier. So this buffer can be shrinked for that use case.

Signed-off-by: Oliver Hartkopp <[email protected]>
Signed-off-by: Oliver Hartkopp <[email protected]>
The ASC file provides an information whether the CAN frame is sent (Tx)
or received (Rx) on the local CAN node.

With the new '-d' option the generation of this information is disabled
for the log file generation to simplify the comparision of log files.

E.g. log1 -> asc -> log2 always created the T/R information in the log2
file which is then hard to compare to the log1 file which might not
have the T/R information at all.

Signed-off-by: Oliver Hartkopp <[email protected]>
@hartkopp
Copy link
Member Author

The can.h patch has already been sent to the Linux CAN ML:
https://lore.kernel.org/linux-can/[email protected]/T/#u

@marckleinebudde marckleinebudde merged commit 01083a6 into linux-can:master Jan 24, 2025
12 checks passed
@hartkopp hartkopp deleted the canxl-asc-conversion branch January 24, 2025 16:29
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

Successfully merging this pull request may close these issues.

2 participants