-
-
Notifications
You must be signed in to change notification settings - Fork 258
Update protocol-design-ble.md #679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
docs/protocol-design-ble.md
Outdated
| | 226-227 | 2 | Temperature Sensor 3 | int16 | 0.1 | °C | - | | ||
| | 186-187 | 2 | Emergency time countdown | uint16 | 1 | s | >0 = Emergency active | | ||
| | 70-73 | 4 | Enabled cells bitmask | Raw | - | - | 0xFF 0xFF 0xFF 0xFF = 32 cells | | ||
| | 74-137 | 64 | Cell resistances 1-32 | uint16 | 0.001 | Ohm | 2 bytes per cell | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | 74-137 | 64 | Cell resistances 1-32 | uint16 | 0.001 | Ohm | 2 bytes per cell | | |
| | 80-143 | 64 | Cell resistances 1-32 | uint16 | 0.001 | Ohm | 2 bytes per cell | |
# i=0...31
float cell_resistance = (float) jk_get_16bit(i * 2 + 64 + 16) * 0.001f;
docs/protocol-design-ble.md
Outdated
| | 186-187 | 2 | Emergency time countdown | uint16 | 1 | s | >0 = Emergency active | | ||
| | 70-73 | 4 | Enabled cells bitmask | Raw | - | - | 0xFF 0xFF 0xFF 0xFF = 32 cells | | ||
| | 74-137 | 64 | Cell resistances 1-32 | uint16 | 0.001 | Ohm | 2 bytes per cell | | ||
| | 138-139 | 2 | Power tube temperature | int16 | 0.1 | °C | - | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | 138-139 | 2 | Power tube temperature | int16 | 0.1 | °C | - | | |
| | 144-145 | 2 | Power tube temperature | int16 | 0.1 | °C | - | |
this->publish_state_(this->power_tube_temperature_sensor_, (float) ((int16_t) jk_get_16bit(112 + 32)) * 0.1f);
docs/protocol-design-ble.md
Outdated
| | 140-143 | 4 | Wire resistance warning bitmask | Raw | - | - | 1 bit per cell/wire | | ||
| | 144-147 | 4 | Battery voltage | uint32 | 0.001 | V | - | | ||
| | 148-151 | 4 | Battery power | uint32 | 0.001 | W | - | | ||
| | 152-155 | 4 | Charge current | int32 | 0.001 | A | - | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | 152-155 | 4 | Charge current | int32 | 0.001 | A | - | | |
| | 158-161 | 4 | Charge current | int32 | 0.001 | A | - | |
this->publish_state_(this->current_sensor_, (float) ((int32_t) jk_get_32bit(126 + 32)) * 0.001f);
|
Your interpretation of the cell info frame (protocol version |
|
I don't understand why these indices don't work for me, but if you just add +32, it works for me. For example: |
|
Which hardware/software version do you own? |
|
JK_BD6A20S6P, hw 17U, sw 17.02 |
|
Hmm... there is the risk the payload has changed a bit between V11 and V17. Could you provide a cell info frame per hardware version? |
|
Yes, I will provide it a little later. However, the parsing shows identical data on all versions |
|
JK_BD6A20S6P, hw 17U, sw 17.02: JK_BD6A17S6P, hw 11.XA, sw 11.48: |
|
I also have a small question: why can devices send Setting Info even when I haven't sent a command to receive it? Can you tell me why? |
|
I don't know. This project isn't affected by the mentioned issue. |
|
And how do you deal with the fact that you get Setting Info & Cell info at the same time, the device will beep whenever I ask for both, which is quite uncomfortable? |
In my opinion, the bytes should have been in this order, given their length. Is that right?