Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/cla-signatures/cla.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"signedContributors": [
{
"name": "JorritPosthuma",
"id": 412253,
"comment_id": 2495621851,
"created_at": "2024-11-23T18:59:09Z",
"repoId": 191947254,
"pullRequestNo": 108
}
]
}
154 changes: 93 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,55 @@ on:
push:
paths-ignore:
- "**/**.md"
- "/keywords.txt"
- "/library.json"
- "/library.properties"
- "/docs"
- "LICENSE"
- "keywords.txt"
- "library.json"
- "library.properties"
- "portal"
- "docs/*"
pull_request:
paths-ignore:
- "**/**.md"
- "/keywords.txt"
- "/library.json"
- "/library.properties"
- "/docs"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

- "LICENSE"
- "keywords.txt"
- "library.json"
- "library.properties"
- "portal"
- "docs/*"

jobs:
arduino:
name: arduino ${{ matrix.name }}
name: Arduino - ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: package_esp32_index.json
- name: ESP8266
core: esp8266:esp8266
board: esp8266:esp8266:huzzah
index_url: https://arduino.esp8266.com/stable/package_esp8266com_index.json

- name: ESP32
core: esp32:esp32
board: esp32:esp32:esp32
index_url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
- name: package_esp32_dev_index.json

- name: ESP32 (Dev Branch)
core: esp32:esp32
board: esp32:esp32:esp32
index_url: https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
- name: package_esp8266com_index.json
core: esp8266:esp8266
board: esp8266:esp8266:huzzah
index_url: https://arduino.esp8266.com/stable/package_esp8266com_index.json


- name: Pico W | RP2040+W
core: rp2040:rp2040
board: rp2040:rp2040:rpipicow
index_url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

- name: Pico 2W | RP2350+W
core: rp2040:rp2040
board: rp2040:rp2040:rpipico2w
index_url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -59,85 +71,105 @@ jobs:
- name: Install core
run: arduino-cli core install --additional-urls "${{ matrix.index_url }}" ${{ matrix.core }}

- name: Install AsyncTCP
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/AsyncTCP#v3.2.6
- name: Install AsyncTCP (ESP32)
if: ${{ matrix.core == 'esp32:esp32' }}
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/AsyncTCP#v3.3.7

- name: Install ESPAsyncTCP
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/esphome-ESPAsyncTCP#v2.0.0
- name: Install ESPAsyncTCP (ESP8266)
if: ${{ matrix.core == 'esp8266:esp8266' }}
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/ESPAsyncTCP#v2.0.0

- name: Install RPAsyncTCP (RP2040)
if: ${{ matrix.core == 'rp2040:rp2040' }}
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ayushsharma82/RPAsyncTCP#v1.3.2

- name: Install ESPAsyncWebServer
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/mathieucarbou/ESPAsyncWebServer#v3.3.17
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/ESPAsyncWebServer#v3.7.3

- name: Build Demo
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo/Demo.ino"

- name: Build Demo_AP
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Demo_AP/Demo_AP.ino"

- name: Build Logging
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Logging/Logging.ino"

- name: Build HighPerf
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/HighPerf/HighPerf.ino"

- name: Build Logging
run: arduino-cli compile --library . --warnings none -b ${{ matrix.board }} "examples/Logging/Logging.ino"

platformio:
name: "pio:${{ matrix.env }}:${{ matrix.board }}"
name: PlatformIO - ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- env: ci-arduino-2
board: esp32dev
- env: ci-arduino-2
board: esp32-s3-devkitc-1
- name: ESP8266 (Huzzah)
env: ci-esp8266
board: huzzah

- name: ESP8266 (D1 Mini)
env: ci-esp8266
board: d1_mini

- env: ci-arduino-3
- name: ESP32 (Arduino Core v2)
env: ci-esp32-arduino-2
board: esp32dev
- env: ci-arduino-3
board: esp32-s3-devkitc-1
- env: ci-arduino-3
board: esp32-c6-devkitc-1

- env: ci-arduino-310rc1
- name: ESP32
env: ci-esp32
board: esp32dev
- env: ci-arduino-310rc1

- name: ESP32-S2
env: ci-esp32
board: esp32-s2-saola-1

- name: ESP32-S3
env: ci-esp32
board: esp32-s3-devkitc-1
- env: ci-arduino-310rc1

- name: ESP32-C3
env: ci-esp32
board: esp32-c3-devkitc-02

- name: ESP32-C6
env: ci-esp32
board: esp32-c6-devkitc-1

- env: ci-esp8266
board: huzzah
- env: ci-esp8266
board: d1_mini

- name: Pico W | RP2040+W
env: ci-rp2040
board: rpipicow

- name: Pico 2W | RP2350+W
env: ci-rp2350
board: rpipico2w
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Cache PlatformIO
- name: Set up cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pio
path: |
~/.cache/pip
~/.platformio

- name: Python
~/.cache/pip

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Build
- name: Setup PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio

- run: PLATFORMIO_SRC_DIR="examples/Demo" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR="examples/Demo_AP" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR="examples/Logging" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR="examples/HighPerf" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}


