Skip to content

tnlmarsha/can_com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

CAN communication using Python

Note: The intent of this repository is to show easy, accessible methods of CAN communication using Python; Pythonic design choices shall not be of primary concern. Additionally, CAN communication protocol reference is of type J1939, where more details regarding this protocol can be found here. Finally, DBC file syntax differs from appliction to application, but just as with CAN, we will be discussing DBCs descibing J1939.

Python Modules

Goals

Implement DBC File

DBC (CAN database) files use a special syntax in plain (ASCII) text to describe CAN (Controller Area Network) data. Commercially available and open source methods of reading, creating, modifying, and using DBC files are readily available. I'm partial to open source, so here is how you can be too!

  • simple DBC creation using cantools
    • created DBC will be used to encode and decode CAN messages
Resources

Encode CAN data

DBC created above shall serve as the translater allowing us to write data as if sending CAN messages, which is common when simulating VCS commands.

  • determine desired parameters based on previous DBC definition
  • encode data from perspective of BMS or VCS

Decode CAN data

Data shall be received as encoded above.

  • capture and decode CAN messages per DBC specification
  • keep track of data for futher use, if necessary

Simulate BMS/VCS

Send commands to receive desired data from BMS, and to command actions based on response from BMS.

  • determine desired data
  • determine desired commanding actions and resonses
  • define guidance with regard to defined DBC parameters

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published