smartgauges / obd2-bt-stm32

Firmware for the cheapest can sniffer
35 stars 15 forks source link

Proposal to enchancement of supporting input formats #2

Open iDoka opened 4 years ago

iDoka commented 4 years ago

Hi and thanks for that great work.

Can't find description or create by recording scaner app log file format. I guess it custom.

The most tools generate and accepts SocketCAN formats as industry standard. Many variants of CAN log formats can be converted to each other in CLI (sed, awk, etc), but yours not documented for creating converter purposes.

My points are:

  1. Would be great to have description of your CAN log format: I wish to use only plot app with my collections of dump grabbed by standard way (in SocketCAN-format). I might to create log converter but enough infos about formats.

  2. Perhaps to support SocketCAN log format by plot app also good point. It very simple to explain by follows short rules:

    • dont use mixed digit representation in CAN body: ID and payload always in hex
    • dont use untrivial data order: order always fixed: timestamp interface direction flags ID length payload

For reference here of two possible (from many others) example of SocketCAN logs:

  1. absolute time:

    (1605793322.823716) can0 07A#6294400000108000 R
    (1605793322.823924) can1 120#0000AA9D51FF0090 R
    (1605793322.824380) can1 094#0DF3000080000339 R
    (1605793322.827396) can1 070#18000001070FFFFF R
  2. relative time:

    (000.000000)  can1  RX - -  083   [8]  10 32 70 64 E0 F8 02 6D
    (000.000194)  can0  RX - -  07A   [8]  62 94 40 00 00 10 80 00
    (000.000193)  can1  RX - -  117   [8]  03 CF 04 54 C7 FF 20 00
    (000.000415)  can1  RX - -  340   [8]  AB 86 5F 14 9F 00 40 88
    (000.000655)  can1  RX - -  4A3   [8]  00 6A 77 00 AE 02 40 00
    (000.002030)  can0  RX - -  0A3   [8]  00 00 00 C1 11 00 00 00

The both allows to convert in custom well documented CSV format.

Happy hacking!

smartgauges commented 3 years ago

Hello, I have added support for log (SocketCAN) and trc (CANHacker) files in plot utility

iDoka commented 3 years ago

good news! thanks for update!