-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from TaixMiguel/dev
Dev
- Loading branch information
Showing
5 changed files
with
547 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"platformio.platformio-ide" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
esp32 firmware OTA | ||
Date: December 2018 | ||
Author: Chris Joyce <https://github.com/chrisjoyce911/esp32FOTA/esp32FOTA> | ||
Purpose: Perform an OTA update from a bin located on a webserver (HTTP Only) | ||
*/ | ||
|
||
#ifndef esp32fota_h | ||
#define esp32fota_h | ||
|
||
#include "Arduino.h" | ||
#include <WiFiClientSecure.h> | ||
|
||
class esp32FOTA { | ||
public: | ||
esp32FOTA(String firwmareType, int firwmareVersion); | ||
void forceUpdate(String firwmareHost, int firwmarePort, String firwmarePath); | ||
void execOTA(); | ||
bool execHTTPcheck(); | ||
bool useDeviceID; | ||
String checkURL; | ||
|
||
private: | ||
String getDeviceID(); | ||
String _firwmareType; | ||
int _firwmareVersion; | ||
String _host; | ||
String _bin; | ||
int _port; | ||
}; | ||
|
||
class secureEsp32FOTA { | ||
public: | ||
secureEsp32FOTA(String firwmareType, int firwmareVersion); | ||
bool execHTTPSCheck(); | ||
void executeOTA(); | ||
String _descriptionOfFirmwareURL; | ||
char *_certificate; | ||
unsigned int _securePort = 443; | ||
WiFiClientSecure clientForOta; | ||
String _host; | ||
|
||
private: | ||
bool prepareConnection(String locationOfServer); | ||
String secureGetContent(); | ||
bool isValidContentType(String line); | ||
String _firwmareType; | ||
int _firwmareVersion; | ||
String locationOfFirmware; | ||
String _bin; | ||
int _port; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
; TaixArduEsp32Fota Project | ||
; @author TaixMiguel | ||
|
||
[env:esp32doit-devkit-v1] | ||
platform = espressif32 | ||
board = esp32doit-devkit-v1 | ||
framework = arduino |
Oops, something went wrong.