Bafang creates amazing electric bike systems. The BESST software is used to configure their controllers, displays and sensors over the CAN-bus and their CAN-over-UART tool (BESST Box). Since it is an Electron app (a web application behind the scenes), we have access to the main components of the codebase.
Follow the instructions below to re-create this:
.exe
from their website (version 1.2.43 used in this repository)..exe
to .zip
and uncompress the archive.$PLUGINSDIR/app-32.7z
archive within in.resources/app.asar
archive in the app-32
directory using npx @electron/asar extract resources/app.asar app
to the app
directory..js.map
files) included in the app/static/js
directory using npx reverse-sourcemap app/static/js
to the app/static/js/webpack
directory.The following questions are of interest:
The application includes Windows drivers for the following Silicon Labs (VID 10C4) hardware:
so it is reasonable to assume that the BESST Box is based on one of these chips.
The application also includes the source code for the besst-usb-sdk
JS library which is used for all device communication.
https://github.com/OpenSourceEBike/Bafang_M500_M600 includes a python script for proxying network requests to Bafang servers for client authentication.