I think this is a question @Steve_S or @upnorthandpersonal may be able to answer.
I'm trying to write a python script that can write data to the JK BMS via USB-TTL. I found the documents here, specifically "Communication protocol between monitoring platform and BMS.pdf". There is also a chinese version at this link. I was able to read data successfully using inspiration from @upnorthandpersonal 's jk-bms_grafana project on github. Writing data back has been more of a challenge. I can send a write packet such as this one (modifies register 0xA3 to hex 0x0047/dec 71 -- the charging over temperature limit in celcius).
4e 57 00 15 00 00 00 00 02 03 00 a3 00 47 00 00 00 00 68 00 00 02 11
I get what looks like a successful reply from the BMS, however reading the 0xA3 value shows that it was unchanged from before. I have a feeling the answer lies with Command Word 0x05, the "Password Directives" command word from page 5 in the english spec doc. I formulated a packet like this to send the modify password first (the same password I use to modify settings in the bluetooth app, 0000):
4e 57 00 1c 00 00 00 00 05 03 00 30 30 30 30 00 00 00 00 00 00 00 00 00 00 68 00 00 01 f1
4e 57 00 1d 00 00 00 00 05 03 00 b2 30 30 30 30 00 00 00 00 00 00 00 00 00 00 68 00 00 02 a4
The 1st one uses no identifier in the ID+Data field, 2nd does use one. When I send these commands the BMS does not reply so it seems the packet may be malformed. Thinking that maybe a blank response is OK for setting the password, I tried the write 0xA3 command above directly aftfer sending it, but get the same results as before.
I was thinking maybe the Chinese version of the spec may have some clues about how to get this working that weren't translated by Google, any help there @Steve_S? Has anyone been able to get write commands working through the JKBMS serial communication path?
I'm trying to write a python script that can write data to the JK BMS via USB-TTL. I found the documents here, specifically "Communication protocol between monitoring platform and BMS.pdf". There is also a chinese version at this link. I was able to read data successfully using inspiration from @upnorthandpersonal 's jk-bms_grafana project on github. Writing data back has been more of a challenge. I can send a write packet such as this one (modifies register 0xA3 to hex 0x0047/dec 71 -- the charging over temperature limit in celcius).
4e 57 00 15 00 00 00 00 02 03 00 a3 00 47 00 00 00 00 68 00 00 02 11
I get what looks like a successful reply from the BMS, however reading the 0xA3 value shows that it was unchanged from before. I have a feeling the answer lies with Command Word 0x05, the "Password Directives" command word from page 5 in the english spec doc. I formulated a packet like this to send the modify password first (the same password I use to modify settings in the bluetooth app, 0000):
4e 57 00 1c 00 00 00 00 05 03 00 30 30 30 30 00 00 00 00 00 00 00 00 00 00 68 00 00 01 f1
4e 57 00 1d 00 00 00 00 05 03 00 b2 30 30 30 30 00 00 00 00 00 00 00 00 00 00 68 00 00 02 a4
The 1st one uses no identifier in the ID+Data field, 2nd does use one. When I send these commands the BMS does not reply so it seems the packet may be malformed. Thinking that maybe a blank response is OK for setting the password, I tried the write 0xA3 command above directly aftfer sending it, but get the same results as before.
I was thinking maybe the Chinese version of the spec may have some clues about how to get this working that weren't translated by Google, any help there @Steve_S? Has anyone been able to get write commands working through the JKBMS serial communication path?