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

DBC parsing error #196

Closed
novalisek opened this issue Jan 20, 2020 · 7 comments
Closed

DBC parsing error #196

novalisek opened this issue Jan 20, 2020 · 7 comments

Comments

@novalisek
Copy link

Hi,
I have CDS 1.0.0. installed on W10, I have problem parsing some .DBC files - I downloaded "ford_cgea1_2_bodycan_2011.dbc" and "ford_cgea1_2_ptcan_2011.dbc" from opendbc https://github.com/commaai/opendbc/ . I can open first file without problem, second one is not parsed and no messages are shown in CanSignalData

@rkollataj
Copy link
Member

I think that your problem may be related to commaai/opendbc#151. Try to reorder or delete sections that does not follow specification.

@novalisek
Copy link
Author

I also tried to convert the files in Busmaster convert utility, there were problems with both of them because they had spaces instead of tabs. I opened them in CANdb++ from Vector, saved them again and then Busmaster had no problem converting them. Also CDS opened them fine, so it seems CANdb++ "fixed" them. But I also tried opening https://github.com/tomahawkins/ecu/blob/master/src/j1939_orig.dbc and it is not possible even after "fixing" with CANdb++ (may be file is too big?)

@rkollataj
Copy link
Member

rkollataj commented Jan 22, 2020

There are two problems with the CANdb parser \" signs inside a string e.g.

CM_ SG_ 2566844670 EngPTOGvrnrCst_DecelerateSwitch "Switch signal of the PTO control activator which indicates that the activator is in the position to "coast/decelerate" the PTO";

and format of some of BA_ messages e.g.
BA_ "SystemSignalLongSymbol" SG_ 2566714366 EngTrbCmprssrBypssActtr2PrlmnryF "EngTrbCmprssrBypssActtr2PrlmnryFMI";

As a workaround remove lines: 6633-6637, 9224-18176.

This is a great testing data, thanks! I will try to fix it in GENIVI/CANdb.

@btaczala
Copy link
Collaborator

@novalisek thanks for pointing it out. I'll create a ticker under https://github.com/GENIVI/CANdb as this is a issues with new opendbc dbc files.

@btaczala
Copy link
Collaborator

Ticket is here: GENIVI/CANdb#16

@novalisek
Copy link
Author

Thanks for looking at that.

@mguentner
Copy link
Contributor

@rkollataj

at least the ba_ sg_ issue is fixed with https://github.com/GENIVI/CANdb/pull/29/files

mguentner added a commit to mguentner/CANdb that referenced this issue Aug 2, 2020
rkollataj pushed a commit to GENIVI/CANdb that referenced this issue Aug 21, 2020
* tests: add comfort.dbc file

this file has been copied 1:1 from
https://github.com/ANCIT/pythoncan-examples/blob/master/python-can-examples/resources/comfort.dbc

and is  licensed under the EPL 2.0

This dbc file seems to have been produced with a Vector tool
and features EV_ (environment variables) and BA_DEF with FLOAT
values. Both of which are missing in the peg parser grammar.

* peg parser: add FLOAT to ba_def_num

* peg parser: add ev tag

ev_ lines define environment variables

* peg parser: ba_sg can have phrase / string values

* dbc_grammar: allow escaped quotation marks \" in phrases

fixes problem described in GENIVI/CANdevStudio#196 (comment)
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

4 participants