- run: PLATFORMIO_SRC_DIR=examples/Demo PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/Demo_AP PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/HighPerf PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_SRC_DIR=examples/Logging PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Demo" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Demo_AP" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/Logging" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/HighPerf" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
- run: PLATFORMIO_BUILD_FLAGS="-DWSL_HIGH_PERF" PLATFORMIO_SRC_DIR="examples/HighPerf" PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
7 changes: 5 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is marked as stale because it has been open 45 days with no activity. You can remove stale label or comment if this PR is still valid.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
exempt-issue-labels: bug,triage,feature_request
exempt-pr-labels: wip,feature_request
exempt-all-assignees: true
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
days-before-close: 7
days-before-pr-close: -1
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
<p align="center"><a href="https://webserial.pro?ref=ghfeature" target="_blank"><img src="/docs/feature.png" width="1200"></a></p>
<p align="center">
<a href="https://webserial.pro?ref=ghfeature" target="_blank">
<img src="/docs/feature.png" width="1200">
</a>
</p>

<br/>

<p>
<img src="https://img.shields.io/github/last-commit/ayushsharma82/WebSerial.svg?style=for-the-badge" />
&nbsp;
<img src="https://img.shields.io/github/actions/workflow/status/ayushsharma82/WebSerial/ci.yml?branch=master&style=for-the-badge" />
&nbsp;
<img src="https://img.shields.io/github/license/ayushsharma82/WebSerial.svg?style=for-the-badge" />
<img src="https://img.shields.io/github/last-commit/ayushsharma82/WebSerial.svg?style=for-the-badge" />
&nbsp;
<img src="https://img.shields.io/github/actions/workflow/status/ayushsharma82/WebSerial/ci.yml?branch=master&style=for-the-badge" />
&nbsp;
<img src="https://img.shields.io/github/license/ayushsharma82/WebSerial.svg?style=for-the-badge" />
</p>

<br/>

<p><b>WebSerial</b> is a remote terminal to log, monitor or debug your firmware without being connected by wire. It lives on your wireless microcontroller itself and can be accessed anytime through your browser.
**WebSerial** is a remote terminal to log, monitor or debug your firmware without being connected by wire. It lives on your wireless microcontroller itself and can be accessed anytime through your browser.

<br/>
<br/>
Expand All @@ -25,20 +32,27 @@
<br/>

## Supported MCUs

WebSerial works on the following microcontrollers/boards:

- ESP8266
- ESP32
- RP2040+W (Example: Raspberry Pico W)
- RP2350+W (Example: Raspberry Pico 2W)
- *( more coming soon )*

<br/>

<h2>Documentation</h2>
<p>Learn more about Installation & Usage: <a href="https://docs.webserial.pro?ref=gitreadme">Click Here</a></p>
## Documentation

Learn more about Installation & Usage: [Click Here](https://docs.webserial.pro?ref=gitreadme)

<br>

<h2>OSS Preview</h2>
<p>Once you have integrated WebSerial library in your code, a terminal like below will be accessible over your WiFi microcontroller's IP:
## OSS Preview

Once you have integrated WebSerial library in your code, a terminal like below will be accessible over your WiFi microcontroller's IP:

<p align="center"><img src="/docs/preview.png" width="1200"></p>

<br/>
Expand Down Expand Up @@ -67,17 +81,17 @@ WebSerial Pro comes with the following extended functionality:
</a>

<br>
<br>

<h2>Contributions</h2>
<p>Every contribution to this repository is highly appreciated! If you spot any bug or problem, open a issue or pull request so that it can be rectified for everyone.</p>
## Contributions

Every contribution to this repository is highly appreciated! If you spot any bug or problem, open a issue or pull request so that it can be rectified for everyone.

**For feature requests:** Please open a issue and I'll add the feature in a future release once I get some time in my hands.

<br/>

<h2>License</h2>
## License

WebSerial open-source edition is licensed under Affero General Public License v3.0 ( AGPL-3.0 ).

If you are intending to use WebSerial in a commercial project, please consider purchasing [WebSerial Pro](https://webserial.pro?ref=ghlicense) which comes with a less restrictive SOFTT Commercial License 1.1 ( SCL-1.1 ).
If you are intending to use WebSerial in a commercial project, please consider purchasing [WebSerial Pro](https://webserial.pro?ref=ghlicense) which comes with a less restrictive SOFTT Commercial License 1.2 ( SCL-1.2 ).
13 changes: 12 additions & 1 deletion examples/Demo/Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
Works with following hardware:
- ESP8266
- ESP32
- RP2040+W
- RP2350+W

WebSerial terminal will be accessible at your microcontroller's <IPAddress>/webserial URL.

Expand All @@ -26,6 +28,9 @@
#elif defined(ESP32)
#include <WiFi.h>
#include <AsyncTCP.h>
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
#include <WiFi.h>
#include <RPAsyncTCP.h>
#endif
#include <ESPAsyncWebServer.h>
#include <WebSerial.h>
Expand Down Expand Up @@ -81,7 +86,13 @@ void loop() {
WebSerial.print(F("IP address: "));
WebSerial.println(WiFi.localIP());
WebSerial.printf("Uptime: %lums\n", millis());
WebSerial.printf("Free heap: %" PRIu32 "\n", ESP.getFreeHeap());
#if defined(ESP8266)
WebSerial.printf("Free heap: %" PRIu32 "\n", ESP.getFreeHeap());
#elif defined(ESP32)
WebSerial.printf("Free heap: %" PRIu32 "\n", ESP.getFreeHeap());
#elif defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
WebSerial.printf("Free heap: %" PRIu32 "\n", rp2040.getFreeHeap());
#endif
last_print_time = millis();
}

Expand Down
Loading