bradcagle / dbus-btbattery

20 stars 3 forks source link

Can’t connect JK-BMS JK_B2A24S20P #1

Closed testpaul999 closed 1 year ago

testpaul999 commented 1 year ago

Hi, Nice project 👍🏻. Have follow problem with connect JK_B2A24S20P. See this JK_B2A24S20P, Address: c8:47:8c:e9:33:c0

root@raspberrypi4:/opt/victronenergy/dbus-btbattery# ./dbus-btbattery.py c8:47:8c:e9:33:c0 INFO:BluetoothBattery:Starting dbus-btbattery INFO:BluetoothBattery:dbus-btbattery v0.1.1 INFO:BluetoothBattery:Connecting INFO:BluetoothBattery:Connected c8:47:8c:e9:33:c0 Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/opt/victronenergy/dbus-btbattery/jbdbt.py", line 249, in run result = self.bt.writeCharacteristic(0x15, b'\xdd\xa5\x03\x00\xff\xfd\x77', True) # write x03 (basic info) File "/usr/lib/python3.8/site-packages/bluepy/btle.py", line 543, in writeCharacteristic return self._getResp('wr') File "/usr/lib/python3.8/site-packages/bluepy/btle.py", line 407, in _getResp resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout) File "/usr/lib/python3.8/site-packages/bluepy/btle.py", line 368, in _waitResp raise BTLEGattError("Bluetooth command failed", resp) bluepy.btle.BTLEGattError: Bluetooth command failed (code: 3, error: Attribute can't be written)

this is my bms FCD4E1FC-5891-4C11-9973-3E1D4082590A

regards

bradcagle commented 1 year ago

Is this a JK BMS?

Right now this project only support JBD

testpaul999 commented 1 year ago

Ok, sorry don’t realize this. Thx