-
-
Notifications
You must be signed in to change notification settings - Fork 40
Bafang Display Protocol
Daniel Nilsson edited this page Mar 23, 2021
·
6 revisions
The Bafang display protocol is a request/response protocol where the display
sends the requests and the controller responds. It utilizes a trailing checksum
and is full of inconsistencies.
Rules:
- Read requests starts with 0x11
- Write requests starts with 0x16
The next byte is an opcode for the type of operation.
When checksum is present it is usually the sum of all previous bytes
(excluding request type and opcode) truncated to 8 bits.
Request:
11 08
Response:
XX
Where XX is a status code.
Code | Description |
---|---|
00 | OK |
01 | Pedaling |
02 | ? |
03 | Brake activate |
Request
11 0A
Response
XX CC
Where XX is current in amps x 2 and CC is checksum which is XX.