Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
v1.0.2
Browse files Browse the repository at this point in the history
### Releases v1.0.2

1. Make Mutex Lock and delete more reliable and error-proof to prevent random crash.
  • Loading branch information
khoih-prog authored Nov 9, 2020
1 parent 2d31dc2 commit b5831c3
Show file tree
Hide file tree
Showing 33 changed files with 2,832 additions and 230 deletions.
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
## Contributing to ESP_WiFiManager
## Contributing to AsyncHTTPRequest_Generic

### Reporting Bugs

Please report bugs in ESP_WiFiManager if you find them.
Please report bugs in [AsyncHTTPRequest_Generic](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/new) if you find them.

However, before reporting a bug please check through the following:

* [Existing Open Issues](https://github.com/khoih-prog/ESP_WiFiManager/issues) - someone might have already encountered this.
* [Existing Open Issues](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues) - someone might have already encountered this.

If you don't find anything, please [open a new issue](https://github.com/khoih-prog/ESP_WiFiManager/issues/new).
If you don't find anything, please [open a new issue](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues/new).

### How to submit a bug report

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.11) or Platform.io version
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v2.6.3 or ESP32 v1.0.4)
* Arduino IDE version (e.g. 1.8.13) or Platform.io version
* `ESP8266`,`ESP32` or `STM32` Core Version (e.g. ESP8266 core v2.7.4, ESP32 v1.0.4 or STM32 v1.9.0)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
* Anything that might be relevant in your opinion, such as:
Expand All @@ -26,10 +26,10 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.11
ESP8266 Core Version 2.6.3
OS: Ubuntu 16.04 LTS
Linux Inspiron 4.4.0-170-generic #199-Ubuntu SMP Thu Nov 14 01:45:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Arduino IDE version: 1.8.13
ESP32 Core Version 1.0.4
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-51-generic #56-Ubuntu SMP Mon Oct 5 14:28:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered an endless loop while trying to connect to Local WiFi.
Expand All @@ -44,7 +44,7 @@ Steps to reproduce:

Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.

There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/ESP_WiFiManager/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.
There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.

### Sending Pull Requests

Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Chunked responses are recognized and handled transparently.
---
---

### Releases v1.0.2

1. Make Mutex Lock and delete more reliable and error-proof to prevent random crash.

### Releases v1.0.1

