You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/bluetooth/ble_ota/README.md
+54-4Lines changed: 54 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ ACK_Status:
64
64
65
65
### 4.1 OTA update ESP32-H2
66
66
67
-
To construct the BLE OTA demo for the ESP32-H2 device, ensure you're using ESP-IDF version 5.0 or later. Currently, the ESP32-H2 doesn't support NimBLE OTA updates, so omit the instructions in section 5. Maintain the default configuration for the Bluetooth framework, where `Bluedroid - Dual-mode` is selected. To ensure compatibility with the sample app mentioned in section 3, deactivate BLE 5.0 features by navigating to:
67
+
To construct the BLE OTA demo for the ESP32-H2 device, ensure you're using ESP-IDF version 5.0 or later. If `Bluedroid - Dual-mode` is selected, to ensure compatibility with the sample app mentioned in section 3, deactivate BLE 5.0 features by navigating to:
68
68
69
69
1.`Component config` > `Bluetooth` > `Bluedroid Options` and deselect `Enable BLE 5.0 features`.
70
70
2.`Component config` > `Bluetooth` > `Controller Options` and deselect `Enable BLE 5 feature`.
@@ -77,9 +77,11 @@ To construct the BLE OTA demo for the ESP32-H2 device, ensure you're using ESP-I
77
77
78
78
- Component config → Bluetooth → Bluetooth → Host → NimBLE - BLE only
79
79
80
-
Note: For maximum throughput, set maximum MTU using
80
+
-Note: For maximum throughput, set maximum MTU using
81
81
82
-
- Component config → Bluetooth → NimBLE Options → Preferred MTU size in octets as 517
82
+
- Component config → Bluetooth → NimBLE Options → Preferred MTU size in octets as 517
83
+
84
+
Ensure the image that is being transferred over BLE, should have the same FLASHSIZE ( 4MB ) as the one that is set by the ble_ota example. i.e. ensure **ESPTOOLPY_FLASHSIZE_4MB** is set.
83
85
84
86
### 5.1 OTA with Protocomm
85
87
@@ -99,6 +101,54 @@ Note: For maximum throughput, set maximum MTU using
99
101
100
102
`idf.py menuconfig`
101
103
102
-
- If using ESP32S3 set Component config → Bluetooth → Bluetooth → NimBLE Options → NimBLE Host task stack size as 8192
104
+
- If using ESP32S3 set Component config → Bluetooth → Bluetooth → NimBLE Options → NimBLE Host task stack size as 8192
103
105
- Example Configuration → Type of OTA → Use Pre-Encrypted OTA
104
106
- Component config → OTA Manager → Type of OTA → Enable pre encrypted OTA
107
+
108
+
## 6. Delta OTA
109
+
110
+
### 6.1 NimBLE OTA
111
+
112
+
`idf.py menuconfig`
113
+
114
+
- Component config → Bluetooth → Bluetooth → Host → NimBLE - BLE only
115
+
116
+
> **_NOTE:_** For maximum throughput, set maximum MTU using
117
+
118
+
- Component config → Bluetooth → NimBLE Options → Preferred MTU size in octets as 517
119
+
120
+
- Example Configuration → Type of OTA → Use Delta OTA
121
+
122
+
- if using ESP32H2, ESP32C6
123
+
1. Component config → Bluetooth → Bluetooth → NimBLE Options → deselect `Enable BLE 5 feature`
124
+
2. Example Configuration → deselect `Enable Extended Adv`
125
+
126
+
### 6.2 Bluedroid
127
+
128
+
`idf.py menuconfig`
129
+
130
+
- Component config → Bluetooth → Bluetooth → Host → Bluedroid - Dual-mode
131
+
- Component config → Bluetooth → Bluetooth → Bluedroid Options → deselect `Enable BLE 5.0 feature`
132
+
- Component config → Bluetooth → Bluetooth → Bluedroid Options → deselect `Enable BLE 4.2 feature`
133
+
- Example Configuration → Type of OTA → Use Delta OTA
134
+
135
+
### Creating Patch
136
+
137
+
Now we will consider this firmware as the base firmware which we will flash into the device. We need a new firmware to which we want to upgrade to. You can try b
138
+
ilding the `hello_world` example present in ESP-IDF.
139
+
We need to create a patch file for this new firmware.
140
+
141
+
Install required packages:
142
+
```
143
+
pip install -r tools/requirements.txt
144
+
```
145
+
146
+
To create a patch file, use the [python tool](./tools/esp_delta_ota_patch_gen.py)
This will generate the patch file for the new binary which needs to be hosted on the OTA update server.
152
+
153
+
> **_NOTE:_** Make sure that the firmware present in the device is used as `base_binary` while creating the patch file. For this purpose, user should keep backup
154
+
of the firmware running in the device as it is required for creating the patch file.
0 commit comments