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

Commit 997c6fa

Browse files
authored
v1.3.1 not to reconnect after connected
1. Not try to reconnect to the same host:port after connected. Check [setReuse feature #12](khoih-prog/AsyncHTTPSRequest_Generic#12) 2. Update `Packages' Patches`
1 parent dbd4351 commit 997c6fa

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

README.md

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ This library is based on, modified from:
130130
## Prerequisites
131131

132132
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
133-
2. [`ArduinoCore-mbed mbed_portenta core 3.1.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino **Portenta_H7** boards, such as **Portenta_H7 Rev2 ABX00042, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
134-
3. [`Portenta_H7_AsyncTCP library v1.3.2+`](https://github.com/khoih-prog/Portenta_H7_AsyncTCP) for Portenta_H7 using `Vision-shield Ethernet` or `Murata WiFi`. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Portenta_H7_AsyncTCP.svg?)](https://www.ardu-badge.com/Portenta_H7_AsyncTCP)
133+
2. [`ArduinoCore-mbed mbed_portenta core 3.3.0+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino **Portenta_H7** boards, such as **Portenta_H7 Rev2 ABX00042, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
134+
3. [`Portenta_H7_AsyncTCP library v1.4.0+`](https://github.com/khoih-prog/Portenta_H7_AsyncTCP) for Portenta_H7 using `Vision-shield Ethernet` or `Murata WiFi`. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Portenta_H7_AsyncTCP.svg?)](https://www.ardu-badge.com/Portenta_H7_AsyncTCP)
135135

136136
---
137137
---
@@ -152,7 +152,7 @@ The best and easiest way is to use `Arduino Library Manager`. Search for `Porten
152152

153153
1. Install [VS Code](https://code.visualstudio.com/)
154154
2. Install [PlatformIO](https://platformio.org/platformio-ide)
155-
3. Install [**Portenta_H7_AsyncHTTPRequest** library](https://platformio.org/lib/show/12945/Portenta_H7_AsyncHTTPRequest) by using [Library Manager](https://platformio.org/lib/show/12945/Portenta_H7_AsyncHTTPRequest/installation). Search for Portenta_H7_AsyncHTTPRequest in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
155+
3. Install [**Portenta_H7_AsyncHTTPRequest** library](https://registry.platformio.org/libraries/khoih-prog/Portenta_H7_AsyncHTTPRequest) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/Portenta_H7_AsyncHTTPRequest/installation). Search for Portenta_H7_AsyncHTTPRequest in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
156156
4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html)
157157

158158
---
@@ -162,12 +162,12 @@ The best and easiest way is to use `Arduino Library Manager`. Search for `Porten
162162

163163
#### 1. For Portenta_H7 boards using Arduino IDE in Linux
164164

165-
**To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.)**, you have to copy the file [portenta_post_install.sh](Packages_Patches/arduino/hardware/mbed_portenta/3.1.1/portenta_post_install.sh) into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.1.1/portenta_post_install.sh).
165+
**To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.)**, you have to copy the file [portenta_post_install.sh](Packages_Patches/arduino/hardware/mbed_portenta/3.3.0/portenta_post_install.sh) into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/portenta_post_install.sh).
166166

167167
Then run the following command using `sudo`
168168

