You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
*[1. AsyncHTTPSRequest_ESP on ESP32_DEV](#1-AsyncHTTPSRequest_ESP-on-ESP32_DEV)
29
36
*[2. AsyncHTTPSRequest_ESP on ESP32S2_DEV](#2-AsyncHTTPSRequest_ESP-on-ESP32S2_DEV)
37
+
*[3. AsyncHTTPSRequest_ESP on ESP32C3_DEV](#3-AsyncHTTPSRequest_ESP-on-ESP32C3_DEV)
38
+
*[4. AsyncHTTPSRequest_ESP_WiFiManager on ESP32_DEV](#4-AsyncHTTPSRequest_ESP_WiFiManager-on-ESP32_DEV)
30
39
*[Debug](#debug)
31
40
*[Troubleshooting](#troubleshooting)
32
41
*[Issues](#issues)
@@ -114,6 +123,105 @@ Another way to install is to:
114
123
---
115
124
116
125
126
+
### Note for Platform IO using ESP32 LittleFS
127
+
128
+
In Platform IO, to fix the error when using [`LittleFS_esp32 v1.0`](https://github.com/lorol/LITTLEFS) for ESP32-based boards with ESP32 core v1.0.4- (ESP-IDF v3.2-), uncomment the following line
129
+
130
+
from
131
+
132
+
```
133
+
//#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
134
+
```
135
+
136
+
to
137
+
138
+
```
139
+
#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
140
+
```
141
+
142
+
It's advisable to use the latest [`LittleFS_esp32 v1.0.5+`](https://github.com/lorol/LITTLEFS) to avoid the issue.
143
+
144
+
Thanks to [Roshan](https://github.com/solroshan) to report the issue in [Error esp_littlefs.c 'utime_p'](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/28)
145
+
146
+
---
147
+
---
148
+
149
+
### HOWTO Fix `Multiple Definitions` Linker Error
150
+
151
+
The current library implementation, using xyz-Impl.h instead of standard xyz.cpp, possibly creates certain `Multiple Definitions` Linker error in certain use cases. Although it's simple to just modify several lines of code, either in the library or in the application, the library is adding a separate source directory, named src_cpp, besides the standard src directory.
152
+
153
+
To use the old standard cpp way, just
154
+
155
+
1.**Rename the h-only src directory into src_h.**
156
+
2.**Then rename the cpp src_cpp directory into src.**
157
+
3. Close then reopen the application code in Arduino IDE, etc. to recompile from scratch.
158
+
159
+
---
160
+
---
161
+
162
+
### Note for Platform IO using ESP32 LittleFS
163
+
164
+
In Platform IO, to fix the error when using [`LittleFS_esp32 v1.0`](https://github.com/lorol/LITTLEFS) for ESP32-based boards with ESP32 core v1.0.4- (ESP-IDF v3.2-), uncomment the following line
165
+
166
+
from
167
+
168
+
```
169
+
//#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
170
+
```
171
+
172
+
to
173
+
174
+
```
175
+
#define CONFIG_LITTLEFS_FOR_IDF_3_2 /* For old IDF - like in release 1.0.4 */
176
+
```
177
+
178
+
It's advisable to use the latest [`LittleFS_esp32 v1.0.5+`](https://github.com/lorol/LITTLEFS) to avoid the issue.
179
+
180
+
Thanks to [Roshan](https://github.com/solroshan) to report the issue in [Error esp_littlefs.c 'utime_p'](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/28)
181
+
182
+
---
183
+
---
184
+
185
+
### HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)
186
+
187
+
Please have a look at [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to have more detailed description and solution of the issue.
188
+
189
+
#### 1. ESP32 has 2 ADCs, named ADC1 and ADC2
190
+
191
+
#### 2. ESP32 ADCs functions
192
+
193
+
- ADC1 controls ADC function for pins **GPIO32-GPIO39**
194
+
- ADC2 controls ADC function for pins **GPIO0, 2, 4, 12-15, 25-27**
195
+
196
+
#### 3.. ESP32 WiFi uses ADC2 for WiFi functions
197
+
198
+
Look in file [**adc_common.c**](https://github.com/espressif/esp-idf/blob/master/components/driver/adc_common.c#L61)
199
+
200
+
> In ADC2, there're two locks used for different cases:
201
+
> 1. lock shared with app and Wi-Fi:
202
+
> ESP32:
203
+
> When Wi-Fi using the ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed.
204
+
> ESP32S2:
205
+
> The controller's control over the ADC is determined by the arbiter. There is no need to control by lock.
206
+
>
207
+
> 2. lock shared between tasks:
208
+
> when several tasks sharing the ADC2, we want to guarantee
209
+
> all the requests will be handled.
210
+
> Since conversions are short (about 31us), app returns the lock very soon,
211
+
> we use a spinlock to stand there waiting to do conversions one by one.
212
+
>
213
+
> adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock.
214
+
215
+
216
+
- In order to use ADC2 for other functions, we have to **acquire complicated firmware locks and very difficult to do**
217
+
- So, it's not advisable to use ADC2 with WiFi/BlueTooth (BT/BLE).
218
+
- Use ADC1, and pins GPIO32-GPIO39
219
+
- If somehow it's a must to use those pins serviced by ADC2 (**GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27**), use the **fix mentioned at the end** of [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to work with ESP32 WiFi/BlueTooth (BT/BLE).
220
+
221
+
---
222
+
---
223
+
224
+
117
225
## Orignal documentation
118
226
119
227
For ESP32, check [AsyncTCP Library](https://github.com/me-no-dev/AsyncTCP)
@@ -132,11 +240,11 @@ The base classes on which everything else is built. They expose all possible sce
132
240
133
241
#### 1. AsyncHTTPSRequest_ESP on ESP32_DEV
134
242
135
-
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTPSRequest_ESP) on ESP32_DEV to demonstrate the operation of SSL Async HTTPS request, based on this[AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL).
243
+
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTPSRequest_ESP) on ESP32_DEV to demonstrate the operation of SSL Async HTTPS request, using[AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL).
136
244
137
245
```
138
246
Starting AsyncHTTPSRequest_ESP using ESP32_DEV
139
-
AsyncTCP_SSL v1.0.0
247
+
AsyncTCP_SSL v1.1.0
140
248
AsyncHTTPSRequest_Generic v1.0.0
141
249
Connecting to WiFi SSID: HueNet1
142
250
.......
@@ -182,12 +290,11 @@ week_number: 42
182
290
183
291
#### 2. AsyncHTTPSRequest_ESP on ESP32S2_DEV
184
292
185
-
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTPSRequest_ESP) on ESP32S2_DEV to demonstrate the operation of SSL Async HTTPS request, based on this[AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL).
293
+
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTPSRequest_ESP) on ESP32S2_DEV to demonstrate the operation of SSL Async HTTPS request, using[AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL).
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTPSRequest_ESP) on ESP32C3_DEV to demonstrate the operation of SSL Async HTTPS request, using [AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL).
351
+
352
+
```
353
+
Starting AsyncHTTPSRequest_ESP using ESP32C3_DEV
354
+
AsyncTCP_SSL v1.1.0
355
+
AsyncHTTPSRequest_Generic v1.0.0
356
+
Connecting to WiFi SSID: HueNet1
357
+
.........
358
+
AsyncHTTPSRequest @ IP : 192.168.2.80
359
+
360
+
**************************************
361
+
abbreviation: EDT
362
+
client_ip: aaa.bbb.ccc.ddd
363
+
datetime: 2021-10-22T02:00:44.009661-04:00
364
+
day_of_week: 5
365
+
day_of_year: 295
366
+
dst: true
367
+
dst_from: 2021-03-14T07:00:00+00:00
368
+
dst_offset: 3600
369
+
dst_until: 2021-11-07T06:00:00+00:00
370
+
raw_offset: -18000
371
+
timezone: America/Toronto
372
+
unixtime: 1634882444
373
+
utc_datetime: 2021-10-22T06:00:44.009661+00:00
374
+
utc_offset: -04:00
375
+
week_number: 42
376
+
**************************************
377
+
```
237
378
379
+
---
380
+
381
+
#### 4. AsyncHTTPSRequest_ESP_WiFiManager on ESP32_DEV
382
+
383
+
Following is the debug terminal when running example [AsyncHTTPSRequest_ESP_WiFiManager](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic/tree/main/examples/AsyncHTTPSRequest_ESP_WiFiManager) on ESP32_DEV to demonstrate the operation of SSL Async HTTPS request, using [AsyncTCP_SSL Library](https://github.com/khoih-prog/AsyncTCP_SSL), and [ESPAsync_WiFiManager Library](https://github.com/khoih-prog/ESPAsync_WiFiManager)
384
+
385
+
```
386
+
Starting AsyncHTTPSRequest_ESP_WiFiManager using LittleFS on ESP32_DEV
387
+
ESPAsync_WiFiManager v1.9.4
388
+
AsyncTCP_SSL v1.1.0
389
+
AsyncHTTPSRequest_Generic v1.0.0
390
+
Stored: SSID = HueNet1, Pass = 12345678
391
+
Got stored Credentials. Timeout 120s
392
+
ConnectMultiWiFi in setup
393
+
After waiting 11.38 secs more in setup(), connection result is connected. Local IP: 192.168.2.232
"description":"Asynchronous SSL TCP Library for ESP32. This library is the base for future and more advanced Async SSL libraries, such as AsyncSSLWebServer, AsyncHTTPSRequest",
0 commit comments