Skip to content

Commit

Permalink
Qrome - Added the option to specify a password for OTA
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrome committed Jun 7, 2018
1 parent 0597e57 commit 35d7f9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion printermonitor/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const boolean INVERT_DISPLAY = false; // true = pins at top | false = pins at th
//#define DISPLAY_SH1106 // Uncomment this line to use the SH1106 display -- SSD1306 is used by default and is most common

boolean ENABLE_OTA = true; // this will allow you to load firmware to the device over WiFi (see OTA for ESP8266)

String OTA_Password = ""; // Set an OTA password here -- leave blank if you don't want to be prompted for password
//******************************
// End Settings
//******************************
Expand Down
3 changes: 3 additions & 0 deletions printermonitor/printermonitor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ void setup() {
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
ArduinoOTA.setHostname((const char *)hostname.c_str());
if (OTA_Password != "") {
ArduinoOTA.setPassword(((const char *)OTA_Password.c_str()));
}
ArduinoOTA.begin();
}

Expand Down

0 comments on commit 35d7f9b

Please sign in to comment.