169169
```
170-
$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/3.1.1
170+
$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/3.3.0
171171
$ chmod 755 portenta_post_install.sh
172172
$ sudo ./portenta_post_install.sh
173173
```
@@ -180,9 +180,9 @@ This will create the file `/etc/udev/rules.d/49-portenta_h7.rules` as follows:
180180
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666"
181181
```
182182

183-
Supposing the ArduinoCore-mbed core version is 3.1.1. Now only one file must be copied into the directory:
183+
Supposing the ArduinoCore-mbed core version is 3.3.0. Now only one file must be copied into the directory:
184184

185-
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.1.1/portenta_post_install.sh`
185+
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/portenta_post_install.sh`
186186

187187
Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz
188188

@@ -192,13 +192,13 @@ This file must be copied into the directory:
192192

193193
#### 2. To fix compile error relating to dns_gethostbyname and LwIP stack
194194

195-
**To be able to compile, run on Portenta_H7 boards**, you have to copy the whole [mbed_portenta Packages_Patches](Packages_Patches/arduino/hardware/mbed_portenta/3.1.1) directory into Arduino mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.1.1).
195+
**To be able to compile, run on Portenta_H7 boards**, you have to copy the whole [mbed_portenta Packages_Patches](Packages_Patches/arduino/hardware/mbed_portenta/3.3.0) directory into Arduino mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.3.0).
196196

197-
Supposing the Arduino mbed_portenta version is 3.1.1. These file must be copied into the directory:
197+
Supposing the Arduino mbed_portenta version is 3.3.0. These file must be copied into the directory:
198198

199-
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.1.1/libraries/SocketWrapper/src/MbedUdp.h`
200-
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.1.1/libraries/SocketWrapper/src/MbedUdp.cpp`
201-
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.1.1/cores/arduino/src/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h`
199+
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/libraries/SocketWrapper/src/MbedUdp.h`
200+
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/libraries/SocketWrapper/src/MbedUdp.cpp`
201+
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/3.3.0/cores/arduino/src/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h`
202202

203203
---
204204
---
@@ -209,14 +209,14 @@ The current library implementation, using `xyz-Impl.h` instead of standard `xyz.
209209

210210
You can include this `.hpp` file
211211

212-
```
212+
```cpp
213213
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
214214
#include "Portenta_H7_AsyncHTTPRequest.hpp" //https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest
215215
```
216216

217217
in many files. But be sure to use the following `.h` file **in just 1 `.h`, `.cpp` or `.ino` file**, which must **not be included in any other file**, to avoid `Multiple Definitions` Linker Error
218218

219-
```
219+
```cpp
220220
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
221221
#include "Portenta_H7_AsyncHTTPRequest.h" //https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest
222222
```
@@ -262,15 +262,15 @@ Please take a look at other examples, as well.
262262

263263
#### 1. File [AsyncHTTPRequest.ino](examples/Ethernet/AsyncHTTPRequest/AsyncHTTPRequest.ino)
264264

265-
https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest/blob/9d3653cda8fd3c7722f5b5f4f8ee5f3b9d37536d/examples/Ethernet/AsyncHTTPRequest/AsyncHTTPRequest.ino#L44-L174
265+
https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest/blob/dbd43517901ed8c33235642b5a5232d5299756ba/examples/Ethernet/AsyncHTTPRequest/AsyncHTTPRequest.ino#L44-L174
266266

267267

268268
---
269269

270270
#### 2. File [defines.h](examples/Ethernet/AsyncHTTPRequest/defines.h)
271271

272272

273-
https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest/blob/9d3653cda8fd3c7722f5b5f4f8ee5f3b9d37536d/examples/Ethernet/AsyncHTTPRequest/defines.h#L23-L68
273+
https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest/blob/dbd43517901ed8c33235642b5a5232d5299756ba/examples/Ethernet/AsyncHTTPRequest/defines.h#L23-L68
274274

275275

276276
---
@@ -282,45 +282,45 @@ https://github.com/khoih-prog/Portenta_H7_AsyncHTTPRequest/blob/9d3653cda8fd3c77
282282

