Standard frame id is more than 11 bits
See original GitHub issueI used cantools python package to decode canbus message. I used a dbc file created by me for testing. I copied a sample file. When I use can id like 419358976, I get error. But for smaller can ids like 350, it works. Does cantools fail for extended frame ids? how do I get this working? How do I specify to use extended can ids?
my code which is failing for extended id’s is as follows:
db = cantools.database.load_file('.\\src\\test\\resources\\j1939.dbc')
print(db.decode_message(419358976,b'\xff\xff\xff\xc0\x0c\xff\xff\xff'))
error:
cantools.database.errors.Error: Standard frame id 0x18fee900 is more than 11 bits in message EEC1.
Can you show how this record should look like in the .dbc file? (for an extended id) This number is 29 bits. 419358976 = 1 1000 1111 1110 1110 1001 0000 0000
if I use 2170562561 in the .dbc file, it works fine, but it is a 32 bit number. I thought it has to be a 29-bit number.
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (3 by maintainers)
If on Windows: Open calc and switch to programmers view. Select dec. Paste 419358976. Select hex. Add 80000000. Select dec. The number you see now is what needs to be entered in the text of the dbc file if edited by hand.
as @juleq said above: you may use the DBC file format however you like, you only need to pay if you want to use Vector Informatik’s tools (they are the canonical reference, but as you have noticed they are quite pricey), or – depending on the licensing conditions of the DBC file – you need to pay to get access to the file itself. The situation is exactly like for less exotic file formats like PDF: In order to use a PDF document, you don’t need to pay Adobe for an Acrobat license, but you might have to pay the publisher to obtain a PDF copy of e.g. Harry Potter…