| Crates.io | blackboxer |
| lib.rs | blackboxer |
| version | 0.1.4 |
| created_at | 2025-06-06 15:21:11.107188+00 |
| updated_at | 2025-06-18 04:48:22.574571+00 |
| description | A Rust library for capturing, logging, and replaying MAVLink messages |
| homepage | |
| repository | https://github.com/Vivek2518/Blackbox-rs |
| max_upload_size | |
| id | 1703187 |
| size | 77,595 |
A Rust library and set of tools for capturing, logging, and replaying MAVLink messages, designed for drone applications. This project allows you to log MAVLink messages to a custom .bbin file format and replay them over TCP, with options for filtering and real-time playback.
Capture: Connects to a MAVLink endpoint and logs messages to a .bbin file.
Read: Parses and displays logged messages from .bbin files.
Replay: Replays logged messages to a TCP target, with optional filtering and speed control.
Configurable: Supports armed-only logging and custom connection addresses.
Efficient: Uses bincode for serialization and a custom binary format for logs.
Ensure you have Rust installed.
Add the library to your project:
cargo add blackboxer
Or, include in your Cargo.toml:
[dependencies]
blackboxer = "0.1.4"
For binaries, clone the repository and build:git clone https://github.com/Vivek2518/Blackbox-rs.git
cd Blackbox-rs
cargo build --release
Rust (edition 2021)
mavlink crate (v0.11)
chrono (v0.4)
serde (v1.0, with derive feature)
bincode (v1.3)
Captures MAVLink messages from a TCP endpoint and logs them to a .bbin file.
cargo run --bin mavlink-capture -- [ADDRESS] [--armed-only]
Reads and displays messages from a .bbin file.
cargo run --bin read-bbin -- <FILE> [--show] [--filter=MSG_TYPE]
Replays messages from a .bbin file to a TCP target.
cargo run --bin replay-bbin -- <FILE> <TCP_TARGET> [--filter=MSG_TYPE] [--realtime] [--speed=VALUE]
Reads and collect data from a .bbin file for displaying data to User Interface.
cargo run --bin read-collect -- <FILE> [-- filter=MSG_TYPE]
Use the library in your Rust code to integrate MAVLink logging:
use blackboxer::{BlackBoxer, BlackBoxerConfig};
use std::io;
fn main() -> io::Result<()> {
let config = BlackBoxerConfig {
armed_only: true,
addr: "127.0.0.1:14552".to_string(),
};
let mut blackboxer = BlackBoxer::new(config)?;
blackboxer.capture_messages()?;
Ok(())
}
src/lib.rs: Core library with BlackBoxer and BbinWriter for logging.
src/bin/main.rs: Binary for capturing messages (Through CLI).
src/bin/read_bbin.rs: Binary for reading logs (Through CLI).
src/bin/replay_bbin.rs: Binary for replaying logs (Through CLI).
src/bin/read_collect.rs:Binary for display data for UI.
This project is licensed under the GNU General Public License v3 (GPL-3.0). Derivative works must be open-sourced under GPL-3.0. See the LICENSE file for details. Contributing
Fork the repo at https://github.com/Vivek2518/Blackbox-rs. Submit issues or pull requests for bugs, features, or improvements via GitHub.
If you find this project useful, consider supporting development:
Feel free to reach out
Author: Vivek Patwari Email: vivekpatwari38@gmail.com Repository: https://github.com/Vivek2518/Blackbox-rs