283283
```
284284
Start AsyncHTTPRequest on PORTENTA_H7_M7
285-
Portenta_H7_AsyncTCP v1.3.2
286-
Portenta_H7_AsyncHTTPRequest v1.3.0
285+
Portenta_H7_AsyncTCP v1.4.0
286+
Portenta_H7_AsyncHTTPRequest v1.3.1
287287
Using mac index = 15
288288
Connected! IP address: 192.168.2.101
289289
Request sent
290290
**************************************
291291
abbreviation: EDT
292292
client_ip: aaa.bbb.ccc.ddd
293-
datetime: 2022-09-01T22:21:28.831047-04:00
294-
day_of_week: 4
295-
day_of_year: 244
293+
datetime: 2022-10-18T15:07:55.344362-04:00
294+
day_of_week: 2
295+
day_of_year: 291
296296
dst: true
297297
dst_from: 2022-03-13T07:00:00+00:00
298298
dst_offset: 3600
299299
dst_until: 2022-11-06T06:00:00+00:00
300300
raw_offset: -18000
301301
timezone: America/Toronto
302-
unixtime: 1662085288
303-
utc_datetime: 2022-09-02T02:21:28.831047+00:00
302+
unixtime: 1666120075
303+
utc_datetime: 2022-10-18T19:07:55.344362+00:00
304304
utc_offset: -04:00
305-
week_number: 35
305+
week_number: 42
306306
**************************************
307307
308308
**************************************
309309
abbreviation: EDT
310310
client_ip: aaa.bbb.ccc.ddd
311-
datetime: 2022-09-01T22:22:28.779577-04:00
312-
day_of_week: 4
313-
day_of_year: 244
311+
datetime: 2022-10-18T15:08:54.489027-04:00
312+
day_of_week: 2
313+
day_of_year: 291
314314
dst: true
315315
dst_from: 2022-03-13T07:00:00+00:00
316316
dst_offset: 3600
317317
dst_until: 2022-11-06T06:00:00+00:00
318318
raw_offset: -18000
319319
timezone: America/Toronto
320-
unixtime: 1662085348
321-
utc_datetime: 2022-09-02T02:22:28.779577+00:00
320+
unixtime: 1666120134
321+
utc_datetime: 2022-10-18T19:08:54.489027+00:00
322322
utc_offset: -04:00
323-
week_number: 35
323+
week_number: 42
324324
**************************************
325325
```
326326

@@ -330,8 +330,8 @@ week_number: 35
330330

331331
```
332332
Start AsyncDweetPOST on PORTENTA_H7_M7
333-
Portenta_H7_AsyncTCP v1.3.2
334-
Portenta_H7_AsyncHTTPRequest v1.3.0
333+
Portenta_H7_AsyncTCP v1.4.0
334+
Portenta_H7_AsyncHTTPRequest v1.3.1
335335
Connecting to SSID: HueNet1
336336
SSID: HueNet1
337337
Local IP Address: 192.168.2.94
@@ -353,8 +353,8 @@ Actual value: 88
353353

354354
```
355355
Start AsyncWebClientRepeating on PORTENTA_H7_M7
356-
Portenta_H7_AsyncTCP v1.3.2
357-
Portenta_H7_AsyncHTTPRequest v1.3.0
356+
Portenta_H7_AsyncTCP v1.4.0
357+
Portenta_H7_AsyncHTTPRequest v1.3.1
358358
Connecting to SSID: HueNet1
359359
SSID: HueNet1
360360
Local IP Address: 192.168.2.94
@@ -411,8 +411,8 @@ signal strength (RSSI):-26 dBm
411411

412412
```
413413
Start AsyncCustomHeader on PORTENTA_H7_M7
414-
Portenta_H7_AsyncTCP v1.3.2
415-
Portenta_H7_AsyncHTTPRequest v1.3.0
414+
Portenta_H7_AsyncTCP v1.4.0
415+
Portenta_H7_AsyncHTTPRequest v1.3.1
416416
Using mac index = 15
417417
Connected! IP address: 192.168.2.87
418418
@@ -421,19 +421,19 @@ Sending GET Request to http://worldtimeapi.org/api/timezone/America/Toronto.txt
421421
**************************************
422422
abbreviation: EDT
423423
client_ip: aaa.bbb.ccc.ddd
424-
datetime: 2022-09-01T22:21:28.831047-04:00
425-
day_of_week: 4
426-
day_of_year: 244
424+
datetime: 2022-10-18T15:09:54.390100-04:00
425+
day_of_week: 2
426+
day_of_year: 291
427427
dst: true
428428
dst_from: 2022-03-13T07:00:00+00:00
429429
dst_offset: 3600
430430
dst_until: 2022-11-06T06:00:00+00:00
431431
raw_offset: -18000
432432
timezone: America/Toronto
433-
unixtime: 1662085288
434-
utc_datetime: 2022-09-02T02:21:28.831047+00:00
433+
unixtime: 1666120194
434+
utc_datetime: 2022-10-18T19:09:54.390100+00:00
435435
utc_offset: -04:00
436-
week_number: 35
436+
week_number: 42
437437
**************************************
438438
```
439439

