Closed sabakad closed 1 year ago
Looks like I have the same problem, -l works fine, but requesting a specific value yields no output ./jbdtool -t bt:E0:9F:2A:E4:A1:12 -l DesignCapacity CycleCapacity FullChargeVol ChargeEndVol DischargingRate ManufactureDate SerialNumber (..)
the -l (ell) option just provides a list of all field names, not the values themselves. Its so you can use the names from the list to ask for specific values (or use -a for all values).
for example:
BalanceStartVoltage BalanceWindow
BalanceStartVoltage 3950
(example uses the wifi adapter: https://diysolarforum.com/threads/jbd-bms-wi-fi-module.17252/)
the original question was about BT. I have finally aquired a JBD BT adapter (vs a generic one from amazon) and I'll start testing it next week.
sabakad, have a look at mav's reply on another thread:
Couldn't get this to work, spend too much time on it already. However, for what its worth, this did work for me:
Install https://github.com/Jakeler/ble-serial with pip install ble-serial. Run ble-scan to identify BMS:
$ ble-scan Started BLE scan A4:C1:38:19:9A:A2 (RSSI=-54): 16S10AH-LIGHT A4:C1:38:F0:86:0D (RSSI=-91): 16S20AH50A
then run:
$ ble-serial -d A4:C1:38:F0:86:0D
Should get the following output:
21:34:19.750 | INFO | linux_pty.py: Slave created on /tmp/ttyBLE -> /dev/pts/0 21:34:19.750 | INFO | ble_interface.py: Receiver set up 21:34:19.913 | INFO | ble_interface.py: Trying to connect with A4:C1:38:F0:86:0D: 16S20AH50A 21:34:22.252 | INFO | ble_interface.py: Device A4:C1:38:F0:86:0D connected 21:34:22.253 | INFO | ble_interface.py: Found write characteristic 0000ff02-0000-1000-8000-00805f9b34fb (H. 20) 21:34:22.253 | INFO | ble_interface.py: Found notify characteristic 0000ff01-0000-1000-8000-00805f9b34fb (H. 16) 21:34:22.622 | INFO | main.py: Running main loop!
Now you can use jbdtool to connect to the serial port mentioned:
jbdtool -t serial:/dev/pts/0 Voltage 53.400 Current 0.000 DesignCapacity 20.000 RemainingCapacity 19.990 PercentCapacity 100 CycleCount 14 Probes 3 Strings 16 Temps 19.0,19.0,19.1 Cells 3.337,3.336,3.336,3.337,3.341,3.338,3.339,3.337,3.339,3.335,3.339,3.337,3.339,3.337,3.339,3.335 Balance 0000000000000000 CellTotal 53.401 CellMin 3.335 CellMax 3.341 CellDiff 0.006 CellAvg 3.338 DeviceName SP20S020A-L16S-50A-50A-B-U ManufactureDate 20211101 Version 12.9 FET Charge,Discharge
this might work for you
Thanks, I've resolved it by using UART instead, since then it works like charm :-)
Hi, I'm still struggling to get jbdtool output working for me. What I've done:
Log from sudo btmon -A -T:
Bluetooth monitor ver 5.55 = Note: Linux version 5.15.53-v7l+ (armv7l) 2022-07-19 09:34:13.372559 = Note: Bluetooth subsystem version 2.22 2022-07-19 09:34:13.372565 = New Index: 00:1A:7D:DA:71:0A (Primary,USB,hci0) [hci0] 2022-07-19 09:34:13.372569 = Open Index: 00:1A:7D:DA:71:0A [hci0] 2022-07-19 09:34:13.372572 = Index Info: 00:1A:7D:DA:71:0A (Cambridge Silicon Radio) [hci0] 2022-07-19 09:34:13.372574 @ MGMT Open: bluetoothd (privileged) version 1.21 {0x0001} 2022-07-19 09:34:13.372577 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #1 [hci0] 2022-07-19 09:34:33.928642 Type: Passive (0x00) Interval: 60.000 msec (0x0060) Window: 60.000 msec (0x0060) Own address type: Public (0x00) Filter policy: Ignore not in white list (0x01)