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

Commit d738e36

Browse files
authored
v1.0.0 for RP2040W with CYW43439 WiFi
### Initial Releases v1.0.0 1. Initial coding to support **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, using [**arduino-pico core v2.4.0+**](https://github.com/earlephilhower/arduino-pico)
1 parent 148e86e commit d738e36

25 files changed

+6913
-499
lines changed

CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## Contributing to AsyncTCP_RP2040W
2+
3+
### Reporting Bugs
4+
5+
Please report bugs in [AsyncTCP_RP2040W Issues](https://github.com/khoih-prog/AsyncTCP_RP2040W/issues) if you find them.
6+
7+
However, before reporting a bug please check through the following:
8+
9+
* [Existing Open Issues](https://github.com/khoih-prog/AsyncTCP_RP2040W/issues) - someone might have already encountered this.
10+
11+
If you don't find anything, please [open a new issue](https://github.com/khoih-prog/AsyncTCP_RP2040W/issues/new).
12+
13+
### How to submit a bug report
14+
15+
Please ensure to specify the following:
16+
17+
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18+
* `RP2040` Core Version (e.g. RP2040 core v2.4.0)
19+
* `RP2040` Board type (e.g. RASPBERRY_PI_PICO_W)
20+
* Contextual information (e.g. what you were trying to achieve)
21+
* Simplest possible steps to reproduce
22+
* Anything that might be relevant in your opinion, such as:
23+
* Operating system (Windows, Ubuntu, etc.) and the output of `uname -a`
24+
* Network configuration
25+
26+
27+
### Example
28+
29+
```
30+
Arduino IDE version: 1.8.19
31+
RP2040 core v2.4.0
32+
RASPBERRY_PI_PICO_W Module
33+
OS: Ubuntu 20.04 LTS
34+
Linux xy-Inspiron-3593 5.15.0-41-generic #44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
35+
36+
Context:
37+
I encountered a crash while using Ethernet Async_AdvancedWebServer.
38+
39+
Steps to reproduce:
40+
1. ...
41+
2. ...
42+
3. ...
43+
4. ...
44+
```
45+
46+
### Sending Feature Requests
47+
48+
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.
49+
50+
There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/AsyncTCP_RP2040W/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.
51+
52+
### Sending Pull Requests
53+
54+
Pull Requests with changes and fixes are also welcome!
55+
56+

LICENSE

Lines changed: 160 additions & 499 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
# AsyncTCP_RP2040W
2+
3+
[![arduino-library-badge](https://www.ardu-badge.com/badge/AsyncTCP_RP2040W.svg?)](https://www.ardu-badge.com/AsyncTCP_RP2040W)
4+
[![GitHub release](https://img.shields.io/github/release/khoih-prog/AsyncTCP_RP2040W.svg)](https://github.com/khoih-prog/AsyncTCP_RP2040W/releases)
5+
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
6+
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/AsyncTCP_RP2040W.svg)](http://github.com/khoih-prog/AsyncTCP_RP2040W/issues)
7+
8+
9+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
10+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
11+
12+
---
13+
---
14+
15+
## Table of contents
16+
17+
* [Table of contents](#table-of-contents)
18+
* [Why do we need this AsyncTCP_RP2040W library](#why-do-we-need-this-AsyncTCP_RP2040W-library)
19+
* [Features](#features)
20+
* [Why Async is better](#why-async-is-better)
21+
* [Currently supported Boards](#currently-supported-boards)
22+
* [Changelog](changelog.md)
23+
* [Prerequisites](#prerequisites)
24+
* [Installation](#installation)
25+
* [Use Arduino Library Manager](#use-arduino-library-manager)
26+
* [Manual Install](#manual-install)
27+
* [VS Code & PlatformIO](#vs-code--platformio)
28+
* [Orignal documentation](#Orignal-documentation)
29+
* [AsyncClient and AsyncServer](#AsyncClient-and-AsyncServer)
30+
* [AsyncPrinter](#AsyncPrinter)
31+
* [AsyncTCPbuffer](#AsyncTCPbuffer)
32+
* [SyncClient](#SyncClient)
33+
* [Debug](#debug)
34+
* [Troubleshooting](#troubleshooting)
35+
* [Issues](#issues)
36+
* [TO DO](#to-do)
37+
* [DONE](#done)
38+
* [Contributions and Thanks](#contributions-and-thanks)
39+
* [Contributing](#contributing)
40+
* [License](#license)
41+
* [Copyright](#copyright)
42+
43+
---
44+
---
45+
46+
### Why do we need this [AsyncTCP_RP2040W library](https://github.com/khoih-prog/AsyncTCP_RP2040W)
47+
48+
#### Features
49+
50+
This library is based on, modified from:
51+
52+
1. [Hristo Gochkov's ESPAsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP)
53+
54+
to apply the better and faster **asynchronous** feature of the **powerful** [ESPAsyncTCP Library](https://github.com/me-no-dev/ESPAsyncTCP) into **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, and will be the base for future and more advanced Async libraries, such as AsyncWebServer_RP2040W, AsyncHTTPRequest_RP2040W, AsyncHTTPSRequest_RP2040W
55+
56+
57+
#### Why Async is better
58+
59+
- Using asynchronous network means that you can handle **more than one connection at the same time**
60+
- **You are called once the request is ready and parsed**
61+
- When you send the response, you are **immediately ready** to handle other connections while the server is taking care of sending the response in the background
62+
- **Speed is OMG**
63+
- **Easy to use API, HTTP Basic and Digest MD5 Authentication (default), ChunkedResponse**
64+
- Easily extensible to handle **any type of content**
65+
- Supports Continue 100
66+
- **Async WebSocket plugin offering different locations without extra servers or ports**
67+
- Async EventSource (Server-Sent Events) plugin to send events to the browser
68+
- URL Rewrite plugin for conditional and permanent url rewrites
69+
- ServeStatic plugin that supports cache, Last-Modified, default index and more
70+
- Simple template processing engine to handle templates
71+
72+
73+
### Currently supported Boards
74+
75+
1. **RASPBERRY_PI_PICO_W with CYW43439 WiFi** using [**arduino-pico core v2.4.0+**](https://github.com/earlephilhower/arduino-pico)
76+
77+
78+
---
79+
---
80+
81+
## Prerequisites
82+
83+
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)
84+
2. [`Earle Philhower's arduino-pico core v2.4.0+`](https://github.com/earlephilhower/arduino-pico) for **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
85+
86+
---
87+
---
88+
89+
## Installation
90+
91+
### Use Arduino Library Manager
92+
93+
The best and easiest way is to use `Arduino Library Manager`. Search for [**AsyncTCP_RP2040W**](https://github.com/khoih-prog/AsyncTCP_RP2040W), then select / install the latest version.
94+
You can also use this link [![arduino-library-badge](https://www.ardu-badge.com/badge/AsyncTCP_RP2040W.svg?)](https://www.ardu-badge.com/AsyncTCP_RP2040W) for more detailed instructions.
95+
96+
### Manual Install
97+
98+
Another way to install is to:
99+
100+
1. Navigate to [**AsyncTCP_RP2040W**](https://github.com/khoih-prog/AsyncTCP_RP2040W) page.
101+
2. Download the latest release `AsyncTCP_RP2040W-master.zip`.
102+
3. Extract the zip file to `AsyncTCP_RP2040W-master` directory
103+
4. Copy whole `AsyncTCP_RP2040W-master` folder to Arduino libraries' directory such as `~/Arduino/libraries/`.
104+
105+
### VS Code & PlatformIO
106+
107+
1. Install [VS Code](https://code.visualstudio.com/)
108+
2. Install [PlatformIO](https://platformio.org/platformio-ide)
109+
3. Install [**AsyncTCP_RP2040W** library](https://registry.platformio.org/libraries/khoih-prog/AsyncTCP_RP2040W) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/AsyncTCP_RP2040W/installation). Search for **AsyncTCP_RP2040W** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
110+
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)
111+
112+
---
113+
---
114+
115+
## Orignal documentation
116+
117+
For ESP32, check [AsyncTCP Library](https://github.com/me-no-dev/AsyncTCP)
118+
119+
[Join the ESPAsyncWebServer chat](https://gitter.im/me-no-dev/ESPAsyncWebServer) [![Join the chat at https://gitter.im/me-no-dev/ESPAsyncWebServer](https://badges.gitter.im/me-no-dev/ESPAsyncWebServer.svg)](https://gitter.im/me-no-dev/ESPAsyncWebServer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
120+
121+
This is a fully asynchronous TCP library, aimed at enabling trouble-free, multi-connection network environment for Espressif's ESP8266 MCUs.
122+
123+
### AsyncClient and AsyncServer
124+
125+
The base classes on which everything else is built. They expose all possible scenarios, but are really raw and require more skills to use.
126+
127+
### AsyncPrinter
128+
129+
This class can be used to send data like any other `Print` interface (`Serial` for example).
130+
131+
The object then can be used outside of the Async callbacks (the loop) and receive asynchronously data using `onData`. The object can be checked if the underlying `AsyncClient`is connected, or hook to the `onDisconnect` callback.
132+
133+
### AsyncTCPbuffer
134+
135+
This class is really similar to the `AsyncPrinter`, but it can buffer some of the incoming data.
136+
137+
### SyncClient
138+
139+
It is exactly what it sounds like. This is a standard, synchronous blocking TCP Client you're used to.
140+
141+
142+
---
143+
---
144+
145+
### Debug
146+
147+
Debug is enabled by default on Serial.
148+
149+
You can also change the debugging level `_ASYNCTCP_RP2040W_LOGLEVEL_` from 0 to 4 in the library `cpp` files
150+
151+
```cpp
152+
#define _ASYNCTCP_RP2040W_LOGLEVEL_ 1
153+
```
154+
155+
---
156+
157+
### Troubleshooting
158+
159+
If you get compilation errors, more often than not, you may need to install a newer version of the core for Arduino boards.
160+
161+
Sometimes, the library will only work if you update the board core to the latest version because I am using newly added functions.
162+
163+
164+
---
165+
---
166+
167+
### Issues
168+
169+
Submit issues to: [AsyncTCP_RP2040W issues](https://github.com/khoih-prog/AsyncTCP_RP2040W/issues)
170+
171+
---
172+
173+
## TO DO
174+
175+
1. Search for bug and improvement.
176+
177+
178+
---
179+
180+
## DONE
181+
182+
1. **RASPBERRY_PI_PICO_W with CYW43439 WiFi**
183+
184+
---
185+
---
186+
187+
### Contributions and Thanks
188+
189+
Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.
190+
191+
---
192+
193+
### Contributions and Thanks
194+
195+
1. Based on and modified from [Hristo Gochkov's ESPAsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP). Many thanks to [Hristo Gochkov](https://github.com/me-no-dev) for great [ESPAsyncTCP Library](https://github.com/me-no-dev/ESPAsyncTCP)
196+
197+
198+
<table>
199+
<tr>
200+
<td align="center"><a href="https://github.com/me-no-dev"><img src="https://github.com/me-no-dev.png" width="100px;" alt="me-no-dev"/><br /><sub><b>⭐️⭐️ Hristo Gochkov</b></sub></a><br /></td>
201+
</tr>
202+
</table>
203+
204+
---
205+
206+
## Contributing
207+
208+
If you want to contribute to this project:
209+
- Report bugs and errors
210+
- Ask for enhancements
211+
- Create issues and pull requests
212+
- Tell other people about this library
213+
214+
---
215+
---
216+
217+
### License
218+
219+
- The library is licensed under [GPLv3](https://github.com/khoih-prog/AsyncTCP_RP2040W/blob/main/LICENSE)
220+
221+
---
222+
223+
## Copyright
224+
225+
Copyright 2022- Khoi Hoang
226+
227+

changelog.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AsyncTCP_RP2040W Library
2+
3+
[![arduino-library-badge](https://www.ardu-badge.com/badge/AsyncTCP_RP2040W.svg?)](https://www.ardu-badge.com/AsyncTCP_RP2040W)
4+
[![GitHub release](https://img.shields.io/github/release/khoih-prog/AsyncTCP_RP2040W.svg)](https://github.com/khoih-prog/AsyncTCP_RP2040W/releases)
5+
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
6+
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/AsyncTCP_RP2040W.svg)](http://github.com/khoih-prog/AsyncTCP_RP2040W/issues)
7+
8+
---
9+
---
10+
11+
## Table of Contents
12+
13+
* [Changelog](#changelog)
14+
* [Initial Releases v1.0.0](#Initial-Releases-v100)
15+
16+
---
17+
---
18+
19+
## Changelog
20+
21+
22+
### Initial Releases v1.0.0
23+
24+
1. Initial coding to support **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, using [**arduino-pico core v2.4.0+**](https://github.com/earlephilhower/arduino-pico)
25+
26+

library.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "AsyncTCP_RP2040W",
3+
"version": "1.0.0",
4+
"keywords": "http, communication, async, websocket, webserver, async-webserver, async-tcp, async-udp, async-websocket, async-http, ssl, tls, rp2040, rp2040w, raspberry-pi-pico-w, cyw43439, wifi",
5+
"description": "Asynchronous TCP Library for RASPBERRY_PI_PICO_W using CYW43439 WiFi with arduino-pico core. This library is the base for future and more advanced Async libraries, such as AsyncWebServer_RP2040W, AsyncHTTPRequest_RP2040W, AsyncHTTPSRequest_RP2040W",
6+
"authors":
7+
[
8+
{
9+
"name": "Hristo Gochkov",
10+
"url": "https://github.com/me-no-dev"
11+
},
12+
{
13+
"name": "Khoi Hoang",
14+
"url": "https://github.com/khoih-prog",
15+
"email": "[email protected]",
16+
"maintainer": true
17+
}
18+
],
19+
"repository":
20+
{
21+
"type": "git",
22+
"url": "https://github.com/khoih-prog/AsyncTCP_RP2040W"
23+
},
24+
"homepage": "https://github.com/khoih-prog/AsyncTCP_RP2040W",
25+
"export": {
26+
"exclude": [
27+
"linux",
28+
"extras",
29+
"tests"
30+
]
31+
},
32+
"license": "LGPL-3.0",
33+
"frameworks": "*",
34+
"platforms": "raspberrypi",
35+
"examples": "examples/*/*/*.ino",
36+
"headers": "AsyncTCP_RP2040W.h"
37+
}

library.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name=AsyncTCP_RP2040W
2+
version=1.0.0
3+
author=Hristo Gochkov,Khoi Hoang
4+
maintainer=Khoi Hoang <[email protected]>
5+
sentence=Asynchronous TCP Library for RASPBERRY_PI_PICO_W using CYW43439 WiFi with arduino-pico core
6+
paragraph=This library is the base for future and more advanced Async libraries, such as AsyncWebServer_RP2040W, AsyncHTTPRequest_RP2040W, AsyncHTTPSRequest_RP2040W
7+
category=Communication
8+
url=https://github.com/khoih-prog/AsyncTCP_RP2040W
9+
architectures=rp2040
10+
repository=https://github.com/khoih-prog/AsyncTCP_RP2040W
11+
license=GPLv3
12+
includes=AsyncTCP_RP2040W.h

0 commit comments

Comments
 (0)