diy solar

diy solar

JK BMS UART Protocol -reply frame to "Read all the data" command

ScanLabs

New Member
Joined
Nov 11, 2023
Messages
4
Location
Italy
Hello folk !
I'm extending a Wifi logger I've built for Daly BMS to JK-BMS .
From an hw point of view my logger (dalybmswifi.com) for daly is fully compatible with JK , c libraries written BUT I miss of a JK BMS that's why I'm unable to test it .
There's anyone able to get a full reply frame from JK-BMS after having issued the following command to the GPS port ( 115200,8,N,1 ) ?
This is the command to ask for all the BMS info:
0x4E, 0x57 , 0x00, 0x13 , 0x00, 0x00,0x00, 0x00, 0x06,0x03, 0x00 ,0x00, 0x00, 0x00, 0x00,0x00, 0x68,0x00, 0x00, 0x01, 0x29
4E5700130000000006030000000000006800000129

Any support is welcome .

Thanks,
paolo
 
cool shvm !!!!

following your suggestion I found a reply frame under the test folder. I report it here for guys in the future who wants to enjoy :

4E57011B00000000060001792A010EED020EFA030EF7040EEC050EF8060EFA070EF1080EF8090EE30A0EFA0B0EF10C0EFB0D0EFB0E0EF280001D81001E82001C8314EF8480D0850F860287000489000000008A000E8B00008C00078E16268F10AE900FD2910FA0920005930BEA940C1C95000596012C9700079800039900059A00059B0CE49C00089D019E005A9F0046A00064A10064A20014A30046A40046A5FFECA6FFF6A7FFECA8FFF6A90EAA0000000EAB01AC01AD0411AE01AF01B0000AB114B231323334353600000000B300B4496E707574205573B532313031B60000E200B748362E585F5F53362E312E33535F5FB800B900000000BA425433303732303230313230303030323030353231303031C0010000000068000054D1

This is a complete reply JK-BMS frame well interpreted by my library .

Cooooool Thanks !

on th image this is what I did with daly very soon availble for JK as well :)
 

Attachments

  • batteries 24-12-2023.jpg
    batteries 24-12-2023.jpg
    76.8 KB · Views: 18
Last edited:
How come you haven't come across this?


I'm already using an ESP32 serving a web page for my JK-BMS as I speak.
I used syssi component for long time and the issue occurred today when have a jkbms with software version 11.42 and nothing in return with the read all command "4E5700130000000006030000000000006800000129" but time out log.
This also reported with version 11.36 and 11.28. I think JK have changed their protocol!
Can you advise with thanks!
 
I used syssi component for long time and the issue occurred today when have a jkbms with software version 11.42 and nothing in return with the read all command "4E5700130000000006030000000000006800000129" but time out log.
This also reported with version 11.36 and 11.28. I think JK have changed their protocol!
Can you advise with thanks!
Due to unstability, the repository was recently updated to use separate protocols for newer BMS with HW version >= 11.

Try making these changes

YAML:
substitutions:
  name: jk-bms
  device_description: "Monitor and control a JK-BMS via bluetooth"
  external_components_source: github://syssi/esphome-jk-bms@main
  mac_address: C8:47:8C:E1:E2:E1
  # Please use "JK02_24S" if you own a old JK-BMS < hardware version 11.0 (hardware version >= 6.0 and < 11.0)
  # Please use "JK02_32S" if you own a new JK-BMS >= hardware version 11.0 (f.e. JK-B2A8S20P hw 11.XW, sw 11.26)
  # Please use "JK04" if you have some old JK-BMS <= hardware version 3.0 (f.e. JK-B2A16S hw 3.0, sw. 3.3.0)
  protocol_version: JK02_24S
 
Due to unstability, the repository was recently updated to use separate protocols for newer BMS with HW version >= 11.

Try making these changes

YAML:
substitutions:
  name: jk-bms
  device_description: "Monitor and control a JK-BMS via bluetooth"
  external_components_source: github://syssi/esphome-jk-bms@main
  mac_address: C8:47:8C:E1:E2:E1
  # Please use "JK02_24S" if you own a old JK-BMS < hardware version 11.0 (hardware version >= 6.0 and < 11.0)
  # Please use "JK02_32S" if you own a new JK-BMS >= hardware version 11.0 (f.e. JK-B2A8S20P hw 11.XW, sw 11.26)
  # Please use "JK04" if you have some old JK-BMS <= hardware version 3.0 (f.e. JK-B2A16S hw 3.0, sw. 3.3.0)
  protocol_version: JK02_24S
Hi, thanks for your response.
Sorry for providing lack of information, I connected my Esp32S2 Lolin with JK via UART-TTL (using the gps port connect TX/RX directly to my ESP board). This type of connnection worked well with JKBMS with software version sold before November 2023 (~ prior to 11.28)
I also tried with protocol (both 24S and 32S but nothing worked.
 
You don't need to specify any protocol for UART-TTL

Try swapping the pins whether in board or in YAML substitutions and see if it solves anything.
Diagnosing whether UART works or not should be your primary point of attack.
 
You don't need to specify any protocol for UART-TTL

Try swapping the pins whether in board or in YAML substitutions and see if it solves anything.
Diagnosing whether UART works or not should be your primary point of attack.
I did swapping the pin and it just dont work! I make a PCB ready and that PCB with JST 1.25 mm worked on previous JKBMS. However, I did change the pin reversely TX <-> RX (VBAT and GND stay the same, two outer pins). But nothing really work then!
Haiza, that why I thought they change the command code!
 
If JK BMS's Bluetooth app works for you, then you should consider giving the BLE yaml a try.

Something is better than nothing at all
 
Back
Top