Skip to content

Commit 445f510

Browse files
Merge pull request #165 from EIrwin/fs-readme-update
docs: clarify URL field behavior in JSON manifest format
2 parents af0169f + e75233e commit 445f510

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,46 @@ Version information can be either a single number or a semantic version string.
6666
}
6767
```
6868

69+
### ⚠️ Important: URL Field Behavior
70+
71+
**When using the `url` field in your manifest, all other URL-related fields will be ignored.** This includes:
72+
- `host`, `port`, `bin` fields
73+
- Filesystem fields: `spiffs`, `littlefs`, `fatfs`
74+
75+
```json
76+
// ❌ This will NOT work - littlefs will be ignored because 'url' is present
77+
{
78+
"type": "esp32-fota-http",
79+
"version": "1.0.0",
80+
"url": "https://example.com/firmware.bin",
81+
"littlefs": "https://example.com/filesystem.bin" // IGNORED!
82+
}
83+
84+
// ✅ Use this format for firmware + filesystem updates
85+
{
86+
"type": "esp32-fota-http",
87+
"version": "1.0.0",
88+
"host": "example.com",
89+
"port": 443,
90+
"bin": "/firmware.bin",
91+
"littlefs": "/filesystem.bin"
92+
}
93+
94+
// ✅ Or this format for firmware-only updates
95+
{
96+
"type": "esp32-fota-http",
97+
"version": "1.0.0",
98+
"url": "https://example.com/firmware.bin"
99+
}
100+
```
101+
102+
**Manifest Format Options:**
103+
104+
1. **Complete URL (firmware only)**: Use `url` field - filesystem updates not supported
105+
2. **Component-based URLs (firmware + filesystem)**: Use `host`, `port`, `bin`, and optional `spiffs`/`littlefs`/`fatfs` fields
106+
107+
You cannot mix these approaches in a single manifest.
108+
69109
A single JSON file can provide information on multiple firmware types by combining them together into an array. When this is loaded, the firmware manifest with a type matching the one passed to the esp32FOTA constructor will be selected:
70110

71111
```json

0 commit comments

Comments
 (0)