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
156 changes: 152 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,32 @@ rpassword = "7"

# Testing
tempfile = "3"

# Mesh networking — serial
tokio-serial = { version = "5.4.5", default-features = false }
tokio-util = { version = "0.7.18", features = ["codec"] }
bytes = "1"

# Mesh networking — BLE
btleplug = "0.12.0"
uuid = { version = "1", features = ["v4"] }

# Mesh networking — protobuf
prost = "0.14.3"
prost-types = "0.14.3"

# Mesh networking — crypto (pin exact: pre-release)
aes = "=0.9.0-rc.4"
ctr = "=0.10.0-rc.4"
x25519-dalek = { version = "2.0.1", features = ["static_secrets"] }

# Mesh networking — graph
petgraph = { version = "0.8.3", features = ["serde-1"] }

# Mesh networking — discovery
mdns-sd = "0.18.2"
rusb = "0.9.4"

# Testing
proptest = "1"
nix = { version = "0.31.2", features = ["pty"] }
27 changes: 27 additions & 0 deletions crates/kerykeion/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "kerykeion"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "Meshtastic mesh networking integration for Akroasis"

[lints]
workspace = true

[dependencies]
koinon = { path = "../koinon" }
serde = { workspace = true }
snafu = { workspace = true }
tracing = { workspace = true }
tokio = { workspace = true, features = ["sync", "time", "macros"] }
jiff = { workspace = true }
toml = { workspace = true }
prost = { workspace = true }

[build-dependencies]
prost-build = "0.14.3"

[dev-dependencies]
tokio = { workspace = true, features = ["test-util", "rt-multi-thread", "macros"] }
proptest = { workspace = true }
26 changes: 26 additions & 0 deletions crates/kerykeion/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//! Build script for kerykeion: compiles Meshtastic protobuf definitions via prost-build.

fn main() -> Result<(), Box<dyn std::error::Error>> {
let proto_dir = "proto";
let protos = [
"proto/meshtastic/portnums.proto",
"proto/meshtastic/telemetry.proto",
"proto/meshtastic/channel.proto",
"proto/meshtastic/config.proto",
"proto/meshtastic/module_config.proto",
"proto/meshtastic/mesh.proto",
"proto/meshtastic/admin.proto",
"proto/meshtastic/storeforward.proto",
];

prost_build::Config::new()
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
.compile_protos(&protos, &[proto_dir])?;

for proto in &protos {
println!("cargo:rerun-if-changed={proto}");
}
println!("cargo:rerun-if-changed=build.rs");

Ok(())
}
38 changes: 38 additions & 0 deletions crates/kerykeion/proto/meshtastic/admin.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
syntax = "proto3";
package meshtastic;

import "meshtastic/mesh.proto";
import "meshtastic/channel.proto";
import "meshtastic/config.proto";
import "meshtastic/module_config.proto";

// Administrative message for device configuration.
message AdminMessage {
oneof payload_variant {
string get_channel_request = 1;
Channel get_channel_response = 2;
string get_owner_request = 3;
User get_owner_response = 4;
Config get_config_response = 6;
ModuleConfig get_module_config_response = 8;
bool get_radio_request = 10;
bool factory_reset_device = 11;
bool exit_simulator = 12;
string note_data_received = 14;
bool reboot_ota_seconds = 16;
bool get_device_metadata_request = 17;
bool reboot_seconds = 18;
bool shutdown_seconds = 19;
Channel set_channel = 20;
Config set_config = 21;
ModuleConfig set_module_config = 22;
User set_owner = 23;
bool remove_by_nodenum = 24;
bool set_favorite_node = 25;
bool remove_favorite_node = 26;
bool set_fixed_position = 27;
bool remove_fixed_position = 28;
bool begin_edit_settings = 29;
bool commit_edit_settings = 30;
}
}
Loading
Loading