Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakeler/bms-parser
Binary protocol parser for the smart BMS from LTT Power
https://github.com/jakeler/bms-parser
Last synced: about 1 month ago
JSON representation
Binary protocol parser for the smart BMS from LTT Power
- Host: GitHub
- URL: https://github.com/jakeler/bms-parser
- Owner: Jakeler
- Created: 2019-12-07T17:34:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-18T13:21:02.000Z (about 2 years ago)
- Last Synced: 2024-06-12T17:56:03.969Z (7 months ago)
- Language: Python
- Homepage:
- Size: 395 KB
- Stars: 47
- Watchers: 2
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BMS parser
Definitions for the generic smart battery managment system protocol.
It is written with [Kaitai Struct](https://kaitai.io/), which can used to export parsers in different languages, some examples are in `py` for Python. `main.py` allows logging to a file or MongoDB instance, see the parameters.`py/tui` contains a terminal based UI:
![overview TUI animated](tui.gif)It depends on `rich`, `pyserial` and `kaitaistruct` (runtime) module.
All of them can be installed with `pip install -r py/requirements.txt`, then it can be launched with:
```
python -m py.tui.main /path/to/tty
```### Non Python Parsing
For other languages you can use the compiler, for example:
```terminal
$ cd kaitai
$ kaitai-struct-compiler -t java battery_management_system_protocol.ksy
```
(Options for -t: graphviz, csharp, rust, all, perl, java, go, cpp_stl, php, lua, python, nim, html, ruby, construct, javascript)`dumps` contains DSView logic analyzer captures of the protocol. In `decoder/bms` includes a protocol decoder for DSView or sigrok Pulseview, you can try it out with the captures.
Read more about the protocol: https://blog.ja-ke.tech/2020/02/07/ltt-power-bms-chinese-protocol.html