Crates.io | batteread |
lib.rs | batteread |
version | |
source | src |
created_at | 2024-10-18 20:45:36.187053 |
updated_at | 2024-10-18 20:45:36.187053 |
description | Read status data from certain models of LiFePO4 Battery Management Systems over Bluetooth Low Energy. Tested with a battery made by li-gen.net. |
homepage | |
repository | https://github.com/felixwatts/batteread |
max_upload_size | |
id | 1414818 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Read status data from certain models of LiFePO4 Battery Management Systems over Bluetooth Low Energy
Tested with a 400ah 24v battery manufactured by https://www.li-gen.net/ and sold around the year 2022.
The BMS has a BLE interface. On top of that the NordicUART protocol is used for serial communication. On top of that there seems to be a proprietary request-response protocol which I have attempted to partially reverse engineer.
Currently the following data can be accessed:
# use std::time::Duration;
#
# #[tokio::main]
# pub async fn main(){
let mut battery_client = batteread::BatteryClient::new_default_name().await.unwrap();
loop {
let battery_state = battery_client.fetch_state().await.unwrap();
println!("{battery_state:?}");
tokio::time::sleep(Duration::from_secs(5)).await;
}
# }