idf-extra-components
idf-extra-components copied to clipboard
feat(esp_isotp): add ISO-TP protocol component's echo example (IEC-376)
Checklist
- [x] Component contains License
- [x] Component contains README.md
- [x] Component contains idf_component.yml file with
urlfield defined - [x] Component was added to upload job
- [x] Component has an example project
- [x] Component has a test_app (pytest-based testing)
- [x] CI passing
Change description
Add ESP-IDF ISO-TP Component
This PR adds the esp_isotp component, providing a complete ISO-TP (ISO 15765-2) protocol implementation for ESP-IDF. ISO-TP is essential for automotive and industrial applications requiring CAN-based diagnostic communication.
Key Features
- Complete ISO-TP Protocol: Full implementation of ISO 15765-2 standard
- Multi-Frame Support: Handles both Single Frame (SF) and Multi-Frame (MF) transmission
- Flow Control: Configurable Block Size and STmin parameters
- Thread-Safe Design: Safe for use in multi-threaded applications with interrupt context support
- Memory Efficient: Optimized buffer management for embedded systems
- QEMU Testing: Complete test suite running in QEMU environment
Component Structure
esp_isotp/
├── LICENSE # Apache 2.0 License
├── README.md # Comprehensive documentation
├── idf_component.yml # Component manifest with URL
├── include/esp_isotp.h # Public API
├── src/ # Implementation files
├── isotp-c/ # Git submodule for protocol core
└── examples/echo/ # Echo example with pytest
Testing
- Automated Testing: Comprehensive pytest suite with QEMU integration
- Test Coverage: Single/Multi-frame, flow control, error scenarios
- CI Ready: Tests run automatically without hardware requirements
- Example Project: ISO-TP echo server demonstrating bidirectional communication
Integration Status
- ✅ Added to upload job workflow
- ✅ Component auto-discovered by clang-tidy test_app
- ✅ All required files present and properly configured
- ✅ Follows ESP-IDF coding standards and best practices
Use Cases
- Automotive diagnostic systems (UDS over CAN)
- Industrial CAN communication requiring >8 byte messages
- IoT gateways with CAN connectivity
- ESP32-based diagnostic tools and interfaces
This component fills a critical gap for CAN-based applications in the ESP-IDF ecosystem, providing a robust, production-ready ISO-TP implementation with comprehensive testing and documentation.
Please bump the component version.
And this leftover nitpick: #563 (comment)
Could I get a Copilot reviewer first? :)