Cannot connect to JK BMS/Active Balancer
See original GitHub issueTried both JK02/04. I am sure its something simple I am missing here. Using RPI4 4gb
jkbms -p C8:47:8C:F3:75:92 -P JK02 -D
2021-10-23 17:17:55,859:INFO:__init__:main@195: Solar Device Command Utility, version: 0.7.83, add missing libs
MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='jkbms')
2021-10-23 17:17:55,859:INFO:__init__:main@299: Creating device "unnamed" (type: "jkbms") on port "C8:47:8C:F3:75:92 (porttype=None)" using protocol "JK02"
2021-10-23 17:17:55,867:DEBUG:__init__:main@302: device_class <class 'mppsolar.devices.jkbms.jkbms'>
2021-10-23 17:17:55,867:DEBUG:device:__init__@31: __init__ args ()
2021-10-23 17:17:55,867:DEBUG:device:__init__@32: __init__ kwargs {'name': 'unnamed', 'port': 'C8:47:8C:F3:75:92', 'protocol': 'JK02', 'baud': 2400, 'porttype': None, 'mqtt_broker': MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='jkbms')}
2021-10-23 17:17:55,868:DEBUG:device:get_port_type@71: port matches jkble ':'
2021-10-23 17:17:55,868:INFO:device:set_port@154: Using jkbleio for communications
2021-10-23 17:17:55,902:DEBUG:device:set_protocol@96: Protocol JK02
2021-10-23 17:17:55,923:DEBUG:device:__init__@36: __init__ name unnamed, port <mppsolar.io.jkbleio.JkBleIO object at 0xb5d945b0>, protocol <mppsolar.protocols.jk02.jk02 object at 0xb5d7be70>
2021-10-23 17:17:55,923:DEBUG:__init__:main@349: Commands [(<mppsolar.devices.jkbms.jkbms object at 0xb5d7bed0>, '', '', 'screen', None, None)]
2021-10-23 17:17:55,923:INFO:__init__:main@354: Looping 1 commands
2021-10-23 17:17:55,924:INFO:__init__:main@365: Getting results from device: jkbms device - name: unnamed, port: <mppsolar.io.jkbleio.JkBleIO object at 0xb5d945b0>, protocol: <mppsolar.protocols.jk02.jk02 object at 0xb5d7be70> for command: , tag: , outputs: screen
2021-10-23 17:17:55,924:INFO:device:run_command@268: Running command
2021-10-23 17:17:55,924:INFO:jkabstractprotocol:get_full_command@71: Using protocol b'JK02' with 3 commands
2021-10-23 17:17:55,924:DEBUG:jkabstractprotocol:get_command_defn@102: get_command_defn for: getCellData
2021-10-23 17:17:55,924:DEBUG:abstractprotocol:get_command_defn@43: Processing command 'getCellData'
2021-10-23 17:17:55,924:DEBUG:abstractprotocol:get_command_defn@45: Found command getCellData in protocol b'JK02'
2021-10-23 17:17:55,924:DEBUG:jkabstractprotocol:get_full_command@76: self._command = getCellData
2021-10-23 17:17:55,924:DEBUG:jkabstractprotocol:get_full_command@87: cmd with SOR: bytearray(b'\xaaU\x90\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2021-10-23 17:17:55,925:DEBUG:jkabstractprotocol:get_full_command@95: cmd with command code: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2021-10-23 17:17:55,925:DEBUG:jkabstractprotocol:get_full_command@97: cmd with crc: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10')
2021-10-23 17:17:55,925:INFO:device:run_command@294: full command bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10') for command getCellData
2021-10-23 17:17:55,925:DEBUG:jkabstractprotocol:get_command_defn@102: get_command_defn for: getCellData
2021-10-23 17:17:55,925:DEBUG:abstractprotocol:get_command_defn@43: Processing command 'getCellData'
2021-10-23 17:17:55,925:DEBUG:abstractprotocol:get_command_defn@45: Found command getCellData in protocol b'JK02'
2021-10-23 17:17:55,925:INFO:jkabstractprotocol:get_full_command@71: Using protocol b'JK02' with 3 commands
2021-10-23 17:17:55,925:DEBUG:jkabstractprotocol:get_command_defn@102: get_command_defn for: getCellData
2021-10-23 17:17:55,926:DEBUG:abstractprotocol:get_command_defn@43: Processing command 'getCellData'
2021-10-23 17:17:55,926:DEBUG:abstractprotocol:get_command_defn@45: Found command getCellData in protocol b'JK02'
2021-10-23 17:17:55,926:DEBUG:jkabstractprotocol:get_full_command@76: self._command = getCellData
2021-10-23 17:17:55,926:DEBUG:jkabstractprotocol:get_full_command@87: cmd with SOR: bytearray(b'\xaaU\x90\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2021-10-23 17:17:55,926:DEBUG:jkabstractprotocol:get_full_command@95: cmd with command code: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2021-10-23 17:17:55,926:DEBUG:jkabstractprotocol:get_full_command@97: cmd with crc: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10')
2021-10-23 17:17:55,926:INFO:jkbleio:send_and_receive@26: full command bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10') for command getCellData
2021-10-23 17:17:55,926:DEBUG:jkabstractprotocol:get_command_defn@102: get_command_defn for: getCellData
2021-10-23 17:17:55,927:DEBUG:abstractprotocol:get_command_defn@43: Processing command 'getCellData'
2021-10-23 17:17:55,927:DEBUG:abstractprotocol:get_command_defn@45: Found command getCellData in protocol b'JK02'
2021-10-23 17:17:55,927:DEBUG:jkbleio:send_and_receive@30: expected record type 2 for command getCellData
2021-10-23 17:17:55,927:INFO:jkbleio:ble_connect@54: Attempting to connect to C8:47:8C:F3:75:92
2021-10-23 17:17:57,123:INFO:jkbleio:ble_get_data@82: Connected to b''
Traceback (most recent call last):
File "/usr/local/bin/jkbms", line 33, in <module>
sys.exit(load_entry_point('mppsolar', 'console_scripts', 'jkbms')())
File "/home/pi/Python-3.6.9/src/mpp-solar/mppsolar/__init__.py", line 367, in main
results = _device.run_command(command=_command)
File "/home/pi/Python-3.6.9/src/mpp-solar/mppsolar/devices/device.py", line 311, in run_command
command_defn=self._protocol.get_command_defn(command),
File "/home/pi/Python-3.6.9/src/mpp-solar/mppsolar/io/jkbleio.py", line 34, in send_and_receive
response = self.ble_get_data(full_command)
File "/home/pi/Python-3.6.9/src/mpp-solar/mppsolar/io/jkbleio.py", line 91, in ble_get_data
characteristicRead = serviceNotify.getCharacteristics(characteristicReadUuid)[0]
IndexError: list index out of range
Issue Analytics
- State:
- Created 2 years ago
- Comments:39 (11 by maintainers)
Top Results From Across the Web
SUPPORT - JK BMS
Fill out the contact boxes and we will get in touch with you as soon as we can. JKBMS has professional Battery BMS/Battery...
Read more >The JK BMS with integrated active balancer. This is the one!
This is one of the most exciting delivers I got for a long time. It has finally arrived: the JK BMS with integrated...
Read more >JK-BMS: all settings and menus explained. How to ... - YouTube
Transcript · The JK - BMS 4S-8S Edition - World Premiere. · The JK BMS with integrated active balancer. · Seplos MASON 280...
Read more >JK BMS BT error: Device is not supported
I have my JK BMS and the ENJ app 3.6.3.74 loaded to my Android phone. It sees the BMS and recognizes the number...
Read more >JK BMS bluetooth Manual - Batteri Energi
JK BMS bluetooth Manual cherry@3apower.com ... active. Balance current ... Bluetooth connection indicator, the indicator light is always on when the.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks syssi. I got it to work by removing the ord() function from the line crc = ord(record[299])
I implemented a JKBMS Emulator based on a JDY-23 BLE module. The commands to change values are always based on a 20 byte frame with following format: Set Command:
The register addresses (AD) are as follows:
Btw, the first response on CMDINFO is a record type 0x01 that contains all setup data, then JKBMS continues periodically with record type 0x02 (Cell data). Based on this information one is able cover almost the whole functionality as the JKBMS App. Here the record structure (record type 0x01) with real data from my LiPoFe4 battery block:
I could also find some more useful data in the Cell info frame (record type 0x02). At position 0x88 the possible 16 different System Alarms are shown and at 0x3E/3F the actual min and max cell number is distributed. Here the screenshot of the grammar:
Finally the data analysis function I am using to convert the data on an ESP32: DATA_ANALYSIS.ino.zip