Bafang M400 hack via CAN

Bafang M400 CAN bus hack

The hack is based on the this article, in which the Bafang CAN protocol is described:

https://endless-sphere.com/forums/viewtopic.php?f=28&t=100777&start=425

To emulate the Bafang CAN bus protocol, 2 CAN bus extender cables (with female and male connectors) and an Innomaker USB2CAN tool is used. An example: to change the speed limit and wheel size parameters, the CAN bus connectors between the display and the motor controller is used for the connection to the USB2CAN tool:

The Innomaker USB2CAN device connects to the small DB9 break-out board :

The USB plug connects to a Windows PC and the InnoMakerUSB2CAN application can be used to set parameters (speed limit, wheel size and circumference) and for the motor controller via the Bafang CAN bus: