Supported File Fomats

There are several importers (read) and exporters (write) for this object.

Export

Format ECUs Mux S/R of Signal Cycletype Cycletime Baudrate Extended Byteorder scaling min/max attributes value tables signal groups
arxml  
     
         
dbc
 
dbf
 
 
json                
       
kcd
 
         
 
sym  
       
 
 
xls(x)
   
 
 
csv
   
 
xml
 
       
     

Import

Format ECUs Mux S/R of Signal Cycletype Cycletime Baudrate Extended Byteorder scaling min/max attributes value tables signal groups
arxml
 
dbc
 
dbf
 
 
kcd
 
           
 
sym  
       
 
 
xls(x)
   
p p   p  

Scapy Export

Create can frame decoder for some can definition

Example:

$ canconvert source.dbc target.py

in scapy use like this:

load_contrib("target")
sock = CANSocket("can0", basecls=DBC)
pkt = sock.recv()

Wireshark Dissector

$ canconvert source.dbc target.py

Example:

$ canconvert source.sdbc target.lua

in wireshark use like this:

$ wireshark -X lua_script:target.lua

Linux socketcan can directly traced with wireshark. In wireshark select some can frame. Right-click and select decode as and select SIGNALDECODE as subdissector

dissect_canneloni.lua in the canmatrix example folder shows an example for decoding can frames which are packet in UDP frames by cannelone (https://github.com/mguentner/cannelloni, https://github.com/PhilippFux/cannelloni)

you could use it like:

$ chdir canmatrix/examples
$ canconvert some.dbc can_database.lua
$ wireshark wireshark -X lua_script:dissect_cannelloni.lua

note: default cannelloni is mapped to UDP port 3333, you have to change it

note: can_database is hard coded in dissect_cannelloni.lua, you can customize it there