|
15 | 15 | ## Table of contents
|
16 | 16 |
|
17 | 17 | * [Table of contents](#table-of-contents)
|
| 18 | +* [Important Note from v1.4.0](#Important-Note-from-v140) |
18 | 19 | * [Important Note from v1.2.0](#Important-Note-from-v120)
|
19 | 20 | * [Why do we need this AsyncWebServer_RP2040W library](#why-do-we-need-this-AsyncWebServer_RP2040W-library)
|
20 | 21 | * [Features](#features)
|
|
93 | 94 | * [14. Async_AdvancedWebServer_MemoryIssues_Send_CString](examples/Async_AdvancedWebServer_MemoryIssues_Send_CString) **New**
|
94 | 95 | * [15. Async_WebSocketsServer](examples/Async_WebSocketsServer) **New**
|
95 | 96 | * [16. Async_WebSocketsServer_Xtreme](examples/Async_WebSocketsServer_Xtreme) **New**
|
| 97 | + * [17. AsyncFSWebServer](examples/AsyncFSWebServer) **New** |
| 98 | + * [18. AsyncFSWebServer_Complex](examples/AsyncFSWebServer_Complex) **New** |
96 | 99 | * [Example Async_AdvancedWebServer](#Example-Async_AdvancedWebServer)
|
97 | 100 | * [Debug Terminal Output Samples](#debug-terminal-output-samples)
|
98 | 101 | * [1. Async_AdvancedWebServer on RASPBERRY_PI_PICO_W using CYW43439 WiFi](#1-Async_AdvancedWebServer-on-RASPBERRY_PI_PICO_W-using-CYW43439-WiFi)
|
|
105 | 108 | * [8. Async_AdvancedWebServer_MemoryIssues_Send_CString on RASPBERRY_PI_PICO_W](#8-Async_AdvancedWebServer_MemoryIssues_Send_CString-on-RASPBERRY_PI_PICO_W)
|
106 | 109 | * [9. Async_WebSocketsServer on RASPBERRY_PI_PICO_W using CYW43439 WiFi](#9-Async_WebSocketsServer-on-RASPBERRY_PI_PICO_W-using-CYW43439-WiFi)
|
107 | 110 | * [10. Async_WebSocketsServer_Xtreme on RASPBERRY_PI_PICO_W using CYW43439 WiFi](#10-Async_WebSocketsServer_Xtreme-on-RASPBERRY_PI_PICO_W-using-CYW43439-WiFi)
|
| 111 | + * [11. AsyncFSWebServer_Complex on RASPBERRY_PI_PICO_W using CYW43439 WiFi](#11-AsyncFSWebServer_Complex-on-RASPBERRY_PI_PICO_W-using-CYW43439-WiFi) |
108 | 112 | * [Debug](#debug)
|
109 | 113 | * [Troubleshooting](#troubleshooting)
|
110 | 114 | * [Issues](#issues)
|
|
118 | 122 | ---
|
119 | 123 | ---
|
120 | 124 |
|
| 125 | +### Important Note from v1.4.0 |
| 126 | + |
| 127 | +The new `v1.4.0+` has added a new and powerful feature to use `LittleFS` functions, such as AsyncFSWebServer |
| 128 | + |
| 129 | +Check these new examples |
| 130 | + |
| 131 | +1. [AsyncFSWebServer](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/AsyncFSWebServer) |
| 132 | +2. [AsyncFSWebServer_Complex](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/AsyncFSWebServer_Complex) |
| 133 | + |
| 134 | +<p align="center"> |
| 135 | + <img src="https://github.com/khoih-prog/AsyncWebServer_RP2040W/blob/main/pics/AsyncFSWebServer_Complex.png"> |
| 136 | +</p> |
| 137 | + |
| 138 | +--- |
| 139 | + |
121 | 140 | ### Important Note from v1.2.0
|
122 | 141 |
|
123 | 142 | The new `v1.2.0+` has added a new and powerful feature to permit using `CString` to save heap to send `very large data`.
|
@@ -188,7 +207,6 @@ request->send(200, textPlainStr, cStr, false);
|
188 | 207 | The required additional HEAP is about **1 times of the CString size**. This way is the best and **most efficient way** to use by avoiding of `unnecessary copies` of the CString in HEAP
|
189 | 208 |
|
190 | 209 |
|
191 |
| - |
192 | 210 | ---
|
193 | 211 | ---
|
194 | 212 |
|
@@ -235,7 +253,7 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP
|
235 | 253 | ## Prerequisites
|
236 | 254 |
|
237 | 255 | 1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [](https://github.com/arduino/Arduino/releases/latest)
|
238 |
| - 2. [`Earle Philhower's arduino-pico core v2.6.0+`](https://github.com/earlephilhower/arduino-pico) for **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, etc. [](https://github.com/earlephilhower/arduino-pico/releases/latest) |
| 256 | + 2. [`Earle Philhower's arduino-pico core v2.6.1+`](https://github.com/earlephilhower/arduino-pico) for **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, etc. [](https://github.com/earlephilhower/arduino-pico/releases/latest) |
239 | 257 | 3. [`AsyncTCP_RP2040W library v1.1.0+`](https://github.com/khoih-prog/AsyncTCP_RP2040W) for RASPBERRY_PI_PICO_W with CYW43439 WiFi. [](https://github.com/khoih-prog/AsyncTCP_RP2040W/releases/latest)
|
240 | 258 |
|
241 | 259 | ---
|
@@ -790,6 +808,7 @@ request->send(response);
|
790 | 808 | ---
|
791 | 809 |
|
792 | 810 | ## Param Rewrite With Matching
|
| 811 | + |
793 | 812 | It is possible to rewrite the request url with parameter matchg. Here is an example with one parameter:
|
794 | 813 | Rewrite for example "/radio/{frequence}" -> "/radio?f={frequence}"
|
795 | 814 |
|
@@ -893,7 +912,6 @@ without starting another listening service or using different port
|
893 | 912 | ### Async WebSocket Event
|
894 | 913 |
|
895 | 914 | ```cpp
|
896 |
| -
|
897 | 915 | void onEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len)
|
898 | 916 | {
|
899 | 917 | if(type == WS_EVT_CONNECT)
|
@@ -1511,7 +1529,9 @@ build_flags =
|
1511 | 1529 | 13. [Async_AdvancedWebServer_MemoryIssues_SendArduinoString](examples/Async_AdvancedWebServer_MemoryIssues_SendArduinoString) **New**
|
1512 | 1530 | 14. [Async_AdvancedWebServer_MemoryIssues_Send_CString](examples/Async_AdvancedWebServer_MemoryIssues_Send_CString) **New**
|
1513 | 1531 | 15. [Async_WebSocketsServer](examples/Async_WebSocketsServer) **New**
|
1514 |
| -15. [Async_WebSocketsServer_Xtreme](examples/Async_WebSocketsServer_Xtreme) **New** |
| 1532 | +16. [Async_WebSocketsServer_Xtreme](examples/Async_WebSocketsServer_Xtreme) **New** |
| 1533 | +17. [AsyncFSWebServer](examples/AsyncFSWebServer) **New** |
| 1534 | +18. [AsyncFSWebServer_Complex](examples/AsyncFSWebServer_Complex) **New** |
1515 | 1535 |
|
1516 | 1536 |
|
1517 | 1537 | ---
|
@@ -1915,6 +1935,45 @@ You can access the Async_WebSockets Servers at the displayed server IP, e.g. `19
|
1915 | 1935 | </p>
|
1916 | 1936 |
|
1917 | 1937 |
|
| 1938 | +--- |
| 1939 | + |
| 1940 | + |
| 1941 | +#### 11. AsyncFSWebServer_Complex on RASPBERRY_PI_PICO_W with RP2040W CYW43439 WiFi |
| 1942 | + |
| 1943 | +Following is debug terminal output when running example [AsyncFSWebServer_Complex](examples/AsyncFSWebServer_Complex) on RASPBERRY_PI_PICO_W using CYW43439 WiFi. |
| 1944 | + |
| 1945 | + |
| 1946 | +``` |
| 1947 | +Start AsyncFSWebServer_Complex on RASPBERRY_PI_PICO_W with RP2040W CYW43439 WiFi |
| 1948 | +AsyncTCP_RP2040W v1.1.0 |
| 1949 | +AsyncWebServer_RP2040W v1.4.0 |
| 1950 | +Connecting to SSID: HueNet1 |
| 1951 | +SSID: HueNet1 |
| 1952 | +Local IP Address: 192.168.2.77 |
| 1953 | +Opening / directory |
| 1954 | +FS File: CanadaFlag_1.png, size: 40.25KB |
| 1955 | +FS File: CanadaFlag_2.png, size: 8.12KB |
| 1956 | +FS File: CanadaFlag_3.jpg, size: 10.89KB |
| 1957 | +FS File: css, size: 0B |
| 1958 | +FS File: edit.htm.gz, size: 4.02KB |
| 1959 | +FS File: favicon.ico, size: 1.12KB |
| 1960 | +FS File: graphs.js.gz, size: 1.92KB |
| 1961 | +FS File: index.htm, size: 3.63KB |
| 1962 | +FS File: js, size: 0B |
| 1963 | +
|
| 1964 | +AsyncWebServer started @192.168.2.77 |
| 1965 | +Open http://192.168.2.77/edit to see the file browser |
| 1966 | +AsyncFSEditor::handleRequest: Sending AsyncWebServerResponse |
| 1967 | +
|
| 1968 | +``` |
| 1969 | + |
| 1970 | + |
| 1971 | +You can access the Async_WebSockets Servers at the displayed server IP, e.g. `192.168.2.77` |
| 1972 | + |
| 1973 | +<p align="center"> |
| 1974 | + <img src="https://github.com/khoih-prog/AsyncWebServer_RP2040W/blob/main/pics/AsyncFSWebServer_Complex.png"> |
| 1975 | +</p> |
| 1976 | + |
1918 | 1977 |
|
1919 | 1978 | ---
|
1920 | 1979 | ---
|
@@ -1961,7 +2020,9 @@ Submit issues to: [AsyncWebServer_RP2040W issues](https://github.com/khoih-prog/
|
1961 | 2020 | 7. Support using `CString` to save heap to send `very large data`. Check [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8)
|
1962 | 2021 | 8. Fix `crash` when using `AsyncWebSockets server` and add example [Async_WebSocketsServer](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/Async_WebSocketsServer) to demo the AsyncWebSockets Server with a Python [WSClient.py](examples/Async_WebSocketsServer/WSClient_Python/WSClient.py)
|
1963 | 2022 | 9. Improve robustness of AsyncWebSockets server. Check [AsyncWebSocketServer_RP2040W crashes with "[AWS] ERROR: Too many messages queued" #6](https://github.com/khoih-prog/AsyncWebServer_RP2040W/issues/6) and add example [Async_WebSocketsServer_Xtreme](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/Async_WebSocketsServer_Xtreme) to demo the nearly highest possible WebSockets Server speed
|
1964 |
| - |
| 2023 | +10. Add `LittleFS` functions such as `AsyncFSWebServer` |
| 2024 | + |
| 2025 | + |
1965 | 2026 | ---
|
1966 | 2027 | ---
|
1967 | 2028 |
|
|
0 commit comments