1. Restore cpp code besides Impl.h code to use in case of `multiple definition` linker error. Thanks to [Daniel Brunner](https://github.com/0xFEEDC0DE64) to report and make PR in [**Fixed linker errors when included in multiple .cpp files**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/pull/1). See [**HOWTO Fix `Multiple Definitions` Linker Error**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic#HOWTO-Fix-Multiple-Definitions-Linker-Error)
Expand Down Expand Up @@ -293,12 +297,12 @@ Please take a look at other examples, as well.
```cpp
#include "defines.h"

// 600s = 10 minutes to not flooding
#define HTTP_REQUEST_INTERVAL_MS 600000
// 600s = 10 minutes to not flooding, 10s in testing
#define HTTP_REQUEST_INTERVAL_MS 10000 // 600000

#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic

#include <Ticker.h> // https://github.com/sstaub/Ticker
#include <Ticker.h> // https://github.com/sstaub/Ticker

AsyncHTTPRequest request;

Expand Down Expand Up @@ -748,6 +752,10 @@ Submit issues to: [AsyncHTTPRequest_Generic issues](https://github.com/khoih-pro
---
---

### Releases v1.0.2

1. Make Mutex Lock and delete more reliable and error-proof to prevent random crash.

### Releases v1.0.1

1. Restore cpp code besides Impl.h code to use in case of `multiple definition` linker error. Thanks to [Daniel Brunner](https://github.com/0xFEEDC0DE64) to report and make PR in [**Fixed linker errors when included in multiple .cpp files**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic/pull/1). See [**HOWTO Fix `Multiple Definitions` Linker Error**](https://github.com/khoih-prog/AsyncHTTPRequest_Generic#HOWTO-Fix-Multiple-Definitions-Linker-Error)
Expand Down
13 changes: 7 additions & 6 deletions examples/AsyncCustomHeader_STM32/AsyncCustomHeader_STM32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/

#include "defines.h"

// Select a test server address
char GET_ServerAddress[] = "192.168.2.110/";
//char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt";
//char GET_ServerAddress[] = "192.168.2.110/";
char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt";

// 600s = 10 minutes to not flooding
#define HTTP_REQUEST_INTERVAL_MS 600000
// 600s = 10 minutes to not flooding, 10s in testing
#define HTTP_REQUEST_INTERVAL_MS 10000 //600000

#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic

Expand All @@ -52,7 +53,7 @@ void sendRequest(void)
Serial.println("\nSending GET Request to " + String(GET_ServerAddress));

request.open("GET", GET_ServerAddress);
request.setReqHeader("X-CUSTOM-HEADER", "custom_value");
//request.setReqHeader("X-CUSTOM-HEADER", "custom_value");
request.send();
}
}
Expand Down
3 changes: 2 additions & 1 deletion examples/AsyncCustomHeader_STM32/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
/*
Currently support
Expand Down
3 changes: 2 additions & 1 deletion examples/AsyncDweetGet_STM32/AsyncDweetGet_STM32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/

/**
Expand Down
4 changes: 3 additions & 1 deletion examples/AsyncDweetGet_STM32/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.0
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
/*
Currently support
Expand Down
3 changes: 2 additions & 1 deletion examples/AsyncDweetPost_STM32/AsyncDweetPost_STM32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/

// Dweet.io POST client. Connects to dweet.io once every ten seconds, sends a POST request and a request body.
Expand Down
4 changes: 3 additions & 1 deletion examples/AsyncDweetPost_STM32/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.0
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
/*
Currently support
Expand Down
19 changes: 9 additions & 10 deletions examples/AsyncHTTPRequest_ESP/AsyncHTTPRequest_ESP.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
//************************************************************************************************************
//
Expand Down Expand Up @@ -56,7 +57,7 @@
#define _ASYNC_HTTP_LOGLEVEL_ 1

// 300s = 5 minutes to not flooding
#define HTTP_REQUEST_INTERVAL 300
#define HTTP_REQUEST_INTERVAL 30 //300

// 10s
#define HEARTBEAT_INTERVAL 10
Expand All @@ -77,6 +78,7 @@ const char* password = "your_pass";

AsyncHTTPRequest request;
Ticker ticker;
Ticker ticker1;

void heartBeatPrint(void)
{
Expand Down Expand Up @@ -106,6 +108,10 @@ void sendRequest()
request.open("GET", "http://worldtimeapi.org/api/timezone/America/Toronto.txt");
request.send();
}
else
{
Serial.println("Can't send request");
}
}

void requestCB(void* optParm, AsyncHTTPRequest* request, int readyState)
Expand All @@ -130,13 +136,6 @@ void setup()

WiFi.mode(WIFI_STA);

if (WiFi.status() == WL_NO_SHIELD)
{
Serial.println(F("WiFi shield not present"));
// don't continue
while (true);
}

WiFi.begin(ssid, password);

Serial.println("Connecting to WiFi SSID: " + String(ssid));
Expand All @@ -155,7 +154,7 @@ void setup()
request.onReadyStateChange(requestCB);
ticker.attach(HTTP_REQUEST_INTERVAL, sendRequest);

ticker.attach(HEARTBEAT_INTERVAL, heartBeatPrint);
ticker1.attach(HEARTBEAT_INTERVAL, heartBeatPrint);

// Send first request now
sendRequest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
//************************************************************************************************************
//
Expand Down Expand Up @@ -55,8 +56,8 @@
#define ASYNC_HTTP_DEBUG_PORT Serial
#define _ASYNC_HTTP_LOGLEVEL_ 1

// 300s = 5 minutes to not flooding
#define HTTP_REQUEST_INTERVAL 300
// 300s = 5 minutes to not flooding, 10s in testing
#define HTTP_REQUEST_INTERVAL 10 //300

//Ported to ESP32
#ifdef ESP32
Expand Down
7 changes: 4 additions & 3 deletions examples/AsyncHTTPRequest_STM32/AsyncHTTPRequest_STM32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
//************************************************************************************************************
//
Expand All @@ -49,8 +50,8 @@

#include "defines.h"

// 600s = 10 minutes to not flooding
#define HTTP_REQUEST_INTERVAL_MS 600000
// 600s = 10 minutes to not flooding, 10s in testing
#define HTTP_REQUEST_INTERVAL_MS 10000 //600000

#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic

Expand Down
4 changes: 3 additions & 1 deletion examples/AsyncHTTPRequest_STM32/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.0
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
/*
Currently support
Expand Down
7 changes: 4 additions & 3 deletions examples/AsyncSimpleGET_STM32/AsyncSimpleGET_STM32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/

#include "defines.h"
Expand All @@ -31,8 +32,8 @@
//char GET_ServerAddress[] = "ipv4bot.whatismyipaddress.com/";
char GET_ServerAddress[] = "http://worldtimeapi.org/api/timezone/America/Toronto.txt";

// 600s = 10 minutes to not flooding
#define HTTP_REQUEST_INTERVAL_MS 600000
// 600s = 10 minutes to not flooding, 10s in testing
#define HTTP_REQUEST_INTERVAL_MS 10000 //600000

#include <AsyncHTTPRequest_Generic.h> // https://github.com/khoih-prog/AsyncHTTPRequest_Generic

Expand Down
6 changes: 4 additions & 2 deletions examples/AsyncSimpleGET_STM32/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.0
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/
/*
Currently support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Version: 1.0.1
Version: 1.0.2
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 14/09/2020 Initial coding to add support to STM32 using built-in Ethernet (Nucleo-144, DISCOVERY, etc).
1.0.1 K Hoang 09/10/2020 Restore cpp code besides Impl.h code.
1.0.2 K Hoang 09/11/2020 Make Mutex Lock and delete more reliable and error-proof
*****************************************************************************************************************************/

#include "defines.h"
Expand Down
Loading

0 comments on commit b5831c3

Please sign in to comment.