components | ||
main | ||
.clang-format | ||
.clangd | ||
.editorconfig | ||
.gitignore | ||
.gitmodules | ||
CMakeLists.txt | ||
LICENSE | ||
partitions.csv | ||
README.md | ||
sdkconfig.defaults |
CAN Wizard
CAN Wizard is a project designed for communication using the CAN (Controller Area Network) protocol, primarily targeted at embedded systems utilizing the ESP32 microcontroller family. This project is developed using ESP-IDF and supports ESP32-C3, allowing flexible development for different use cases.
Here are more information:
- Xa6p Article. (in Russian)
- Traduccion in English.
Features
- CAN Communication: Implements CAN communication protocols, enabling data exchange between devices over a CAN bus.
- File System Integration: Includes file system operations for handling configuration or logging.
- Custom serial Console: A custom serial console implementation for interacting with the system and issuing commands.
- Modular Design: Organized in components for easier maintenance and scalability, including linked lists and command utilities.
Requirements
-
Hardware:
- ESP32-C3 microcontroller
- SN65HVD230 CAN transceiver
-
Software:
- ESP-IDF (version x.x.x or newer)
- CMake (for project build system)
- Python (for ESP-IDF and related tools)
Setup and Installation
-
Clone the Repository: Clone this repository using:
git clone --recursive git@github.com:okhsunrog/can_wizard.git
-
Install ESP-IDF: Follow the official ESP-IDF installation guide for your operating system: ESP-IDF Setup Guide
-
Configure ESP-IDF: Set up your environment by running the following commands:
cd <project-directory> idf.py set-target esp32c3 idf.py menuconfig
-
Build and Flash: Build the project and flash it to your microcontroller:
idf.py build idf.py flash idf.py monitor
Usage
Console Commands
The CAN Wizard project provides several commands that can be executed through a console interface:
can_send <data>
: Send CAN data over the bus.can_receive
: Receive CAN data from the bus.can_status
: Display the current CAN status.
Additional commands can be explored through the console by typing help
.
File System Operations
The project includes basic file system operations to read and write configuration or log files. These operations can be accessed through the fs_*
commands in the console.
Project Structure
can_wizard-main/
├── components/
│ └── C-Linked-List/ # Linked list implementation used in the project
├── main/
│ ├── can.c # CAN communication implementation
│ ├── console.c # Custom console implementation
│ ├── cmd_can.c # CAN command handlers
│ ├── fs.c # File system operations
│ └── main.c # Main entry point
└── CMakeLists.txt # Project build system configuration
TODO:
- code refactoring
- test dumb mode
- fix prompt flickering with some commands
- add standard ID filtering to cansmartfilter
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
Author
Danila Gornushko