@alteriom/painlessmesh 1.7.7 → 1.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +115 -1
- package/README.md +21 -11
- package/RELEASE_GUIDE.md +57 -8
- package/docs/API_DESIGN_GUIDELINES.md +414 -0
- package/docs/BOOLEAN_NAMING_CONVENTION.md +235 -0
- package/docs/README.md +2 -1
- package/docs/RELEASE_AGENT_SUMMARY.md +386 -0
- package/docs/alteriom/overview.md +23 -0
- package/docs/releases/RELEASE_SUMMARY_v1.7.7.md +1 -1
- package/docs/troubleshooting/ESP32_C6_COMPATIBILITY.md +157 -0
- package/docs/troubleshooting/common-issues.md +28 -0
- package/docs/v1.7.7_MQTT_IMPROVEMENTS.md +21 -3
- package/examples/alteriom/README.md +13 -1
- package/examples/alteriom/alteriom_sensor_package.hpp +377 -3
- package/examples/alteriom/platformio.ini +1 -1
- package/examples/alteriomImproved/platformio.ini +1 -1
- package/examples/alteriomMetricsHealth/metrics_health_node.ino +18 -7
- package/examples/alteriomMetricsHealth/platformio.ini +1 -1
- package/examples/alteriomPhase1/platformio.ini +1 -1
- package/examples/alteriomPhase2/platformio.ini +1 -1
- package/examples/alteriomSensorNode/platformio.ini +1 -1
- package/examples/basic/platformio.ini +1 -1
- package/examples/bridge/alteriom_sensor_package.hpp +1170 -0
- package/examples/bridge/bridge.ino +2 -2
- package/examples/bridge/enhanced_mqtt_bridge.hpp +1 -1
- package/examples/bridge/mqtt_command_bridge.hpp +2 -2
- package/examples/bridge/platformio.ini +2 -1
- package/examples/echoNode/platformio.ini +1 -1
- package/examples/logClient/platformio.ini +1 -1
- package/examples/logServer/platformio.ini +1 -1
- package/examples/mqttStatusBridge/platformio.ini +1 -1
- package/examples/namedMesh/platformio.ini +1 -1
- package/examples/otaReceiver/platformio.ini +1 -1
- package/examples/startHere/platformio.ini +1 -1
- package/examples/webServer/platformio.ini +1 -1
- package/library.json +93 -53
- package/library.properties +1 -1
- package/package.json +2 -2
- package/src/arduino/wifi.hpp +9 -0
- package/src/painlessMeshSTA.cpp +5 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
# Release Agent Implementation Summary
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document summarizes the implementation of the Release Agent system for AlteriomPainlessMesh, completed as part of preparing for release 1.7.9.
|
|
6
|
+
|
|
7
|
+
**Date:** November 8, 2025
|
|
8
|
+
**Release:** v1.7.9
|
|
9
|
+
**Agent Version:** v1.0
|
|
10
|
+
|
|
11
|
+
## Problem Statement
|
|
12
|
+
|
|
13
|
+
The project needed to:
|
|
14
|
+
1. Verify that all documentation is up to date for release 1.7.9
|
|
15
|
+
2. Verify that all requirements for auto-release are done
|
|
16
|
+
3. Create a release agent that would ensure consistency in all future releases
|
|
17
|
+
|
|
18
|
+
## Solution
|
|
19
|
+
|
|
20
|
+
A comprehensive Release Agent system was created to automate release validation and ensure consistency across all future releases.
|
|
21
|
+
|
|
22
|
+
## Implementation Details
|
|
23
|
+
|
|
24
|
+
### 1. Release Agent Specification (`.github/agents/release-agent.md`)
|
|
25
|
+
|
|
26
|
+
A detailed specification document that defines:
|
|
27
|
+
|
|
28
|
+
- **Pre-Release Validation**: 10 categories of checks
|
|
29
|
+
- Version Consistency
|
|
30
|
+
- Documentation Validation
|
|
31
|
+
- Code Quality Checks
|
|
32
|
+
- Dependency Validation
|
|
33
|
+
- Example Code Validation
|
|
34
|
+
- Release Workflow Validation
|
|
35
|
+
|
|
36
|
+
- **Release Process**: 4 phases
|
|
37
|
+
- Preparation Phase
|
|
38
|
+
- Commit Phase
|
|
39
|
+
- Automation Phase
|
|
40
|
+
- Verification Phase
|
|
41
|
+
|
|
42
|
+
- **Post-Release Tasks**: 4 categories
|
|
43
|
+
- Update Documentation
|
|
44
|
+
- Prepare for Next Development Cycle
|
|
45
|
+
- Communication
|
|
46
|
+
- Monitoring
|
|
47
|
+
|
|
48
|
+
- **Agent Decision Tree**: Clear flowchart for validation
|
|
49
|
+
- **Configuration**: Required secrets and permissions
|
|
50
|
+
- **Release Checklist**: Comprehensive checklist for every release
|
|
51
|
+
- **Error Recovery**: Solutions for common issues
|
|
52
|
+
|
|
53
|
+
**Size:** 327 lines
|
|
54
|
+
**Coverage:** Complete release lifecycle
|
|
55
|
+
|
|
56
|
+
### 2. Release Agent Script (`scripts/release-agent.sh`)
|
|
57
|
+
|
|
58
|
+
An executable bash script that implements the specification:
|
|
59
|
+
|
|
60
|
+
**Features:**
|
|
61
|
+
- 21+ automated validation checks
|
|
62
|
+
- Color-coded visual output (Green/Red/Yellow/Blue)
|
|
63
|
+
- Clear pass/fail/warning indicators
|
|
64
|
+
- Specific error recovery guidance
|
|
65
|
+
- CI/CD environment detection
|
|
66
|
+
- Professional release summary
|
|
67
|
+
|
|
68
|
+
**Validation Checks:**
|
|
69
|
+
1. Version Consistency Check
|
|
70
|
+
2. Version Format Validation
|
|
71
|
+
3. Git Tag Validation
|
|
72
|
+
4. CHANGELOG Validation
|
|
73
|
+
5. Build System Validation
|
|
74
|
+
6. Dependency Validation
|
|
75
|
+
7. Git Working Tree Status
|
|
76
|
+
8. Test Suite Validation
|
|
77
|
+
9. Release Workflow Configuration
|
|
78
|
+
10. Documentation Validation
|
|
79
|
+
|
|
80
|
+
**Usage:**
|
|
81
|
+
```bash
|
|
82
|
+
./scripts/release-agent.sh # Full validation
|
|
83
|
+
./scripts/release-agent.sh --help # Show help
|
|
84
|
+
./scripts/release-agent.sh --version # Show version
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Size:** 416 lines
|
|
88
|
+
**Performance:** < 5 seconds for complete validation
|
|
89
|
+
|
|
90
|
+
### 3. Release Agent Documentation (`.github/agents/README.md`)
|
|
91
|
+
|
|
92
|
+
Comprehensive documentation for the agent system:
|
|
93
|
+
|
|
94
|
+
- What are Release Agents?
|
|
95
|
+
- Available Agents overview
|
|
96
|
+
- Quick Start guide
|
|
97
|
+
- Usage instructions (developers, CI/CD)
|
|
98
|
+
- Understanding output
|
|
99
|
+
- Integration with existing tools
|
|
100
|
+
- Release workflow diagram
|
|
101
|
+
- Extending the agent
|
|
102
|
+
- Best practices
|
|
103
|
+
- Troubleshooting guide
|
|
104
|
+
- Version history
|
|
105
|
+
|
|
106
|
+
**Size:** 269 lines
|
|
107
|
+
**Audience:** Developers and maintainers
|
|
108
|
+
|
|
109
|
+
### 4. Documentation Updates
|
|
110
|
+
|
|
111
|
+
**README.md:**
|
|
112
|
+
- Fixed broken link: `mesh_command_node.ino` → `alteriom.ino`
|
|
113
|
+
- All internal documentation links validated
|
|
114
|
+
|
|
115
|
+
**RELEASE_GUIDE.md:**
|
|
116
|
+
- Added release agent to Quick Release Process
|
|
117
|
+
- Added comprehensive Scripts Reference section for release agent
|
|
118
|
+
- Updated workflow to include validation step
|
|
119
|
+
- Highlighted benefits and use cases
|
|
120
|
+
|
|
121
|
+
## Validation Results
|
|
122
|
+
|
|
123
|
+
### Release 1.7.9 Readiness
|
|
124
|
+
|
|
125
|
+
Running `./scripts/release-agent.sh`:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
╔════════════════════════════════════════════════════════════╗
|
|
129
|
+
║ RELEASE READINESS ║
|
|
130
|
+
╠════════════════════════════════════════════════════════════╣
|
|
131
|
+
║ Version: 1.7.9
|
|
132
|
+
║ Checks Passed: 22
|
|
133
|
+
║ Checks Failed: 0
|
|
134
|
+
║ Warnings: 0
|
|
135
|
+
╠════════════════════════════════════════════════════════════╣
|
|
136
|
+
║ ✓ READY FOR RELEASE
|
|
137
|
+
╚════════════════════════════════════════════════════════════╝
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Status:** ✅ Repository is ready for release 1.7.9
|
|
141
|
+
|
|
142
|
+
### Auto-Release Requirements Verified
|
|
143
|
+
|
|
144
|
+
All automated release requirements confirmed:
|
|
145
|
+
|
|
146
|
+
✅ **GitHub Actions Workflows**
|
|
147
|
+
- `release.yml` - Properly configured with all permissions
|
|
148
|
+
- `validate-release.yml` - Pre-release validation workflow
|
|
149
|
+
- `manual-publish.yml` - Manual fallback publishing
|
|
150
|
+
- `platformio-publish.yml` - PlatformIO automation
|
|
151
|
+
- `wiki-sync.yml` - Documentation synchronization
|
|
152
|
+
|
|
153
|
+
✅ **Release Automation Steps**
|
|
154
|
+
- Git tag creation
|
|
155
|
+
- GitHub release creation
|
|
156
|
+
- NPM publishing (public registry)
|
|
157
|
+
- GitHub Packages publishing
|
|
158
|
+
- PlatformIO Registry publishing
|
|
159
|
+
- GitHub Wiki synchronization
|
|
160
|
+
- Arduino Library Manager package preparation
|
|
161
|
+
|
|
162
|
+
✅ **Required Permissions**
|
|
163
|
+
- `contents: write` - Tag and release creation
|
|
164
|
+
- `packages: write` - GitHub Packages publishing
|
|
165
|
+
- `id-token: write` - NPM publishing
|
|
166
|
+
- `actions: read` - Workflow status monitoring
|
|
167
|
+
|
|
168
|
+
✅ **Documentation**
|
|
169
|
+
- CHANGELOG.md complete with v1.7.9 entry
|
|
170
|
+
- README.md up to date, no broken links
|
|
171
|
+
- RELEASE_GUIDE.md comprehensive and current
|
|
172
|
+
- All version numbers consistent (1.7.9)
|
|
173
|
+
|
|
174
|
+
✅ **Code Quality**
|
|
175
|
+
- All 21 test suites passing
|
|
176
|
+
- Build system configured correctly
|
|
177
|
+
- Dependencies properly declared
|
|
178
|
+
- Examples validated
|
|
179
|
+
|
|
180
|
+
## Benefits
|
|
181
|
+
|
|
182
|
+
### For Developers
|
|
183
|
+
|
|
184
|
+
1. **Confidence**: Know exactly if a release is ready
|
|
185
|
+
2. **Speed**: Comprehensive validation in < 5 seconds
|
|
186
|
+
3. **Clarity**: Clear, color-coded output
|
|
187
|
+
4. **Guidance**: Specific solutions for every issue
|
|
188
|
+
5. **Learning**: Understand release requirements
|
|
189
|
+
|
|
190
|
+
### For Maintainers
|
|
191
|
+
|
|
192
|
+
1. **Consistency**: Every release follows same standards
|
|
193
|
+
2. **Quality**: 21+ automated checks catch issues early
|
|
194
|
+
3. **Documentation**: Complete specification and guides
|
|
195
|
+
4. **Automation**: Integrates with existing CI/CD
|
|
196
|
+
5. **Extensibility**: Easy to add new checks
|
|
197
|
+
|
|
198
|
+
### For the Project
|
|
199
|
+
|
|
200
|
+
1. **Reliability**: Reduces human error in releases
|
|
201
|
+
2. **Professionalism**: High-quality, consistent releases
|
|
202
|
+
3. **Efficiency**: Saves time on manual validation
|
|
203
|
+
4. **Knowledge Transfer**: Codifies institutional knowledge
|
|
204
|
+
5. **Future-Proofing**: Easy to update as requirements change
|
|
205
|
+
|
|
206
|
+
## Usage Example
|
|
207
|
+
|
|
208
|
+
### Before Release
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# 1. Update version
|
|
212
|
+
./scripts/bump-version.sh patch
|
|
213
|
+
|
|
214
|
+
# 2. Update CHANGELOG.md
|
|
215
|
+
vim CHANGELOG.md
|
|
216
|
+
|
|
217
|
+
# 3. Validate with release agent
|
|
218
|
+
./scripts/release-agent.sh
|
|
219
|
+
# Output shows 22 passed, 0 failed, 0 warnings
|
|
220
|
+
|
|
221
|
+
# 4. Commit and release
|
|
222
|
+
git add .
|
|
223
|
+
git commit -m "release: v1.7.9 - CI/CD improvements"
|
|
224
|
+
git push origin main
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Continuous Use
|
|
228
|
+
|
|
229
|
+
The release agent is now integrated into the standard workflow:
|
|
230
|
+
|
|
231
|
+
1. **Local Development**: Run before creating release PR
|
|
232
|
+
2. **CI/CD Pipeline**: Automated validation on every push
|
|
233
|
+
3. **Release Process**: Final check before tagging
|
|
234
|
+
4. **Troubleshooting**: Quick diagnosis of release issues
|
|
235
|
+
|
|
236
|
+
## Technical Implementation
|
|
237
|
+
|
|
238
|
+
### Architecture
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
Release Agent System
|
|
242
|
+
├── Specification (.github/agents/release-agent.md)
|
|
243
|
+
│ └── Defines: What to check, how to check, error recovery
|
|
244
|
+
├── Implementation (scripts/release-agent.sh)
|
|
245
|
+
│ └── Executes: Automated checks, output formatting, summary
|
|
246
|
+
├── Documentation (.github/agents/README.md)
|
|
247
|
+
│ └── Guides: Usage, integration, best practices
|
|
248
|
+
└── Integration (RELEASE_GUIDE.md, CI workflows)
|
|
249
|
+
└── Connects: Existing tools, workflows, processes
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Design Principles
|
|
253
|
+
|
|
254
|
+
1. **Fail Fast**: Catch issues as early as possible
|
|
255
|
+
2. **Clear Feedback**: Use colors and formatting for easy scanning
|
|
256
|
+
3. **Actionable**: Every error includes specific solution
|
|
257
|
+
4. **Non-Blocking**: Warnings inform but don't block
|
|
258
|
+
5. **Comprehensive**: Cover all aspects of release
|
|
259
|
+
6. **Maintainable**: Well-documented, easy to extend
|
|
260
|
+
7. **Portable**: Works locally and in CI/CD
|
|
261
|
+
|
|
262
|
+
### Technologies
|
|
263
|
+
|
|
264
|
+
- **Bash**: Script implementation for portability
|
|
265
|
+
- **Git**: Version control and tag validation
|
|
266
|
+
- **jq**: JSON parsing for package files
|
|
267
|
+
- **CMake/Ninja**: Build system validation
|
|
268
|
+
- **GitHub Actions**: CI/CD integration
|
|
269
|
+
- **Markdown**: Documentation format
|
|
270
|
+
|
|
271
|
+
## Metrics
|
|
272
|
+
|
|
273
|
+
### Code Additions
|
|
274
|
+
|
|
275
|
+
- **Total Lines Added**: 1,055 lines
|
|
276
|
+
- **New Files**: 3 files
|
|
277
|
+
- **Modified Files**: 2 files
|
|
278
|
+
|
|
279
|
+
**Breakdown:**
|
|
280
|
+
- `.github/agents/release-agent.md`: 327 lines (specification)
|
|
281
|
+
- `.github/agents/README.md`: 269 lines (documentation)
|
|
282
|
+
- `scripts/release-agent.sh`: 416 lines (implementation)
|
|
283
|
+
- `README.md`: -1 line (fix)
|
|
284
|
+
- `RELEASE_GUIDE.md`: 44 lines (updates)
|
|
285
|
+
|
|
286
|
+
### Validation Coverage
|
|
287
|
+
|
|
288
|
+
- **Total Checks**: 21+ automated checks
|
|
289
|
+
- **Categories**: 10 validation categories
|
|
290
|
+
- **Execution Time**: < 5 seconds
|
|
291
|
+
- **Pass Rate**: 100% (22/22 for v1.7.9)
|
|
292
|
+
|
|
293
|
+
### Documentation
|
|
294
|
+
|
|
295
|
+
- **Total Pages**: 3 new documentation files
|
|
296
|
+
- **Total Words**: ~8,500 words
|
|
297
|
+
- **Coverage**: Complete lifecycle documentation
|
|
298
|
+
|
|
299
|
+
## Testing
|
|
300
|
+
|
|
301
|
+
### Manual Testing
|
|
302
|
+
|
|
303
|
+
✅ Executed `./scripts/release-agent.sh` successfully
|
|
304
|
+
✅ All 22 checks passed
|
|
305
|
+
✅ Output formatting verified
|
|
306
|
+
✅ Help and version flags tested
|
|
307
|
+
✅ Error recovery documentation validated
|
|
308
|
+
|
|
309
|
+
### Integration Testing
|
|
310
|
+
|
|
311
|
+
✅ Compatible with existing `validate-release.sh`
|
|
312
|
+
✅ Works in CI environment (auto-detects)
|
|
313
|
+
✅ Integrates with bump-version.sh workflow
|
|
314
|
+
✅ Compatible with all existing workflows
|
|
315
|
+
|
|
316
|
+
### Validation Testing
|
|
317
|
+
|
|
318
|
+
✅ Version consistency check works correctly
|
|
319
|
+
✅ CHANGELOG validation detects missing entries
|
|
320
|
+
✅ Git tag validation prevents duplicate releases
|
|
321
|
+
✅ Documentation link checking catches broken links
|
|
322
|
+
✅ Build system validation confirms CMakeLists.txt
|
|
323
|
+
|
|
324
|
+
## Future Enhancements
|
|
325
|
+
|
|
326
|
+
Potential improvements for future versions:
|
|
327
|
+
|
|
328
|
+
1. **Enhanced Link Checking**: Deep validation of external links
|
|
329
|
+
2. **Example Compilation**: Optional Arduino/PlatformIO compile checks
|
|
330
|
+
3. **Automated CHANGELOG**: Generate changelog from commits
|
|
331
|
+
4. **Performance Metrics**: Track release quality over time
|
|
332
|
+
5. **Multi-Language**: Support for other package managers
|
|
333
|
+
6. **Interactive Mode**: Guided release wizard
|
|
334
|
+
7. **Pre-commit Hook**: Validate before every commit
|
|
335
|
+
8. **JSON Output**: Machine-readable results for tooling
|
|
336
|
+
|
|
337
|
+
## Maintenance
|
|
338
|
+
|
|
339
|
+
### Regular Updates
|
|
340
|
+
|
|
341
|
+
The release agent should be reviewed:
|
|
342
|
+
|
|
343
|
+
- **Quarterly**: Process improvements and new best practices
|
|
344
|
+
- **After Failed Releases**: Learn from issues and update
|
|
345
|
+
- **When Tools Change**: Update for new CI/CD tools
|
|
346
|
+
- **When Requirements Change**: Add new validation checks
|
|
347
|
+
|
|
348
|
+
### Version Control
|
|
349
|
+
|
|
350
|
+
Agent versions will follow semantic versioning:
|
|
351
|
+
|
|
352
|
+
- **MAJOR**: Breaking changes to agent interface
|
|
353
|
+
- **MINOR**: New features or validation checks
|
|
354
|
+
- **PATCH**: Bug fixes and documentation updates
|
|
355
|
+
|
|
356
|
+
**Current Version**: v1.0 (November 8, 2025)
|
|
357
|
+
|
|
358
|
+
## Conclusion
|
|
359
|
+
|
|
360
|
+
The Release Agent system successfully addresses all requirements from the problem statement:
|
|
361
|
+
|
|
362
|
+
1. ✅ **Documentation Verified**: All docs updated and validated for v1.7.9
|
|
363
|
+
2. ✅ **Auto-Release Requirements**: All automation verified and working
|
|
364
|
+
3. ✅ **Future Consistency**: Comprehensive agent ensures quality releases
|
|
365
|
+
|
|
366
|
+
The implementation provides:
|
|
367
|
+
|
|
368
|
+
- **Immediate Value**: v1.7.9 validated and ready for release
|
|
369
|
+
- **Long-Term Value**: Automated quality assurance for all future releases
|
|
370
|
+
- **Knowledge Capture**: Complete documentation of release process
|
|
371
|
+
- **Developer Experience**: Clear, helpful, fast validation
|
|
372
|
+
|
|
373
|
+
**Status**: ✅ Complete and ready for production use
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
**For More Information:**
|
|
378
|
+
|
|
379
|
+
- Specification: `.github/agents/release-agent.md`
|
|
380
|
+
- Usage Guide: `.github/agents/README.md`
|
|
381
|
+
- Release Process: `RELEASE_GUIDE.md`
|
|
382
|
+
- Implementation: `scripts/release-agent.sh`
|
|
383
|
+
|
|
384
|
+
**Questions or Issues:**
|
|
385
|
+
|
|
386
|
+
Open an issue at https://github.com/Alteriom/painlessMesh/issues with the `release` label.
|
|
@@ -498,11 +498,34 @@ public:
|
|
|
498
498
|
3. **Validate under memory pressure**
|
|
499
499
|
4. **Test with maximum expected node count**
|
|
500
500
|
|
|
501
|
+
## Code Conventions
|
|
502
|
+
|
|
503
|
+
### Boolean Field Naming
|
|
504
|
+
|
|
505
|
+
Alteriom packages follow a consistent naming convention for boolean fields to improve code clarity:
|
|
506
|
+
|
|
507
|
+
- **`*Set` suffix**: Configuration data has been provided (e.g., `deviceSecretSet`)
|
|
508
|
+
- **`*Enabled` suffix**: Feature is currently active (e.g., `displayEnabled`)
|
|
509
|
+
- **`is*` prefix or `*Connected`**: Current runtime state (e.g., `mqttConnected`)
|
|
510
|
+
|
|
511
|
+
See [Boolean Naming Convention](../BOOLEAN_NAMING_CONVENTION.md) for complete guidelines.
|
|
512
|
+
|
|
513
|
+
### Time Field Naming
|
|
514
|
+
|
|
515
|
+
Time-based configuration fields follow a dual-unit convention:
|
|
516
|
+
|
|
517
|
+
- **Internal storage**: Always milliseconds (e.g., `sensorReadInterval`)
|
|
518
|
+
- **JSON serialization**: Both milliseconds (`_ms`) and seconds (`_s`) variants
|
|
519
|
+
- **JSON deserialization**: Read from milliseconds (`_ms`) variant
|
|
520
|
+
|
|
521
|
+
See package header documentation for complete details.
|
|
522
|
+
|
|
501
523
|
## Next Steps
|
|
502
524
|
|
|
503
525
|
- Learn about [Sensor Packages](sensor-packages.md) in detail
|
|
504
526
|
- Explore [Command System](command-system.md) implementation
|
|
505
527
|
- Study [Status Monitoring](status-monitoring.md) patterns
|
|
528
|
+
- Review [Boolean Naming Convention](../BOOLEAN_NAMING_CONVENTION.md) guidelines
|
|
506
529
|
- See [Tutorial Examples](../tutorials/sensor-networks.md) for hands-on practice
|
|
507
530
|
|
|
508
531
|
The Alteriom extensions provide a solid foundation for building robust IoT applications with painlessMesh. They demonstrate production-ready patterns while remaining flexible enough to adapt to your specific needs.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# ESP32-C6 Compatibility Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
ESP32-C6 is a newer ESP32 variant that requires updated dependencies to work correctly with painlessMesh. This guide addresses common issues and solutions for using painlessMesh on ESP32-C6.
|
|
6
|
+
|
|
7
|
+
## Known Issue: TCP Allocation Crash
|
|
8
|
+
|
|
9
|
+
### Symptom
|
|
10
|
+
|
|
11
|
+
The device crashes on startup or during mesh initialization with the following error:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
assert failed: tcp_alloc /IDF/components/lwip/lwip/src/core/tcp.c:1854 (Required to lock TCPIP core functionality!)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The device enters an endless reboot loop, preventing normal mesh operation.
|
|
18
|
+
|
|
19
|
+
### Root Cause
|
|
20
|
+
|
|
21
|
+
This issue is caused by incompatibility between:
|
|
22
|
+
- ESP32-C6 hardware
|
|
23
|
+
- Arduino ESP32 core v3.1.0 or later
|
|
24
|
+
- Older versions of the AsyncTCP library
|
|
25
|
+
|
|
26
|
+
The newer ESP32 Arduino core enforces stricter LWIP (Lightweight IP) thread safety requirements. Operations that modify TCP/IP data structures must now be protected with proper mutex locking. Older AsyncTCP versions (< v3.3.0) do not implement this locking, causing runtime assertions and crashes.
|
|
27
|
+
|
|
28
|
+
### Solution
|
|
29
|
+
|
|
30
|
+
#### Option 1: Update AsyncTCP Library (Recommended)
|
|
31
|
+
|
|
32
|
+
Use the latest version of AsyncTCP that includes proper LWIP locking:
|
|
33
|
+
|
|
34
|
+
**For PlatformIO:**
|
|
35
|
+
|
|
36
|
+
Update your `platformio.ini`:
|
|
37
|
+
|
|
38
|
+
```ini
|
|
39
|
+
[env:esp32c6]
|
|
40
|
+
platform = espressif32
|
|
41
|
+
board = esp32-c6-devkitc-1 ; or your specific board
|
|
42
|
+
framework = arduino
|
|
43
|
+
|
|
44
|
+
lib_deps =
|
|
45
|
+
https://github.com/Alteriom/painlessMesh.git
|
|
46
|
+
esp32async/AsyncTCP @ ^3.4.7 ; Use latest version with LWIP locking
|
|
47
|
+
bblanchon/ArduinoJson @ ^7.4.2
|
|
48
|
+
arkhipenko/TaskScheduler @ ^4.0.0
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**For Arduino IDE:**
|
|
52
|
+
|
|
53
|
+
1. Remove any existing AsyncTCP library installation
|
|
54
|
+
2. Download the latest AsyncTCP from: https://github.com/ESP32Async/AsyncTCP
|
|
55
|
+
3. Install using "Sketch" → "Include Library" → "Add .ZIP Library"
|
|
56
|
+
4. **Important:** Do not use the Arduino Library Manager for AsyncTCP, as it may install an outdated version
|
|
57
|
+
|
|
58
|
+
#### Option 2: Downgrade Arduino Core (Temporary Workaround)
|
|
59
|
+
|
|
60
|
+
If you need an immediate solution and cannot update AsyncTCP:
|
|
61
|
+
|
|
62
|
+
1. In Arduino IDE: Tools → Board Manager → ESP32 by Espressif Systems
|
|
63
|
+
2. Install version **3.0.7** instead of 3.1.0+
|
|
64
|
+
3. This is not recommended long-term as you'll miss security updates and new features
|
|
65
|
+
|
|
66
|
+
#### Option 3: Use Recommended Build Flags
|
|
67
|
+
|
|
68
|
+
Add these configuration options to improve stability (PlatformIO):
|
|
69
|
+
|
|
70
|
+
```ini
|
|
71
|
+
build_flags =
|
|
72
|
+
-D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
|
|
73
|
+
-D CONFIG_ASYNC_TCP_PRIORITY=10
|
|
74
|
+
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=64
|
|
75
|
+
-D CONFIG_ASYNC_TCP_RUNNING_CORE=1
|
|
76
|
+
-D CONFIG_ASYNC_TCP_STACK_SIZE=4096
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
These flags help maintain proper task scheduling and LWIP event handling.
|
|
80
|
+
|
|
81
|
+
## Verification
|
|
82
|
+
|
|
83
|
+
After applying the fix, verify your setup:
|
|
84
|
+
|
|
85
|
+
1. Upload a simple bridge example
|
|
86
|
+
2. Monitor serial output for clean startup
|
|
87
|
+
3. Check for successful mesh initialization without crashes
|
|
88
|
+
4. Verify mesh connectivity with other nodes
|
|
89
|
+
|
|
90
|
+
Example verification output:
|
|
91
|
+
```
|
|
92
|
+
setLogLevel: ERROR | STARTUP | CONNECTION |
|
|
93
|
+
STARTUP: init(): 1
|
|
94
|
+
STARTUP: stationManual() Starting WiFi connection
|
|
95
|
+
STARTUP: Connection established
|
|
96
|
+
STARTUP: IP address: 192.168.1.100
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Additional ESP32-C6 Considerations
|
|
100
|
+
|
|
101
|
+
### Hardware-Specific Notes
|
|
102
|
+
|
|
103
|
+
- ESP32-C6 uses RISC-V architecture (not Xtensa like older ESP32)
|
|
104
|
+
- Built-in WiFi 6 (802.11ax) support - but mesh uses 802.11n
|
|
105
|
+
- Lower power consumption compared to ESP32
|
|
106
|
+
- Different GPIO pinout - verify your pin assignments
|
|
107
|
+
|
|
108
|
+
### Memory Constraints
|
|
109
|
+
|
|
110
|
+
ESP32-C6 typically has:
|
|
111
|
+
- 320 KB SRAM
|
|
112
|
+
- 4 MB Flash (typical configuration)
|
|
113
|
+
|
|
114
|
+
This is adequate for painlessMesh, but be mindful of:
|
|
115
|
+
- Maximum node count in mesh (recommend < 20 nodes)
|
|
116
|
+
- Message queue sizes
|
|
117
|
+
- JSON message complexity
|
|
118
|
+
|
|
119
|
+
### Performance Optimization
|
|
120
|
+
|
|
121
|
+
For best results on ESP32-C6:
|
|
122
|
+
|
|
123
|
+
1. **WiFi Channel Selection**: Use channels 1, 6, or 11 for best performance
|
|
124
|
+
2. **Mesh Size**: Keep mesh networks under 15-20 nodes
|
|
125
|
+
3. **Message Frequency**: Avoid sending messages more than once per second per node
|
|
126
|
+
4. **Power Management**: Consider WiFi power save modes for battery operation
|
|
127
|
+
|
|
128
|
+
## Troubleshooting Checklist
|
|
129
|
+
|
|
130
|
+
If you're still experiencing issues:
|
|
131
|
+
|
|
132
|
+
- [ ] Confirmed AsyncTCP version is 3.3.0 or newer
|
|
133
|
+
- [ ] Removed all old AsyncTCP library installations
|
|
134
|
+
- [ ] Arduino ESP32 core is 3.0.7 or 3.1.0+ with updated AsyncTCP
|
|
135
|
+
- [ ] Verified board definition matches your hardware
|
|
136
|
+
- [ ] Checked serial monitor for actual error messages
|
|
137
|
+
- [ ] Tested with minimal example (examples/basic/basic.ino)
|
|
138
|
+
- [ ] Verified WiFi credentials are correct
|
|
139
|
+
- [ ] Confirmed router and mesh use same WiFi channel (for bridge mode)
|
|
140
|
+
|
|
141
|
+
## References
|
|
142
|
+
|
|
143
|
+
- [AsyncTCP Library (ESP32Async)](https://github.com/ESP32Async/AsyncTCP)
|
|
144
|
+
- [ESP32 Arduino Core Release Notes](https://github.com/espressif/arduino-esp32/releases)
|
|
145
|
+
- [painlessMesh GitHub Issues](https://github.com/Alteriom/painlessMesh/issues)
|
|
146
|
+
|
|
147
|
+
## Related Documentation
|
|
148
|
+
|
|
149
|
+
- [Common Issues](common-issues.md)
|
|
150
|
+
- [FAQ](faq.md)
|
|
151
|
+
- [Bridge to Internet Guide](../../BRIDGE_TO_INTERNET.md)
|
|
152
|
+
- [Debugging Guide](debugging.md)
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
**Last Updated:** 2025-11-05
|
|
157
|
+
**Applies to:** painlessMesh v1.7.8+, ESP32-C6, Arduino ESP32 Core 3.0+
|
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
This guide covers the most frequently encountered problems when working with painlessMesh and their solutions.
|
|
4
4
|
|
|
5
|
+
## Platform-Specific Issues
|
|
6
|
+
|
|
7
|
+
### ESP32-C6 Crashes on Startup
|
|
8
|
+
|
|
9
|
+
**Symptoms:**
|
|
10
|
+
- Device crashes immediately after mesh initialization
|
|
11
|
+
- Endless reboot loop
|
|
12
|
+
- Error message: `assert failed: tcp_alloc ... (Required to lock TCPIP core functionality!)`
|
|
13
|
+
|
|
14
|
+
**Solution:**
|
|
15
|
+
|
|
16
|
+
This is a known compatibility issue with ESP32-C6 and newer ESP32 variants. See the dedicated guide:
|
|
17
|
+
|
|
18
|
+
📖 **[ESP32-C6 Compatibility Guide](ESP32_C6_COMPATIBILITY.md)**
|
|
19
|
+
|
|
20
|
+
**Quick Fix:**
|
|
21
|
+
Update your AsyncTCP library to version 3.3.0 or newer, or use the ESP32Async library which includes proper LWIP locking for Arduino ESP32 core 3.1.0+.
|
|
22
|
+
|
|
23
|
+
For PlatformIO, add to your `platformio.ini`:
|
|
24
|
+
```ini
|
|
25
|
+
lib_deps =
|
|
26
|
+
esp32async/AsyncTCP @ ^3.4.7
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For Arduino IDE, download and install manually from: https://github.com/ESP32Async/AsyncTCP
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
5
33
|
## Connection Issues
|
|
6
34
|
|
|
7
35
|
### Nodes Not Connecting
|
|
@@ -350,9 +350,27 @@ Packages now include the `message_type` field for 90% faster message classificat
|
|
|
350
350
|
}
|
|
351
351
|
```
|
|
352
352
|
|
|
353
|
-
**Message Type Codes:**
|
|
354
|
-
|
|
355
|
-
|
|
353
|
+
**Message Type Codes (mqtt-schema v0.7.2+):**
|
|
354
|
+
|
|
355
|
+
For performance optimization and standardized routing, all Alteriom packages include the `message_type` field:
|
|
356
|
+
|
|
357
|
+
| Code | Constant | Message Type | Category | Description | PainlessMesh Package |
|
|
358
|
+
|------|----------|--------------|----------|-------------|---------------------|
|
|
359
|
+
| 200 | SENSOR_DATA | sensor_data | telemetry | Sensor telemetry readings | SensorPackage |
|
|
360
|
+
| 202 | SENSOR_STATUS | sensor_status | telemetry | Sensor status change | StatusPackage |
|
|
361
|
+
| 204 | SENSOR_METRICS | sensor_metrics | telemetry | Sensor health and performance metrics | MetricsPackage |
|
|
362
|
+
| 400 | COMMAND | command | control | Device control command | CommandPackage |
|
|
363
|
+
| 600 | MESH_NODE_LIST | mesh_node_list | mesh | Mesh node inventory | MeshNodeListPackage |
|
|
364
|
+
| 601 | MESH_TOPOLOGY | mesh_topology | mesh | Mesh network topology | MeshTopologyPackage |
|
|
365
|
+
| 602 | MESH_ALERT | mesh_alert | mesh | Mesh network alert | MeshAlertPackage |
|
|
366
|
+
| 603 | MESH_BRIDGE | mesh_bridge | mesh | Mesh protocol bridge | MeshBridgePackage |
|
|
367
|
+
| 604 | MESH_STATUS | mesh_status | mesh | Mesh network health status | EnhancedStatusPackage |
|
|
368
|
+
| 605 | MESH_METRICS | mesh_metrics | mesh | Mesh network performance metrics | HealthCheckPackage |
|
|
369
|
+
|
|
370
|
+
**Key Points:**
|
|
371
|
+
- The `message_type` field enables 90% faster message classification compared to parsing JSON
|
|
372
|
+
- All Alteriom packages align with @alteriom/mqtt-schema v0.7.2+ standards
|
|
373
|
+
- Message type codes are consistent across MQTT bridge, gateway, and mesh nodes
|
|
356
374
|
|
|
357
375
|
## Implementation Guide
|
|
358
376
|
|
|
@@ -271,4 +271,16 @@ This validates:
|
|
|
271
271
|
- Package type consistency
|
|
272
272
|
- Field preservation
|
|
273
273
|
- Edge case handling
|
|
274
|
-
- Integration with painlessMesh plugin system
|
|
274
|
+
- Integration with painlessMesh plugin system
|
|
275
|
+
- JSON structure consistency (nested vs flat)
|
|
276
|
+
|
|
277
|
+
## Documentation
|
|
278
|
+
|
|
279
|
+
For developers adding new configuration fields to Alteriom packages:
|
|
280
|
+
|
|
281
|
+
- **[API Design Guidelines](../../docs/API_DESIGN_GUIDELINES.md)** - Comprehensive guide on when to use nested vs flat JSON structures
|
|
282
|
+
- **[Time Field Naming Convention](alteriom_sensor_package.hpp#L10-L55)** - How to handle time-based fields (ms/s variants)
|
|
283
|
+
- **[Boolean Naming Convention](../../docs/BOOLEAN_NAMING_CONVENTION.md)** - Consistent patterns for boolean fields (*Set, *Enabled, is*)
|
|
284
|
+
- **[JSON Structure Guidelines](alteriom_sensor_package.hpp#L57-L121)** - Quick reference for nesting patterns
|
|
285
|
+
|
|
286
|
+
These guidelines ensure consistency and maintainability across all Alteriom packages.
|