@@ -444,8 +444,8 @@ week_number: 35
444444

445445
```
446446
Start AsyncWebClientRepeating on PORTENTA_H7_M7
447-
Portenta_H7_AsyncTCP v1.3.2
448-
Portenta_H7_AsyncHTTPRequest v1.3.0
447+
Portenta_H7_AsyncTCP v1.4.0
448+
Portenta_H7_AsyncHTTPRequest v1.3.1
449449
Using mac index = 16
450450
Connected! IP address: 192.168.2.87
451451
@@ -501,45 +501,45 @@ Connected! IP address: 192.168.2.87
501501

502502
```
503503
Start AsyncSimpleGET on PORTENTA_H7_M7
504-
Portenta_H7_AsyncTCP v1.3.2
505-
Portenta_H7_AsyncHTTPRequest v1.3.0
504+
Portenta_H7_AsyncTCP v1.4.0
505+
Portenta_H7_AsyncHTTPRequest v1.3.1
506506
Using mac index = 7
507507
Connected! IP address: 192.168.2.87
508508
509509
**************************************
510510
abbreviation: EDT
511511
client_ip: aaa.bbb.ccc.ddd
512-
datetime: 2022-09-01T22:21:28.831047-04:00
513-
day_of_week: 4
514-
day_of_year: 244
512+
datetime: 2022-10-18T15:09:54.390100-04:00
513+
day_of_week: 2
514+
day_of_year: 291
515515
dst: true
516516
dst_from: 2022-03-13T07:00:00+00:00
517517
dst_offset: 3600
518518
dst_until: 2022-11-06T06:00:00+00:00
519519
raw_offset: -18000
520520
timezone: America/Toronto
521-
unixtime: 1662085288
522-
utc_datetime: 2022-09-02T02:21:28.831047+00:00
521+
unixtime: 1666120194
522+
utc_datetime: 2022-10-18T19:09:54.390100+00:00
523523
utc_offset: -04:00
524-
week_number: 35
524+
week_number: 42
525525
**************************************
526526
527527
**************************************
528528
abbreviation: EDT
529529
client_ip: aaa.bbb.ccc.ddd
530-
datetime: 2022-09-01T22:22:28.779577-04:00
531-
day_of_week: 4
532-
day_of_year: 244
530+
datetime: 2022-10-18T15:10:54.440157-04:00
531+
day_of_week: 2
532+
day_of_year: 291
533533
dst: true
534534
dst_from: 2022-03-13T07:00:00+00:00
535535
dst_offset: 3600
536536
dst_until: 2022-11-06T06:00:00+00:00
537537
raw_offset: -18000
538538
timezone: America/Toronto
539-
unixtime: 1662085348
540-
utc_datetime: 2022-09-02T02:22:28.779577+00:00
539+
unixtime: 1666120254
540+
utc_datetime: 2022-10-18T19:10:54.440157+00:00
541541
utc_offset: -04:00
542-
week_number: 35
542+
week_number: 42
543543
**************************************
544544
```
545545

@@ -595,7 +595,7 @@ Submit issues to: [Portenta_H7_AsyncHTTPRequest issues](https://github.com/khoih
595595
7. Fix long timeout if using `IPAddress`
596596
8. Display only successful responseText in examples
597597
9. Improve debug messages by adding functions to display error messages instead of `cryptic error number`
598-
598+
10. Not try to reconnect to the same `host:port` after connected
599599

600600
---
601601
---

0 commit comments

Comments
 (0)