-
Notifications
You must be signed in to change notification settings - Fork 239
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
CANSignalEncoder appears to drop extended id. #198
Comments
I think that the problem is caused by CAN ID that you are using. Extended CAN id is 29bit long (i.e. 0x1ffffff) and your ids seems to be bigger than that. Furthermore according to DBC specification signals with extended CAN id should have most significant bit in CAN id set. This simply means that all fo your IDs should be - CAN_ID | 0x1000000. |
Thank you. Okay, I suspected there might be something goofy going on there. |
|
Just FYI. |
From what I can see J1939 also uses 29 bit CAN ID. However as you mentined this may be some additional info that is encoded in DBC on to of standard 29 bits. Do you have any clue on how to figure this out? |
I am reviewing J1939 from sources such as https://assets.vector.com/cms/content/know-how/_application-notes/AN-ION-1-3100_Introduction_to_J1939.pdf and others. Nothing is jumping out at me. Yes, it seems that J1939 encodes the IDs in a specific way, but it should still end up at 29 bit from what I can understand. I have forwarded what I know (and don't know) up the chain of command, and I've requested some help with clarification on the intent with these IDs. So I should know a little more by Monday or Tuesday. |
…compliant DBCs. DBC for J1939 seems to have 32nd bit of CAN ID always set. Make sure that ID passed to components is always 29 bit long. Signed-off-by: Remigiusz Kołłątaj <[email protected]>
…ant DBCs. DBC for J1939 seems to have 32nd bit of CAN ID always set. Make sure that ID passed to components is always 29 bit long. Signed-off-by: Remigiusz Kołłątaj <[email protected]>
The above should fix problem with "strange" J1939 IDs. @8bitgeek let me know if you will learn anything interesting about 32bit of CAN ID beeing set in J1939 DBC. |
Thank you @rkollataj, I have tested that patch and applied a similar patch to my application which also consumes the same DBC file. |
If I understand correctly. I believe that in this scenario CANSignalEncoder is dropping extended ID when converting signal to raw packet. I've also attached the DBC I'm working with in this example.
[CANSignalEncoder-issue-dbc.zip]
![CANSignalEncoder-issue](https://user-images.githubusercontent.com/12674614/77608316-3d227c80-6ef3-11ea-96be-e7c196082591.png)
The text was updated successfully, but these errors were encountered: