add ota authentification
This commit is contained in:
parent
285f138485
commit
d2085041c6
|
@ -13,4 +13,7 @@ platform = espressif32
|
|||
board = lolin32
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
upload_speed = 921600
|
||||
upload_speed = 921600
|
||||
|
||||
upload_flags =
|
||||
--auth=MCH2022OTA
|
|
@ -34,6 +34,8 @@ bool initOTA() {
|
|||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
ArduinoOTA.setPassword((const char *)OTA_PASSWORD);
|
||||
|
||||
ArduinoOTA
|
||||
.onStart([]() {
|
||||
otaMode = UPDATING;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#define OTA_WIFI_SSID "Chaos-West temp alternative"
|
||||
#define OTA_WIFI_PASSWORD ""
|
||||
#define OTA_WAIT_TIMEOUT 1000 // in 0.1s increments -> 10s
|
||||
#define OTA_PASSWORD "MCH2022OTA" //password needed for ota flashing
|
||||
|
||||
void checkOTA();
|
||||
bool initOTA();
|
||||
|
|
Loading…
Reference in New Issue