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

Commit

Permalink
v1.0.0 for RP2040W with CYW43439 WiFi
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
khoih-prog authored Aug 14, 2022
1 parent 148e86e commit d738e36
Show file tree
Hide file tree
Showing 25 changed files with 6,913 additions and 499 deletions.
56 changes: 56 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Contributing to AsyncTCP_RP2040W

### Reporting Bugs

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

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

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

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

### How to submit a bug report

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.19) or Platform.io version
* `RP2040` Core Version (e.g. RP2040 core v2.4.0)
* `RP2040` Board type (e.g. RASPBERRY_PI_PICO_W)
* 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:
* Operating system (Windows, Ubuntu, etc.) and the output of `uname -a`
* Network configuration


### Example

```
Arduino IDE version: 1.8.19
RP2040 core v2.4.0
RASPBERRY_PI_PICO_W Module
OS: Ubuntu 20.04 LTS
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
Context:
I encountered a crash while using Ethernet Async_AdvancedWebServer.
Steps to reproduce:
1. ...
2. ...
3. ...
4. ...
```

### Sending Feature Requests

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/AsyncTCP_RP2040W/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.

### Sending Pull Requests

Pull Requests with changes and fixes are also welcome!


659 changes: 160 additions & 499 deletions LICENSE

Large diffs are not rendered by default.

227 changes: 227 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
# AsyncTCP_RP2040W

