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

Error in decoding J1939 frames #129

Closed
acode-x opened this issue Jan 9, 2023 · 1 comment
Closed

Error in decoding J1939 frames #129

acode-x opened this issue Jan 9, 2023 · 1 comment

Comments

@acode-x
Copy link

acode-x commented Jan 9, 2023

Hi,

I am using a demo J1939 DBC file from CSSElectronics.
Here is the example I am testing dbcppp with

BO_ 2364540158 EEC1: 8 Vector__XXX
> cansend vcan0 0CF00400#FFFFFF6813FFFFFF

I notice the DBC ID is 32bits (2364540158) and CAN ID is 29bits (217056256), and due to same, the example from the README.md fails to find a match.

        receive_frame_data(&frame);
        auto iter = messages.find(frame.can_id);
        if (iter != messages.end())

image

Please note from above image, CAN ID is different from DBC ID for the same PGN.

I face the similar behaviours in cantools.

Could you suggest me how to handle the above. Having a separate function to convert CAN ID to DBC ID is 1 way I could think of, but I am not sure how to do that.
Would like to know your thoughts.

Thanks in advance.

@acode-x
Copy link
Author

acode-x commented Jan 12, 2023

Some times the source address (last 8bits) is also different but PGN is same. Not sure if checking only the PGN is right approach.

@acode-x acode-x closed this as completed Mar 14, 2023
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

No branches or pull requests

1 participant