OTA - Change url to custom domain

This commit is contained in:
2023-11-28 13:47:50 +05:30
parent d51b0f23de
commit c69b1466d1
5 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -46,9 +46,9 @@ void handleOTALocal() {
void handleOTARemote() {
WiFiClient client;
const uint8_t fingerprint[20] = {
0xe9, 0x4e, 0x54, 0xa9, 0x30, 0x86, 0x3d, 0x53, 0x5b, 0xa0, 0xd2, 0xd3, 0xa5, 0xdd, 0x0d, 0xe3, 0xbd, 0xa8, 0xc9, 0xc2,
};
// const uint8_t fingerprint[20] = {
// 0xe9, 0x4e, 0x54, 0xa9, 0x30, 0x86, 0x3d, 0x53, 0x5b, 0xa0, 0xd2, 0xd3, 0xa5, 0xdd, 0x0d, 0xe3, 0xbd, 0xa8, 0xc9, 0xc2,
// };
// client.setFingerprint(fingerprint);
// client.setInsecure();
const char* host = "www.github.com";
@@ -60,7 +60,7 @@ void handleOTARemote() {
} else {
Serial.println("connection worked");
}
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "http://github.com/bendtherules/Patient-counter-esp8266/raw/main ", VERSION_SHORT);
t_httpUpdate_return ret = ESPhttpUpdate.update(client, "http://patient.bendtherules.in/build/esp12e/firmware.bin", VERSION_SHORT);
switch(ret) {
case HTTP_UPDATE_FAILED:
Serial.print("[update] Update failed. Reason - ");