[![arduino-library-badge](https://www.ardu-badge.com/badge/AsyncTCP_RP2040W.svg?)](https://www.ardu-badge.com/AsyncTCP_RP2040W)
[![GitHub release](https://img.shields.io/github/release/khoih-prog/AsyncTCP_RP2040W.svg)](https://github.com/khoih-prog/AsyncTCP_RP2040W/releases)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/AsyncTCP_RP2040W.svg)](http://github.com/khoih-prog/AsyncTCP_RP2040W/issues)


<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>
<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>

---
---

## Table of contents

* [Table of contents](#table-of-contents)
* [Why do we need this AsyncTCP_RP2040W library](#why-do-we-need-this-AsyncTCP_RP2040W-library)
* [Features](#features)
* [Why Async is better](#why-async-is-better)
* [Currently supported Boards](#currently-supported-boards)
* [Changelog](changelog.md)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Use Arduino Library Manager](#use-arduino-library-manager)
* [Manual Install](#manual-install)
* [VS Code & PlatformIO](#vs-code--platformio)
* [Orignal documentation](#Orignal-documentation)
* [AsyncClient and AsyncServer](#AsyncClient-and-AsyncServer)
* [AsyncPrinter](#AsyncPrinter)
* [AsyncTCPbuffer](#AsyncTCPbuffer)
* [SyncClient](#SyncClient)
* [Debug](#debug)
* [Troubleshooting](#troubleshooting)
* [Issues](#issues)
* [TO DO](#to-do)
* [DONE](#done)
* [Contributions and Thanks](#contributions-and-thanks)
* [Contributing](#contributing)
* [License](#license)
* [Copyright](#copyright)

---
---

### Why do we need this [AsyncTCP_RP2040W library](https://github.com/khoih-prog/AsyncTCP_RP2040W)

#### Features

This library is based on, modified from:

1. [Hristo Gochkov's ESPAsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP)

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


#### Why Async is better

- Using asynchronous network means that you can handle **more than one connection at the same time**
- **You are called once the request is ready and parsed**
- 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
- **Speed is OMG**
- **Easy to use API, HTTP Basic and Digest MD5 Authentication (default), ChunkedResponse**
- Easily extensible to handle **any type of content**
- Supports Continue 100
- **Async WebSocket plugin offering different locations without extra servers or ports**
- Async EventSource (Server-Sent Events) plugin to send events to the browser
- URL Rewrite plugin for conditional and permanent url rewrites
- ServeStatic plugin that supports cache, Last-Modified, default index and more
- Simple template processing engine to handle templates


### Currently supported Boards

1. **RASPBERRY_PI_PICO_W with CYW43439 WiFi** using [**arduino-pico core v2.4.0+**](https://github.com/earlephilhower/arduino-pico)


---
---

## Prerequisites

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)
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)

---
---

## Installation

### Use Arduino Library Manager

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.
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.

### Manual Install

Another way to install is to:

1. Navigate to [**AsyncTCP_RP2040W**](https://github.com/khoih-prog/AsyncTCP_RP2040W) page.
2. Download the latest release `AsyncTCP_RP2040W-master.zip`.
3. Extract the zip file to `AsyncTCP_RP2040W-master` directory
4. Copy whole `AsyncTCP_RP2040W-master` folder to Arduino libraries' directory such as `~/Arduino/libraries/`.

### VS Code & PlatformIO

1. Install [VS Code](https://code.visualstudio.com/)
2. Install [PlatformIO](https://platformio.org/platformio-ide)
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)
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)

---
---

## Orignal documentation

For ESP32, check [AsyncTCP Library](https://github.com/me-no-dev/AsyncTCP)

[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)

This is a fully asynchronous TCP library, aimed at enabling trouble-free, multi-connection network environment for Espressif's ESP8266 MCUs.

### AsyncClient and AsyncServer

The base classes on which everything else is built. They expose all possible scenarios, but are really raw and require more skills to use.

### AsyncPrinter

This class can be used to send data like any other `Print` interface (`Serial` for example).

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.

### AsyncTCPbuffer

This class is really similar to the `AsyncPrinter`, but it can buffer some of the incoming data.

### SyncClient

It is exactly what it sounds like. This is a standard, synchronous blocking TCP Client you're used to.


---
---

### Debug

Debug is enabled by default on Serial.

You can also change the debugging level `_ASYNCTCP_RP2040W_LOGLEVEL_` from 0 to 4 in the library `cpp` files

```cpp
#define _ASYNCTCP_RP2040W_LOGLEVEL_ 1
```

---

### Troubleshooting

If you get compilation errors, more often than not, you may need to install a newer version of the core for Arduino boards.

Sometimes, the library will only work if you update the board core to the latest version because I am using newly added functions.


---
---

### Issues

Submit issues to: [AsyncTCP_RP2040W issues](https://github.com/khoih-prog/AsyncTCP_RP2040W/issues)

---

## TO DO

1. Search for bug and improvement.


---

## DONE

1. **RASPBERRY_PI_PICO_W with CYW43439 WiFi**

---
---

### Contributions and Thanks

Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.

---

### Contributions and Thanks

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)


<table>
<tr>
<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>
</tr>
</table>

---

## Contributing

If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell other people about this library

---
---

### License

- The library is licensed under [GPLv3](https://github.com/khoih-prog/AsyncTCP_RP2040W/blob/main/LICENSE)

---

## Copyright

Copyright 2022- Khoi Hoang


26 changes: 26 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# AsyncTCP_RP2040W Library

[![arduino-library-badge](https://www.ardu-badge.com/badge/AsyncTCP_RP2040W.svg?)](https://www.ardu-badge.com/AsyncTCP_RP2040W)
[![GitHub release](https://img.shields.io/github/release/khoih-prog/AsyncTCP_RP2040W.svg)](https://github.com/khoih-prog/AsyncTCP_RP2040W/releases)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/AsyncTCP_RP2040W.svg)](http://github.com/khoih-prog/AsyncTCP_RP2040W/issues)

---
---

## Table of Contents

* [Changelog](#changelog)
* [Initial Releases v1.0.0](#Initial-Releases-v100)

---
---

## Changelog


### 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)


37 changes: 37 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "AsyncTCP_RP2040W",
"version": "1.0.0",
"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",
"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",
"authors":
[
{
"name": "Hristo Gochkov",
"url": "https://github.com/me-no-dev"
},
{
"name": "Khoi Hoang",
"url": "https://github.com/khoih-prog",
"email": "[email protected]",
"maintainer": true
}
],
"repository":
{
"type": "git",
"url": "https://github.com/khoih-prog/AsyncTCP_RP2040W"
},
"homepage": "https://github.com/khoih-prog/AsyncTCP_RP2040W",
"export": {
"exclude": [
"linux",
"extras",
"tests"
]
},
"license": "LGPL-3.0",
"frameworks": "*",
"platforms": "raspberrypi",
"examples": "examples/*/*/*.ino",
"headers": "AsyncTCP_RP2040W.h"
}
12 changes: 12 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name=AsyncTCP_RP2040W
version=1.0.0
author=Hristo Gochkov,Khoi Hoang
maintainer=Khoi Hoang <[email protected]>
sentence=Asynchronous TCP Library for RASPBERRY_PI_PICO_W using CYW43439 WiFi with arduino-pico core
paragraph=This library is the base for future and more advanced Async libraries, such as AsyncWebServer_RP2040W, AsyncHTTPRequest_RP2040W, AsyncHTTPSRequest_RP2040W
category=Communication
url=https://github.com/khoih-prog/AsyncTCP_RP2040W
architectures=rp2040
repository=https://github.com/khoih-prog/AsyncTCP_RP2040W
license=GPLv3
includes=AsyncTCP_RP2040W.h
Loading

0 comments on commit d738e36

Please sign in to comment.