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
43 changes: 28 additions & 15 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
# Auto detect text files and perform LF normalization
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.py text eol=lf
*.rst text eol=lf
*.sh text eol=lf
*.h text eol=lf
*.cpp text eol=lf
*.c text eol=lf
.yaml text eol=lf
*.yml text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.json text eol=lf
*.properties text eol=lf
LICENSE text eol=lf
nurfile text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf
.clang-format text eol=lf
.clang-tidy text eol=lf
Makefile text eol=lf
*.svg text eol=lf
*.ino text eol=lf
*.dot text eol=lf
*.cmake text eol=lf
*.css text eol=lf
Doxyfile text eol=lf
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ updates:
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
cooldown:
default-days: 5
groups:
actions:
patterns:
- "*"
27 changes: 18 additions & 9 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux build
name: Linux

on:
pull_request:
Expand All @@ -23,22 +23,21 @@ on:
- "examples/**CMakeLists.txt"
- "!**Makefile" # old build system is not tested in this workflow
- ".github/workflows/build_linux.yml"
release:
types: [published, edited]
tags: ["*"]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
permissions: {}

jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

using_cmake:
jobs:
build:
uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main
with:
compiler: ${{ matrix.toolchain.compiler }}
usr-dir: ${{ matrix.toolchain.usr_dir }}
examples-path: examples
deploy-release: ${{ github.event_name == 'release' && (matrix.toolchain.compiler == 'armhf' || matrix.toolchain.compiler == 'arm64') }}
strategy:
fail-fast: false
matrix:
Expand All @@ -53,3 +52,13 @@ jobs:
# usr_dir: "i686-linux-gnu"
- compiler: "default" # github runner is hosted on a "amd64"
usr_dir: "local" # use default compiler to test build all examples (including the ncurses ones)

deploy:
name: deploy release assets
needs: [build]
permissions:
# needed for uploading release assets
contents: write
if: startsWith(github.ref, 'refs/tags/')
uses: nRF24/.github/.github/workflows/deploy_cpack_artifacts.yaml@main
secrets: inherit
25 changes: 18 additions & 7 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
name: check code formatting
name: Code format

on:
push:
branches: [master, v1.x]
pull_request:
branches: [master, v1.x]
push:
branches: [master, v1.x]
pull_request:
branches: [master, v1.x]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
check_formatting:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
check:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
permissions:
# needed to detect changed files
contents: read
# needed to post review suggestions on PRs
pull-requests: write
26 changes: 20 additions & 6 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build Docs
name: Docs

on:
pull_request:
Expand All @@ -21,14 +21,28 @@ on:
- "examples**.cpp"
- ".github/workflows/doxygen.yml"
- "Doxyfile"
release:
types: [published, edited]
tags: ["*"]
workflow_dispatch:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
build-docs:
build:
uses: nRF24/.github/.github/workflows/build_docs.yaml@main
with:
deploy-gh-pages: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master') }}
doxygen-version: '1.13.2'
doxygen-version: '1.15.0'

deploy:
needs: [build]
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
permissions:
# to authenticate the gh-pages environment
id-token: write
# to upload to GitHub Pages
pages: write
uses: nRF24/.github/.github/workflows/deploy_docs.yaml@main
secrets: inherit
17 changes: 8 additions & 9 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@
version: 2

build:
os: "ubuntu-22.04"
apt_packages:
- libclang1-12
- libclang-cpp12
os: "ubuntu-24.04"
# apt_packages:
# - libclang1-12
# - libclang-cpp12
tools:
python: "3"
commands:
# Install doxygen from source distributions (conda forge does not keep up-to-date doxygen releases)
- >
DOXYGEN_VERSION="1.13.2" &&
DOXYGEN_VERSION="1.15.0" &&
RELEASE_TITLE=$(echo ${DOXYGEN_VERSION} | tr '.' '_') &&
mkdir .doxygen && cd .doxygen &&
echo $(pwd) &&
echo "https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz" &&
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz &&
curl -L "https://github.com/doxygen/doxygen/releases/download/Release_${RELEASE_TITLE}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" --output doxygen.tar.gz &&
gunzip doxygen.tar.gz &&
tar xf doxygen.tar &&
mv doxygen-$DOXYGEN_VERSION/bin/doxygen ./
mv doxygen-${DOXYGEN_VERSION}/bin/doxygen ./
# get lib version & overwrite Doxyfile values
- python3 .github/doxygen.py
# run doxygen
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Project related configuration options
#---------------------------------------------------------------------------

PROJECT_ICON = favicon.ico
PROJECT_ICON = images/favicon.ico

# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
# double-quotes, unless you are using Doxywizard) that should identify the
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Please browse the docs from http://nrf24.github.io/RF24Gateway
# Please browse the docs from <http://nrf24.github.io/RF24Gateway>

## Intended for use in Doxygen

Expand Down
File renamed without changes.
49 changes: 29 additions & 20 deletions docs/main_page.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,47 @@ Introducing **RF24Network, RF24Mesh & RF24Gateway v2.0** with some *significant
in order to support a range of ESB enabled radios, most recently NRF52x radios.

**Important Notes:**

- Any network layer that uses v2 needs to have RF24Network/RF24Mesh dependencies of v2 or newer. RF24 v1.x is an exception here.
- General usage should remain backward compatible, see the included examples of the related libraries for more info
- Any third party libs that extend the network/mesh layer may also need to be updated to incorporate the new templated class prototypes:
```cpp
template<class radio_t>
class ESBNetwork;

template<class network_t, class radio_t>
class ESBMesh;
```

```cpp
template<class radio_t>
class ESBNetwork;

template<class network_t, class radio_t>
class ESBMesh;
```

- Third party libs should also be able to use the backward-compatible typedef in their template:
- ESBGateway.h:
```cpp
template<typename network_t, typename mesh_t>
class ESBGateway
```

```cpp
template<typename network_t, typename mesh_t>
class ESBGateway
```

and inform the compiler what types they intend to support:
- ESBGateway.cpp:
```cpp
template class ESBGateway<RF24Network, RF24Mesh>;
```

```cpp
template class ESBGateway<RF24Network, RF24Mesh>;
```

- The auto installers do not perform a version check like package managers, so having the correct versions of the software is important.
- We *will* be maintaining the v1.x versions with bugfixes etc for those who cannot or do not wish to migrate to the newer template approach.

## Installation

See http://nRF24.github.io/RF24 for installation instructions using the installer, or clone the RF24 libs and run 'make install' for each one.
See <http://nRF24.github.io/RF24> for installation instructions using the installer, or clone the RF24 libs and run 'make install' for each one.

After running the installer, RF24Gateway will be installed at rf24libs/RF24Gateway. [**Examples**](examples.html) are included for operating the gateway
as well as client scripts & programs to control nodes via http requests.

Note: RF24Gateway is tested with and defaults to using RF24Mesh. Sensor nodes must also use RF24Mesh or be statically assigned within RF24Mesh.

See http://nRF24.github.io/RF24Ethernet/ for related documentation for use with RF24Gateway.
See <http://nRF24.github.io/RF24Ethernet/> for related documentation for use with RF24Gateway.

## How It Works

Expand Down Expand Up @@ -90,9 +97,10 @@ To maximize throughput between Raspberry Pi or other Linux devices, run the foll
sudo sysctl net.ipv4.tcp_wmem="1500 1500 1500"
sudo sysctl net.ipv4.tcp_rmem="1500 1500 1500"
```

These changes are only temporary and need to be run each time after reboot of the operating system. To make them permanent, edit `/etc/sysctl.conf`

See http://nRF24.github.io/RF24Ethernet/ConfigAndSetup.html for more info
See <http://nRF24.github.io/RF24Ethernet/ConfigAndSetup.html> for more info

## Advanced Configuration

Expand All @@ -113,7 +121,8 @@ To fully enable routing beyond the RPi devices, a routing table needs to be adde

## Network Configuration Example

Local WiFi/Ethernet Network (Windows,Linux,RPi devices etc) - 10.10.1.0 - 255.255.255.0 ( 10.10.1.x network ) <br>
Local WiFi/Ethernet Network (Windows,Linux,RPi devices etc) - 10.10.1.0 - 255.255.255.0 ( 10.10.1.x network )

RPi devices (tun_nrf24 interfaces & all connected devices) - 10.1.0.0 - 255.255.0.0 ( 10.1.x.x network )

### Explanation
Expand Down Expand Up @@ -182,6 +191,6 @@ Examples are:
0.0.0.0 0.0.0.0 10.10.3.32
```

# Example: create TCP/IP link between two Raspberry Pi
## Example: create TCP/IP link between two Raspberry Pi

This example demonstrates how a tcpip link could be created between two RPIs: [Example LINK](md_docs_2rpi__tcpip__link.html)
This example demonstrates how a TCP/IP link could be created between two RPIs: [Example LINK](rpi_tcpip_link.md)
Loading