Skip to content

Conversation

@occam25
Copy link
Contributor

@occam25 occam25 commented May 12, 2025

Summary

I was unable to receive error frame messages in RAW mode because the code to enable error frames in the raw socket was missing (although the CAN_ERR_FLAG is checked for every frame).

I have added the code to enable the error frames in the raw socket after it is created (it makes sense to do it there because in RAW mode the user expects to receive everything).

Now I do receive the error messages as expected.

@hartkopp
Copy link
Member

Hello @occam25 ,
thanks for your patch!

The Error Messages can create a very high traffic load. Therefore switching "on" everything by default is not a good choice.

I would suggest to create a new command line option
{ "error-mask", required_argument, 0, 'e' },
where a user can provide an optional 32 bit error mask which is usually disabled by default.
Only expert users who know what they are doing should enable this option.

@hartkopp hartkopp self-assigned this May 12, 2025
@occam25
Copy link
Contributor Author

occam25 commented May 12, 2025

Hi @hartkopp ,
makes total sense. I have added the suggested option. Thanks!

@occam25
Copy link
Contributor Author

occam25 commented May 12, 2025

The check that is failing seems to be a dependency problem when podman tries to build the image, nothing related to my changes

@marckleinebudde
Copy link
Member

The check that is failing seems to be a dependency problem when podman tries to build the image, nothing related to my changes

yes, Debian experimental is sometimes inconsistent. no worries.

Copy link
Member

@marckleinebudde marckleinebudde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, and implementing the requests by Oliver. I've some minor nitpicks.

@occam25 occam25 force-pushed the enable_error_frame_reception_in_raw_mode branch from 148571a to cd56d66 Compare May 12, 2025 20:41
@hartkopp hartkopp merged commit d9880ef into linux-can:master May 13, 2025
@hartkopp
Copy link
Member

Merged to master and reworked the help text afterwards.
Thanks @occam25 @marckleinebudde !

Copy link
Member

@marckleinebudde marckleinebudde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants