Skip to content
/ canana Public

canbus analyzer/library for a vehicle ECU. Analyzing message interval, bit range, etc. For socketcan, slcan, canudmp log, vehicle spy csv or ... interfaces.

License

Notifications You must be signed in to change notification settings

ysk256/canana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

canana

Description

  • Canbus analyzing tools.
  • Support
    • Input
      • CANUSB device
      • candump *.log
      • vehicle spy *.csv
    • Output
      • Candump format *.log
      • Canbus messages view (Time stamp, ID, size, Message data and Message ascii)
      • Message data w/ coloring diff data
      • Message interval msec (average and variance)

Requirements

  • Language: Python3.x
  • libraries: python-can, cantools, pySerial, sympy, click, ctype on windows
  • OS: Windows, Linux, macOS
  • Device: CANUSB on Windows/Linux and any other CAN I/F can be use python-can

Install

  • cpoy your project directory
  • then run canana.py or import interface as library

Example

  • read candump logfile *.log
import interface

inf = interface.candump("dump.log")
while 1:
  msg = inf.recv()
  if msg is None:
    break
  ts, dev_name, msg_id, msg_size, msg_dat = msg.timestamp, msg.channel, msg.arbitration_id, msg.dlc, msg.data.hex()
  print("(%f) %s %03X#%s" % (ts, dev_name, msg_id, msg_dat))

inf.close()
  • read vehiclespy logfile *.csv
import interface

inf = interface.vehiclespy("dump.csv")
while 1:
  msg = inf.recv()
  if msg is None:
    break
  ts, dev_name, msg_id, msg_size, msg_dat = msg.timestamp, msg.channel, msg.arbitration_id, msg.dlc, msg.data.hex()
  print("(%f) %s %03X#%s" % (ts, dev_name, msg_id, msg_dat))

inf.close()

About

canbus analyzer/library for a vehicle ECU. Analyzing message interval, bit range, etc. For socketcan, slcan, canudmp log, vehicle spy csv or ... interfaces.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages