-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Add EZMesh controller and library. 2. Remove cpcd and cpc library. [Integrate] 1. Add systmed for debian. [SDK] 1. Modify build flow. 2. Modify systemd service.
- Loading branch information
rex
authored and
rex
committed
Jan 24, 2024
1 parent
5cf6817
commit 01d79cf
Showing
198 changed files
with
8,526 additions
and
11,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") | ||
cmake_minimum_required(VERSION 3.10) | ||
include(project.conf) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") | ||
include(extension) | ||
include(banner) | ||
include(default) | ||
include(project) | ||
set(PROJECT_VER "") | ||
get_git_hash(PROJECT_VER) | ||
message("Current project git information: ${PROJECT_VER}") | ||
|
||
project(RAFAEL_HOST_SDK LANGUAGES C CXX) | ||
add_subdirectory(module) | ||
ext_add_subdirectory(module) | ||
ext_add_subdirectory_ifdef(CONFIG_GEN_SYSTEM integrate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,48 @@ | ||
# EZMesh | ||
## Introduction | ||
The EZMesh Project is the Host Daemon of Rafael's CPC Dongle (Rafael Multi-protocol RCP). The EZMesh, which use a single Rafael's CPC Dongle, can support Host OS using different communication protocol at the same time. The EZMesh currently supports Bluetooth, Thread, and Matter | ||
The EZMesh Project is the Host Daemon of Rafael's EZmesh Dongle (Rafael Multi-protocol RCP). The EZMesh, which uses a single Rafael's EZmesh Dongle, can support the Host OS using different communication protocols simultaneously. | ||
|
||
The EZMesh Project is supported by [Rafael Micro](https://www.rafaelmicro.com/). | ||
The EZMesh currently supports: | ||
- **Bluetooth** | ||
- **Sub-G** | ||
- **Thread** | ||
- **Matter** | ||
- **Zigbee** | ||
|
||
Recommend Platform: | ||
- Ubuntu 22.04.3 LTS (Ubuntu-based) | ||
- Raspberry Pi OS (Legacy) Lite (Debian-based) | ||
- Release date: December 5th 2023 | ||
- System: 64-bit | ||
- Kernel version: 6.1 | ||
- Debian version: 11 (bullseye) | ||
|
||
**The EZMesh Project is supported by [Rafael Micro](https://www.rafaelmicro.com/).** | ||
|
||
--- | ||
## Prepare Env | ||
``` | ||
$ sudo apt update \ | ||
&& sudo apt install git mosquitto libsystemd-dev net-tools curl | ||
$ sudo apt update && sudo apt install git mosquitto libsystemd-dev net-tools curl gcc | ||
``` | ||
--- | ||
## Project setup and pre-install | ||
### clone EZMesh | ||
### Clone EZMesh | ||
``` | ||
$ [email protected]:RafaelMicro/EZMesh.git | ||
$ git clone git@github.com:RafaelMicro/EZMesh.git | ||
``` | ||
### Install Cmake | ||
- Ubuntu based platfrom | ||
- Ubuntu-based platform | ||
``` | ||
$ sudo curl -L https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6-linux-x86_64.sh --output /tmp/cmake-3.21.6-linux-x86_64.sh \ | ||
&& sudo chmod +x /tmp/cmake*.sh \ | ||
&& sudo /tmp/cmake*.sh --prefix=/usr/local --skip-license \ | ||
&& sudo rm /tmp/cmake* | ||
&& sudo chmod +x /tmp/cmake*.sh && sudo /tmp/cmake*.sh --prefix=/usr/local --skip-license && sudo rm /tmp/cmake* | ||
``` | ||
- Debian based platfrom | ||
- Debian-based platform | ||
``` | ||
$ sudo curl -L https://github.com/Kitware/CMake/releases/download/v3.21.6/cmake-3.21.6-linux-aarch64.sh --output /tmp/cmake-3.21.6-linux-aarch64.sh \ | ||
&& sudo chmod +x /tmp/cmake*.sh \ | ||
&& sudo /tmp/cmake*.sh --prefix=/usr/local --skip-license \ | ||
&& sudo rm /tmp/cmake* | ||
&& sudo chmod +x /tmp/cmake*.sh && sudo /tmp/cmake*.sh --prefix=/usr/local --skip-license && sudo rm /tmp/cmake* | ||
``` | ||
### Bluetooth pre-install | ||
Rafael's EZMesh bluetooth based on Bluez, so makesure Bluez already in your Host. | ||
Rafael's EZMesh Bluetooth is based on Bluez, so make sure Bluez is already in your Host. | ||
### Border Router pre-install | ||
``` | ||
$ sudo NAT64=1 module/border_router/ot-br-posix/script/bootstrap | ||
|
@@ -46,39 +56,35 @@ $ ifconfig | |
``` | ||
- Build project (example network interface is enp0s3) | ||
``` | ||
$ mkdir build && cd build \ | ||
&& cmake ../ -DOTBR_INFRA_IF_NAME=enp0s3 && sudo make install && sudo ldconfig\ | ||
&& cd .. | ||
$ mkdir build && cd build && cmake ../ -DOTBR_INFRA_IF_NAME=enp0s3 \ | ||
&& sudo make install && sudo ldconfig && cd .. | ||
``` | ||
|
||
--- | ||
## Apply Project to system service | ||
### Apply CPC | ||
### Apply EZmesh controller | ||
``` | ||
export cpc_path=build/module/cpc/cpcd-system/debconf \ | ||
&& sudo bash $cpc_path/prerm && sudo bash $cpc_path/postrm && sudo bash $cpc_path/postinst | ||
$ sudo ./build/integrate/debian/controller/setup | ||
``` | ||
### Apply Border Router | ||
``` | ||
export br=build/module/border_router/cpc-otbr/debconf \ | ||
&& sudo bash $br/prerm && sudo bash $br/postinst | ||
$ sudo ./build/integrate/debian/border_router/setup | ||
``` | ||
### Apply Bluetooth | ||
|
||
``` | ||
export bt=build/module/bluetooth/cpc-bluetooth/debconf \ | ||
&& sudo bash $bt/prerm && sudo bash $bt/postinst | ||
$ sudo ./build/integrate/debian/bluetooth/setup | ||
``` | ||
- Note: Please makesure you RCP dongle already attach on boot | ||
- Note: All service will auto setup on boot | ||
- Note: Please make sure your RCP dongle is already attached to the boot | ||
- Note: All services will auto setup on boot | ||
|
||
--- | ||
## Manage system service | ||
### Start all service | ||
``` | ||
$ sudo systemctl start cpc-mgmt.service | ||
$ sudo systemctl start ez-mgmt.service | ||
``` | ||
### Restart all service | ||
``` | ||
$ sudo systemctl restart cpc-mgmt.service | ||
$ sudo systemctl restart ez-mgmt.service | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
function(show_banner var) | ||
message("") | ||
message("") | ||
message(" 8888888888 8888888888P 888b d888 888 .d8888b. 8888888b. 888 d8P ") | ||
message(" 888 d88P 8888b d8888 888 d88P Y88b 888 \"Y88b 888 d8P ") | ||
message(" 888 d88P 88888b.d88888 888 Y88b. 888 888 888 d8P ") | ||
message(" 888888888 d88P 888Y88888P888 .d88b. .d8888b 88888b. \"Y888b. 888 888 888d88K ") | ||
message(" 888 d88P 888 Y888P 888 d8P Y8b 88K 888 \"88b \"Y88b. 888 888 8888888b ") | ||
message(" 888 d88P 888 Y8P 888 88888888 \"Y8888b. 888 888 Y88b \"888 888 888 888 Y88b ") | ||
message(" 888 d88P 888 \" 888 Y8b. X88 888 888 Y8888888P 88888888P\" 888 Y88b ") | ||
message(" 8888888888 d8888888888 888 888 \"Y8888 88888P' 888 888 v${var} Powered By Rafael Micro ") | ||
message("") | ||
message("") | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
ext_config_ifndef(CONFIG_CONTROLLER true) | ||
ext_config_ifndef(CONFIG_UPGRADE true) | ||
ext_config_ifndef(CONFIG_BLUETOOTH false) | ||
ext_config_ifndef(CONFIG_BORDER_ROUTER false) | ||
ext_config_ifndef(CONFIG_ZIGBEE_GW_SERVICE false) | ||
ext_config_ifndef(CONFIG_SUBG_SERVICE false) | ||
|
||
ext_config_ifndef(CONFIG_GEN_SYSTEM false) | ||
ext_config_ifndef(CONFIG_PLATEFROM "") | ||
|
||
ext_config_ifndef(EZMESHD_VER "1.0.0") | ||
ext_config_ifndef(EZMESHD_LIB "1") | ||
ext_config_ifndef(EZMESHD_POTOCOL "3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Find the Silicon Labs EZMESH location | ||
# ============================================================================= | ||
# Usage of this module is as follows: | ||
# | ||
# find_package(EZMESH) | ||
# | ||
# cmake-format: off | ||
# Variables used by this module: | ||
# | ||
# Variables defined by this module: | ||
# * EZMESH_FOUND - True if the EZMESH sources are found. | ||
# cmake-format: on | ||
# ============================================================================= | ||
if(EZMESH_LOCATION) | ||
set(FETCHCONTENT_SOURCE_DIR_EZMESH CMAKE_SOURCE_DIR "${EZMESH_LOCATION}") | ||
message(STATUS "Found EZMESH at ${EZMESH_LOCATION}") | ||
elseif(DEFINED ENV{EZMESH_LOCATION}) | ||
set(FETCHCONTENT_SOURCE_DIR_EZMESH "$ENV{EZMESH_LOCATION}") | ||
message(STATUS "EZMESH - using provided EZMESH_LOCATION ($ENV{EZMESH_LOCATION})") | ||
else() | ||
if(NOT FETCH_EZMESH_VERSION) | ||
# The version to fetch should ideally be the same as the version used for fetching GeckoSDK | ||
set(FETCH_EZMESH_VERSION "v4.2.0") | ||
endif() | ||
message(STATUS "Fetching EZMESH ${FETCH_EZMESH_VERSION} from public repository") | ||
endif() | ||
|
||
# Find the version of EZMESH | ||
file( | ||
STRINGS ${EZMESH_SOURCE_DIR}/CMakeLists.txt _ver_line | ||
REGEX "^ +VERSION \"([^\"]*)\"" | ||
LIMIT_COUNT 1) | ||
string(REGEX MATCHALL "[0-9\.]+" EZMESH_VERSION "${_ver_line}") | ||
message(STATUS "EZMESH version ${EZMESH_VERSION}") | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args( | ||
EZMESH | ||
REQUIRED_VARS EZMESH_VERSION | ||
VERSION_VAR EZMESH_VERSION) |
Oops, something went wrong.