Skip to content

Commit bf13988

Browse files
committed
Add Arduino NANO ESP32 magic number
1 parent b7766b5 commit bf13988

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Arduino_ESP32_OTA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int Arduino_ESP32_OTA::download(const char * ota_url)
189189
return static_cast<int>(Error::OtaHeaderLength);
190190
}
191191

192-
if (_ota_header.header.magic_number != 0x45535033)
192+
if (_ota_header.header.magic_number != ARDUINO_ESP32_OTA_MAGIC)
193193
{
194194
return static_cast<int>(Error::OtaHeaterMagicNumber);
195195
}

src/Arduino_ESP32_OTA.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
#include <WiFiClientSecure.h>
2727
#include "decompress/utility.h"
2828

29+
/******************************************************************************
30+
DEFINES
31+
******************************************************************************/
32+
#if defined (ARDUINO_NANO_ESP32)
33+
#define ARDUINO_ESP32_OTA_MAGIC 0x23410070
34+
#else
35+
#define ARDUINO_ESP32_OTA_MAGIC 0x45535033
36+
#endif
2937
/******************************************************************************
3038
CONSTANTS
3139
******************************************************************************/

0 commit comments

Comments
 (0)