syssi / esphome-jk-bms

ESPHome component to monitor and control a Jikong Battery Management System (JK-BMS) via UART-TTL or BLE
Apache License 2.0
403 stars 134 forks source link

Could someone explain this BLE file to me? #496

Open Djent- opened 2 months ago

Djent- commented 2 months ago

Hi, I came across this repository by searching for 8 bytes that happen to appear in the referenced file contained in this repo: https://github.com/syssi/esphome-jk-bms/blob/b40d3ee6bc4572b9e38cc20fd078f7f94219b703/docs/pdus/JK-B2A8S20P-11.17-BLE-JK02_32S.transposed.txt#L6

From what I understand, this is a rotated version of the corresponding non-transposed file, but beyond that I don't know what I'm looking at. Could someone please explain the source of these data captures and what analysis was being performed?

The bytes I was originally interested in were 858f99a3adb7c1cb which appear in a file I'm dissecting. These bytes are interesting because they increase by 10 in decimal each byte. If the BLE data in that transposed file is indeed vertical, it would then seem that some value in the BLE packet is incrementing by 10 (decimal) each packet

syssi commented 2 months ago

Correct. Byte 5 is something like a frame counter: https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms_ble/jk_bms_ble.cpp#L361

What exactly are you looking for?