Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Install required tools and dependencies:
- `pio check -e debug` -- runs cppcheck static analysis on debug environment. Takes 2-5 minutes. **Network Issues**: May fail with HTTPClientError due to platform download restrictions.
- Python build scripts (always work):
- `python git_tag_macro.py` -- generates firmware version from git tags
- `python build_date_macro.py` -- generates build timestamp
- `python cert_updater.py` -- updates SSL certificates (may fail with network issues)
- `python build_date_macro.py` -- generates build timestamp

### Run the Application
- **Build First**: Always complete the bootstrap and build steps before attempting to run.
Expand Down Expand Up @@ -99,15 +98,13 @@ External libraries loaded automatically by PlatformIO:

### Known Issues and Limitations
- **Network Connectivity**: Platform and toolchain downloads may fail due to firewall restrictions. All build commands (`pio run`, `pio test`, `pio check`) require internet access on first run.
- **SSL Certificates**: cert_updater.py may fail to fetch current certificates due to network restrictions
- **Hardware Testing**: Cannot test actual motor control or BLE communication without physical hardware
- **Build Times**: Initial builds require internet access and take 15-45 minutes due to large platform downloads

### Troubleshooting Common Issues
- **HTTPClientError during build**: This indicates network/firewall restrictions preventing platform downloads. No workaround available in restricted environments.
- **Platform not found**: Run `pio platform install espressif32` to manually install the ESP32 platform (requires internet).
- **Test failures**: Ensure you're running tests in native environment: `pio test -e native`
- **SSL certificate warnings**: Update certificates with `python cert_updater.py` or manually update `include/cert.h`
- **Build flag errors**: The Python scripts in build_flags must execute successfully. Test them individually if build fails.

### Environment Verification
Expand All @@ -123,7 +120,7 @@ python git_tag_macro.py && python build_date_macro.py

### Debugging Tips
- Use `pio device monitor` to view serial output when connected to ESP32 hardware
- Check `include/cert.h` if experiencing SSL errors during firmware updates
- HTTPS connections use ESP-IDF's built-in certificate bundle (no manual certificate management needed)
- Monitor memory usage with DEBUG_STACK enabled in settings.h
- BLE debugging available through web interface at `/develop.html`

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- **Certificate Management**: Removed hardcoded certificates for firmware updates. The firmware now uses `setInsecure()` for HTTPS connections to GitHub servers during firmware updates. While this skips certificate verification, it's a pragmatic trade-off that prevents update failures due to expired certificates. The connections are still encrypted (TLS/SSL) and limited to known GitHub servers. A future improvement would be to use ESP-IDF's certificate bundle once Arduino-ESP32 provides a suitable API.
- Removed `include/cert.h` and `cert_updater.py` as they are no longer needed.

### Hardware

Expand Down
1 change: 1 addition & 0 deletions _codeql_detected_source_root
Loading