question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standard frame id is more than 11 bits

See original GitHub issue

I 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:open
  • Created 2 years ago
  • Comments:20 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
juleqcommented, Mar 27, 2021

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.

0reactions
andlauscommented, Mar 31, 2021

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…

Read more comments on GitHub >

github_iconTop Results From Across the Web

cantools.database.errors.Error: Standard frame id is more ...
error: cantools.database.errors.Error: Standard frame id 0x18fee900 is more than 11 bits in message EEC1. python-3.
Read more >
Source code for cantools.database.can.message
format(frame_id, name)) elif frame_id_bit_length > 11: raise Error( 'Standard frame id 0x{:x} is more than 11 bits in ' 'message {}.
Read more >
standard VS extended ids.
The standard format contains an 11-bit identifier, thus you can have up to 2048 identifiers. The extend format contains a 29-bit identifier ...
Read more >
Controller Area Network (CAN Bus) Tutorial - Extended ...
The standard CAN message frame uses an 11-bit message identifier (CAN ... higher priority than the extended 29-bit message ID frame with an ......
Read more >
CAN Remote Frame Messages
Later on, customer demand forced an extension of the standard. The new format is often called Extended CAN and allows no less than...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found