• Howdy! we're looking for donations to finish custom knowledgebase software for this forum. Please see our Funding drive thread

Protocol specs for Bafang BBS02 Mid Drive

vaxvax

1 µW
Joined
Jun 8, 2014
Messages
1
Hi,

I am trying to write my own open source programming software to enable me to correctly program the Bafang BBS02 Mid Drive Motor/Controller.

The one i have found on the internet has delphi source code with it but it is incomplete and contains errors in some sections.

I would like to fix these but I need a full copy of the programming protocol. It is called Bafang Protocol v4.0

If anyone is able to assist it would be most appreciated.

Regards,
 
I have looked at this myself the fault with Delphi is there is no comm port. I have the assembled exe program and I have changed settings in my drive but I too would like to see the protocol . I have looked at the data both ways but I cant make any sense. so they will have there own codes . I do know the display sends out 4 bytes and receives a long ish string back . I am sure somebody will get to the bottom of it . I have quoted the reference to the commport in delphi and single stepped it . Given the time I am sure its achievable . I like you want the shortcut... The protocol . Or do we have a delphi expert out there ??
 
Hello,

I am also very much interest in deciphering the protocol as a start for my own client. I am no Delphi expert, but I guess I am able to understand the source (although it is very poorly written/documented IMHO).

Please see my first findings regarding the communication which is performed on connecting (basically reading the device information) and (uncommented so far) the communication when performing a Read flash:

Code:
Baudrate: 1200,8,N,1


Connect
———
Send: 11 51 04 B0 05  (05 = (51 + 04 + B0) MOD 256)
Response: 
51 10 
48 5A 58 54 
53 5A 5A 36 
32 32 
32 30 31 31 
01 
14 
1B

Response (description):
0-1: 51 10
2-5: Manufacturer (HZXT)
6-9: Model (SZZ6)
10-11: HW Version {10}.{11} (22 -> 2.2)
12-15: FW Version ({12}.{13}.{14}.{15} -> 2.0.1.1)
16: Voltage
	0: 24V (18-22)
	1: 36V (28-32)
	2: 48V (38-43)
	3: 60V (48-55)
	4: 24V-48V (18-43)
	else: 24V-60V (18-55)
17: Max Current (20)
18: 

--- Read Flash (Read Basic + Read Pedal + Read Throttle): ---

Read Basic: 11 52
Answer: 52 18 1F 0F 00 1C 25 2E 37 40 49 52 5B 64 64 64 64 64 64 64 64 64 64 64 34 01 DF

Read Pedal: 11 53
Answer: 53 0B 03 FF FF 64 06 14 0A 19 08 14 14 27

Read Throttle: 11 54
Answer: 54 06 0B 23 00 03 14 AC
 
Hello,

I'm currently considering building "something" around a Raspberry Pi and my Bafang BBS02 equipped e-bike.
Has anyone found, or reverse engineered, a reference for the protocol specs known as "Bafang protocol V4.0" ?

@philipps, you seemed to be on the track to decipher this protocol. Did you go any further or has this been abandoned ?

Thank you for any potential help.

Best.
 
Hi,

I did not much work on it, but at least have a very basic python library along with a test script which should cover at the funcionality of the original bafang configuration. Perhaps you will find it useful:

https://github.com/philippsandhaus/bafang-python

Best,

Philipp
 
Thank you @philipps,

That is already something to start with, I'll certainly post here if I get a chance to achieve anything interesting... who knows!

Best regards.
 
Back
Top