リポジトリ

bleRPCは、メインのモノレポと、対応する各言語向けのプロトコルライブラリパッケージで構成されています。

リポジトリの関係

共有された単一の .proto 定義をもとに、言語ごとのプロトコルライブラリが提供され、各セントラルアプリとファームウェアから利用されます。

blerpc.proto
共有 Protocol Buffers 定義
per language

アーキテクチャ概要

tdaira/blerpc

ファームウェア、セントラルクライアント、コードジェネレーター、テストを含むメインのモノレポ。

peripheral_fw/Zephyrペリフェラルファームウェア (C) — nRF54L15 & EFR32xG22EC
peripheral_py/ロールリバーサルテスト用Pythonペリフェラル (bless)Python
central_py/Pythonセントラルクライアント (bleak) + 統合テストPython
central_fw/デバイス間通信用Zephyrセントラルファームウェア (C)C
central_android/Androidセントラルアプリ (Kotlin)、テストランナー付きKotlin
central_ios/iOSセントラルアプリ (Swift)、テストランナー付きSwift
central_flutter/Flutterセントラルアプリ (Dart)、テストランナー付きDart
central_rn/React Nativeセントラルアプリ (TypeScript)、テストランナー付きTypeScript
proto/Protocol Buffers定義(blerpc.proto
tools/generate-handlers/コードジェネレーター (Go) — 全言語のハンドラーとクライアントを生成Go
boards/カスタムボード定義 (EFR32xG22E)
docs/追加ドキュメント(ファームウェアガイド)

プロトコルライブラリ

各言語向けに個別パッケージとして公開されている、プラットフォーム非依存のプロトコルエンコーディング/デコーディングライブラリです。

blerpc-protocol

Python C

コンテナの分割/再組み立て、コマンドのエンコーディング/デコーディング、E2E暗号化(鍵交換 + AES-128-GCM)。Pythonパッケージはpipでインストール可能です。C実装(c/src/ + c/include/)は組み込み用

pip install git+https://github.com/tdaira/blerpc-protocol.git

blerpc-protocol-swift

Swift

iOSおよびmacOS向けSwift Package。Foundation と CryptoKit(Appleプラットフォームフレームワーク)を使用。iOS 16以上、macOS 13以上をサポート

// Swift Package Manager
.package(url: "https://github.com/tdaira/blerpc-protocol-swift", from: "0.7.0")

blerpc-protocol-kt

Kotlin

Android向けKotlinライブラリ。GitHub Packages (Maven)で公開

implementation("com.blerpc:blerpc-protocol-kt:0.7.0")

blerpc-protocol-dart

Dart

Flutter向けPure Dartライブラリ。pub.devで公開。暗号化にはcryptographyパッケージを使用

blerpc_protocol: ^0.7.0

blerpc-protocol-rn

TypeScript

React Native向けTypeScriptライブラリ。暗号化には@noble/ciphers@noble/curves@noble/hashesを使用(純粋なJS、ネイティブ依存なし)

"@blerpc/protocol-rn": "github:tdaira/blerpc-protocol-rn"

CI / CD

各リポジトリには GitHub Actions CI があります:

リポジトリCIチェック
blerpcPythonテスト + ruff lint、C lint (clang-format)、Go lint + build、iOSビルド、Androidビルド、Flutterビルド、React Nativeビルド
blerpc-protocolPythonテスト + lint、C lint + テスト
blerpc-protocol-swiftswift build、swift test、SwiftLint
blerpc-protocol-ktGradle test、ktlint
blerpc-protocol-dartdart analyze、dart test、pub.devへの自動公開
blerpc-protocol-rneslint、prettier check、jest test、npm publish

ライセンス

すべての bleRPC リポジトリは Apache License 2.0 でライセンスされており、組み込みファームウェアを含め、オープンソース・クローズドソースを問わず自由に利用できます。