firmware: v11 — fix buffer TLS firmware download ESP8266

setBufferSizes(512,512) en el cliente de descarga causaba que BearSSL
rechazase records TLS de datos > 512 bytes durante la descarga del
binario de ~400KB. Cambiado a setBufferSizes(4096,512):
- 4096 bytes entrada: suficiente para records TLS de datos
- 512 bytes salida: suficiente para peticiones HTTP
- El scope block del cliente de version.txt libera ~10KB antes,
  dejando heap suficiente para este cliente mas grande.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Natxo1000
2026-06-02 14:54:50 +02:00
parent b9bd18a568
commit 234e39aa6f
6 changed files with 8 additions and 5 deletions

View File

@@ -7,7 +7,7 @@
// ================================================================
// OTA CONFIG
// ================================================================
#define FW_VERSION 10
#define FW_VERSION 11
#define GITEA_HOST "https://git.nacho.myds.me"
#define GITEA_OWNER "Natxo"
#define GITEA_REPO "Arduino-Car"
@@ -99,7 +99,10 @@ static void checkOTA() {
BearSSL::WiFiClientSecure updateClient;
updateClient.setInsecure();
updateClient.setBufferSizes(512, 512); // reduce heap BearSSL durante descarga
// 4096 bytes de entrada: necesario para records TLS de datos grandes.
// 512 bytes de salida: suficiente para peticiones HTTP.
// El scope block anterior liberó ~10KB del primer cliente — hay heap.
updateClient.setBufferSizes(4096, 512);
ESPhttpUpdate.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
ESPhttpUpdate.rebootOnUpdate(true);
ESPhttpUpdate.update(updateClient, base + "firmware.bin" + token);

View File

@@ -10,7 +10,7 @@
// ================================================================
// OTA CONFIG
// ================================================================
#define FW_VERSION 10
#define FW_VERSION 11
#define GITEA_HOST "https://git.nacho.myds.me"
#define GITEA_OWNER "Natxo"
#define GITEA_REPO "Arduino-Car"

Binary file not shown.

View File

@@ -1 +1 @@
10
11

Binary file not shown.

View File

@@ -1 +1 @@
10
11