[Tues 1st Dec 2026]
(20:12)
- Will use Waveshare to monitor (and maybe talk to) JK-BMS over CAN bus RJ45 connector.
- Do the same thing to the Sungrow SH3.0RS hybrid inverter
So asking Gemini AI about the CAN bus on a JK-BMS gave the answer..
"So CAN L is pin 4 and CAN H is pin 5JK BMS CAN Bus RJ45 Pinout
https://share.gemini.google/PmX90JNSwgyS
Created with Auto 30 November 2026 at 20:12
Published on 30 November 2026 at 20:29
What is the rj45 pin out fir can bus for a jkbms
On JK BMS models that have a dedicated CAN RJ45 socket (such as the JK-PB inverter BMS series or a P-Link-CR interface board), the standard pinout on the JK BMS RJ45 plug (pins 1–8) is:
Pin 4: CAN_L (CAN low / negative)
Pin 5: CAN_H (CAN high / positive)
Pin 7: GND (Signal ground — often optional/unconnected on the inverter end)
Pins 1, 2, 3, 6, 8: NC (Not connected)"
So pin 4 is CAN L and pin 5 is CAN H with the pin out when looking at the socket on the P-Link CR socket being..
Using my breakout cable pin 4 is blue and pin 5 is light blue/white
Well. I wired it all up but no comms received by Waveshare monitor
what frame ids does the jk-bms can protocol (250K) V2.0 send
The JK-BMS CAN Protocol (250K) V2.0 uses CAN 2.0A with 11-bit standard identifiers at 250 kbps and a fixed 8-byte payload (DLC = 8). All multi-byte fields use little-endian byte ordering.
lifepo4.com.au
It transmits four frame IDs (with default BMS source address 0xF4):
www.jk-bms.com
Frame ID Message Name Cycle / Trigger Payload Contents
0x02F4 BATT_ST (Battery Status) Periodic (20 ms)
• Bytes 0–1: Pack voltage (0.1 V/bit, unsigned)
• Bytes 2–3: Pack current (0.1 A/bit, offset -400 A)
• Byte 4: State of Charge (1 %/bit, 0–100%)
• Byte 5: Reserved
• Bytes 6–7: Discharge time (1 h/bit)
I do see a blue LED flash when I first send CAN ID 0x00000000 data 12 from my phone via 192.168.4.1
(20:59) So failed test. What next?
Could get UART baseline test to work either..
(base) coderdojo@rhubarb:~/Documents/2026 10 JKBMS/Python/jkbmsrs485/src$ python -m jkbmsrs485 monitor --port /dev/ttyACM0
[21:03:14] Opened /dev/ttyACM0 @ 115200 baud cli.py:112
Polling JK BMS every 2.0s...
So turned off / on battery and retried baseline test... With RS485 adaptor plugged in rather than Waveshare! And all is good.
When I plug in Waveshare to laptop USB port I see a couple of blue LED CAN flashes. But I would expect it to be constant!
1. Physical Layer & Data ConventionsStandard:
CAN 2.0A (11-bit standard identifier) Baud Rate: 250 kbps Payload Length (DLC): Fixed at 8 bytes (0 to 7)
Communication Mode: One-way broadcast from the BMS to peripheral/display nodes (no request/polling frames required).
Endianness: Little-endian (LSB first) for all multi-byte values.
Identifier Structure: Formed by combining the 3-bit Function Code (FUNC) and the 8-bit BMS Source Address (SA, default 0xF4 when Device Address = 0). If a non-zero Device Address is configured in the JK-BMS app or DIP switches, the transmitted ID shifts upward by that offset ($\text{Transmitted ID} = \text{Base ID} + \text{Device Address}$).Unused / Reserved Bytes: Transmitted as 0x00 or 0xFF (XX in vendor documentation) and should be ignored by the receiver.
http://www.jk-bms.com/Upload/2022-05-19/1619062896.pdf
So the pin 4 / 5 or the cable must be wrong? But it does send something at the start. So maybe Waveshare firmware not great?
Sawpped CAH H and L on Waveshare and blue LED started flashing like crazy when connected to JK-BMS RJ45. Happt days! But Waveshare WiFi crashes. Maybe due to webserver on 192.168.4.1 receive CAN bus buffer overflow?
(21:41) So next let's create an ESP32-S3 firmware for it ESPHome? Would be nice to be able to filter some of the messages!
https://esphome.io/components/canbus/esp32_can/
Lots of useful stuff! Which pins of the ESP32-S3 are connected to the CAN txvr?
https://files.waveshare.com/wiki/ESP32-S3-RS485-CAN/ESP32-S3-RS485-CAN-Schematic.pdf
So RXD2 (IO 16) and TXD2 (IO 15) are used
https://www.waveshare.com/wiki/ESP32-S3-RS485-CAN#Features
Lists how to configure "ESP32S3 Dev Module" Board for Arduino IDE (from its defaults)
(22:31) Built successfully..
22:31:30.487 -> AP IP address: 192.168.4.1
22:31:30.487 -> Web server started
22:31:30.719 -> Now you can read it in your phone!
22:31:30.719 -> Connect to the WIFI network named "ESP32-S3-RS485-CAN" and access the Internet using the connected IP address!!!
Now let's see what happens when I connect the RJ45 cable and the WiFi crashes....
22:33:01.561 -> ID: 2f4
22:33:01.561 -> Byte:CAN Read Data: 09 05 a0 0f 5e 00 00 00
22:33:01.561 -> Message is in Standard Format
22:33:01.561 -> ID: 4f4
22:33:01.561 -> Byte:CAN Read Data: c0 0f 08 12 10 1f 00 00
22:33:01.594 -> Message is in Extended Format
22:33:01.594 -> ID: 18f128f4
22:33:01.594 -> Byte:CAN Read Data: 76 01 90 01 00 00 00 00
22:33:01.627 -> Message is in Standard Format
22:33:01.627 -> ID: 2f4
22:33:01.627 -> Byte:CAN Read Data: 06 05 a0 0f 5e 00 00 00
22:33:01.627 -> Message is in Standard Format
22:33:01.627 -> ID: 4f4
22:33:01.627 -> Byte:CAN Read Data: b8 0f 1b ed 0f 0e 00 00
22:33:01.627 -> Message is in Extended Format
22:33:01.627 -> ID: 18f128f4
22:33:01.660 -> Byte:CAN Read Data: 76 01 90 01 00 00 00 00
22:33:01.660 -> Message is in Extended Format
22:33:01.660 -> ID: 1f21400
22:33:01.660 -> Byte:CAN Read Data: 43 32 00 00 c4 00 00 00
22:33:01.693 -> Message is in Standard Format
22:33:01.693 -> ID: 2f4
22:33:01.693 -> Byte:CAN Read Data: 06 05 a0 0f 5e 00 00 00
22:33:01.759 -> Message is in Standard Format
22:33:01.759 -> ID: 4f4
22:33:01.759 -> Byte:CAN Read Data: b7 0f 1b ed 0f 0e 00 00
22:33:01.792 -> Message is in Standard Format
22:33:01.792 -> ID: 2f4
22:33:01.792 -> Byte:CAN Read Data: 06 05 a0 0f 5e 00 00 00
22:33:01.859 -> Message is in Standard Format
22:33:01.859 -> ID: 4f4
22:33:01.859 -> Byte:CAN Read Data: b7 0f 1b ed 0f 0e 00 00
22:33:01.859 -> Message is in Extended Format
22:33:01.859 -> ID: 18f128f4
22:33:01.859 -> Byte:CAN Read Data: 76 01 90 01 00 00 00 00
22:33:01.859 -> Message is in Extended Format
22:33:01.859 -> ID: 1f21400
22:33:01.859 -> Byte:CAN Read Data: 43 32 00 00 c4 00 00 00
22:33:01.925 -> Alert: The RX queue is full causing a received frame to be lost.
22:33:01.925 -> RX buffered: 5 RX missed: 7 RX overrun 0
Lots to unpack there!!!!
The specification comes from Jikong (JK-BMS) CAN communication protocol documentation—specifically the BMS-CAN Communication Protocol (V2.0 / V2.1) PDFs published by JK-BMS and mirrored on documentation/manual sites.
Key details in those specification documents match what was shared above:
Protocol IDs & Cycle Behavior:
0x02F4(BATT_ST),0x04F4(CELL_VOLT),0x05F4(CELL_TEMP), and event-triggered0x07F4(ALM_INFO) over CAN 2.0A at 250 kbps with 8-byte little-endian frames and default source address0xF4.Reference Test Frames: The sample hex payloads and expected display values (such as
02F4 13 01 D7 11 33 XX 64 00for27.5 V,56.7 A,51%SOC,100 h;04F4 8C 0A 05 92 09 08 XX XXfor2700 mVat cell 5 and2450 mVat cell 8; and07F4 43 00 20 00 XX XX XX XX) come straight from the test-case tables in the JK-BMS CAN protocol specification.V2.1 Notes: The revision notes in the V2.1 specification document describe the evolution from V2.0 and the added extended frames (such as
0x18F128F4and temperature frames).
http://www.jk-bms.com/Upload/2022-05-19/1619062896.pdf
22:33:01.561 -> ID: 2f4, Read Data: 09 05 a0 0f 5e 00 00 00
Translates to BATT_ST 0x0590 (142.4V), 0x0f0a (385.0 - 400A = -15.0A), 0x5e (94%), .... (LSB transmissions)
Expect 128.65V, 0.00A and 94% SoC. But getting -15.0A
And discharge time of 0 hours with extra byte at end! Expect 14H and no extra byte. Same for other 3 0x02F4 messages!
Their example has: 02F4 13 01 D7 11 33 XX 64 00 Represents: voltage 27.5V, current 56.7A (precision: 0.1A), SOC51%, discharge time 100h
22:33:01.561 -> ID: 4f4, Read Data: c0 0f 08 12 10 1f 00 00
Translates to CELL_VOLT 0x0fc0 (4032mV), 0x08 (position 8), 0x1012 (4114mV), 0x1f (position 31)
Why two trailling 0x00 bytes? Their example also has this:
For example: 04F4 8C 0A 05 92 09 08 XX XX Represents: the highest cell voltage is 2700mV, corresponding cell number is 5;The lowest cell voltage is 2450mV, andthecorresponding cell
22:33:01.627 -> ID: 18f128f4
22:33:01.660 -> Byte:CAN Read Data: 76 01 90 01 00 00 00 00
22:33:01.660 -> Message is in Extended Format
22:33:01.660 -> ID: 1f21400
22:33:01.660 -> Byte:CAN Read Data: 43 32 00 00 c4 00 00 00
(22:59) I will take that as a win for now :)
Will next program the ESP32 to decode these frames without overflowing!
Will then test receiving and then sending commands on another CAN protocol
Finally sending CAN data using Dryness HV protocol to SH3.0RS inverter
[Sun 29th Nov 2026]
(18:32) Would like to get CAN comms going under Python on my laptop to perhaps a Waveshare DIN device before testing on my Sungrow SH3.0RS hybrid inverter (which has two wires L and H on a RJ45 socket)
The JK-BMS breakout board also has a CAN (as well as a RS485-EXT which works to laptop). But what voltage does it work at?
Let's look at the Waveshare specs: https://docs.waveshare.com/ESP32-S3-RS485-CAN. The schematic https://files.waveshare.com/wiki/ESP32-S3-RS485-CAN/ESP32-S3-RS485-CAN-Schematic.pdf shows it uses a TJA1051T/3/1J chip which accepts +/- 58V (max) from a 5V supply! https://www.nxp.com/docs/en/data-sheet/TJA1051.pdf
So I think CAN L and H are differential from 0V to 5V.
(base) coderdojo@rhubarb:~/Documents/2026 10 JKBMS/Python$ mkdir CAN
(base) coderdojo@rhubarb:~/Documents/2026 10 JKBMS/Python$
(base) coderdojo@rhubarb:~/Documents/2026 10 JKBMS/Python$ pip install python-can
Collecting python-can
Downloading python_can-4.6.1-py3-none-any.whl.metadata (8.6 kB)
Requirement already satisfied: wrapt~=1.10 in /home/coderdojo/anaconda3/lib/python3.13/site-packages (from python-can) (1.17.0)
Requirement already satisfied: packaging>=23.1 in /home/coderdojo/anaconda3/lib/python3.13/site-packages (from python-can) (25.0)
Requirement already satisfied: typing_extensions>=3.10.0.0 in /home/coderdojo/anaconda3/lib/python3.13/site-packages (from python-can) (4.15.0)
Downloading python_can-4.6.1-py3-none-any.whl (276 kB)
Installing collected packages: python-can
Successfully installed python-can-4.6.1
(base) coderdojo@rhubarb:~/Documents/2026 10 JKBMS/Python$
Arduino IDE shows this on /dev/ttyUSB0 with current firmware on ESP32-S3-RS485-CAN ..
19:08:19.609 -> 0.198 transmitter registered, total: 1
19:08:19.609 -> 0.198 CAN receiver registered, total: 1
19:08:19.609 -> 0.198 Requesting 500 kbps for inverter CAN interface (CAN)
19:08:19.609 -> 0.198 transmitter registered, total: 2
19:08:19.609 -> 0.198 CAN receiver registered, total: 2
19:08:19.609 -> 0.199 Native Can ok
19:08:19.609 -> 0.199 Bit Rate prescaler: 4
19:08:19.609 -> 0.200 Time Segment 1: 13
19:08:19.609 -> 0.200 Time Segment 2: 6
19:08:19.609 -> 0.200 RJW: 4
19:08:19.609 -> 0.200 Triple Sampling: no
19:08:19.609 -> 0.200 Actual bit rate: 500000 bit/s
19:08:19.609 -> 0.200 Exact bit rate ? yes
19:08:19.609 -> 0.200 Sample point: 70%
19:08:19.609 -> 0.201 The board was reset from a power-on event. Normal operation (event)
19:08:19.609 -> 0.202 MQTT initialized successfully.
19:08:19.609 -> 0.202 Setup complete!
19:08:19.609 -> 0.268 Creating Wi-Fi AP: battery-emulator-0280 (password set with 9 chars)
19:08:19.609 -> 0.330 Access Point using default password!
19:08:19.609 -> 0.330 The AP will be disabled after 5 idle minutes. Change default password to keep AP constantly on! (event)
19:08:19.609 -> 0.330 [452 CAN frames not printed]
19:08:20.099 -> (104.00) TX11 3010 [8] 01 00 00 00 00 00 00 00
19:08:20.099 -> (104.00) TX11 4200 [8] 01 00 00 00 00 00 00 00
19:08:20.099 -> (104.00) TX11 8200 [8] AA 00 00 00 00 00 00 00
19:08:20.099 -> (104.00) TX11 8210 [8] AA 00 00 00 00 00 00 00
19:08:21.095 -> (105.00) TX11 3010 [8] 01 00 00 00 00 00 00 00
19:08:21.095 -> (105.00) TX11 4200 [8] 02 00 00 00 00 00 00 00
19:08:21.095 -> (105.00) TX11 8200 [8] AA 00 00 00 00 00 00 00
19:08:21.095 -> (105.00) TX11 8210 [8] AA 00 00 00 00 00 00 00
19:08:21.095 -> (105.00) TX11 19B50100 [1] 00
19:08:21.095 -> (105.00) TX11 19B50300 [1] 00
19:08:22.090 -> (106.00) TX11 3010 [8] 01 00 00 00 00 00 00 00
19:08:22.090 -> (106.00) TX11 4200 [8] 00 00 00 00 00 00 00 00
19:08:22.090 -> (106.00) TX11 8200 [8] AA 00 00 00 00 00 00 00
19:08:22.090 -> (106.00) TX11 8210 [8] AA 00 00 00 00 00 00 00
19:08:23.086 -> (107.00) TX11 3010 [8] 01 00 00 00 00 00 00 00
19:08:23.086 -> (107.00) TX11 4200 [8] 01 00 00 00 00 00 00 00
19:08:23.086 -> (107.00) TX11 8200 [8] AA 00 00 00 00 00 00 00
Looking on Fritz router I see:
battery-emulator-0280 Wi-Fi 2.4 GHz → 72 Mbit/s 192.168.1.186 28:84:85:B4:02:80
Found this Arduino IDE code at:
/home/coderdojo/Arduino/Waveshare ESP32-S3-RS485-CAN/Battery-Emulator but looks like platformio code files...
Yep. Opened in Visual Code Studio and the project was there.''
I'm confused. So I will download the standard .bin file from /home/coderdojo/Documents/2026 10 JKBMS/ESP32-S3-RS485-CAN/Firmware using Web installer..
https://www.espboards.dev/tools/program/
Flash Address 0x1000 ESP32-S3-RS485-CAN.bin
(base) coderdojo@rhubarb:~$ wine /home/coderdojo/Documents/2026\ 10\ JKBMS/ESP32-S3-RS485-CAN/flash_download_tool/flash_download_tool_3.9.11.exe
Downloaded .bin using https://esptool.spacehuhn.com/
But terminal output not great!
Hurrah! Flashed .bin to 0x000 using https://www.espboards.dev/tools/program/
Writing at 0x131990... (75%)
Writing at 0x136b3b... (77%)
Writing at 0x13ba03... (79%)
Writing at 0x140de7... (80%)
Writing at 0x1460ff... (82%)
Writing at 0x14ba37... (83%)
Writing at 0x151506... (85%)
Writing at 0x156b76... (87%)
Writing at 0x15d2a5... (88%)
Writing at 0x165979... (90%)
Writing at 0x16da62... (91%)
Writing at 0x172c9d... (93%)
Writing at 0x17acb4... (95%)
Writing at 0x18004d... (96%)
Writing at 0x185b95... (98%)
Writing at 0x18b4d9... (100%)
Wrote 1629920 bytes (1006898 compressed) at 0x0 in 10.766 seconds.
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378d06
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x508
load:0x403c9700,len:0x4
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x29e4
entry 0x403c9880
Driver installed
Driver started
CAN Alerts reconfigured
PCF85063 is running,state :1
AP IP address: 192.168.4.1
Web server started
Now you can read it in your phone!
Connect to the WIFI network named "ESP32-S3-RS485-CAN" and access the Internet using the connected IP address!!!






























