What does error code 30 signal on a Bafang electric unit?
Error 30 suggests a communications problem, a quick google sent me to the manufacturer website with a list of error codes.
Error Codes
I will add more details later if required but for the time being look at the link supplied for more information

It is most likely a simple connection issue.

First unplug and replug all of the connections on your kit including all of the Main Wiring Harness connections (display,
throttle, brake levers) and all of the Motor lead connections with the
Battery and Speed Sensor. Make sure no pins are bent/damaged on any of
the connection plugs and line up the arrows and pins when reconnecting
everything to ensure proper connection.
If Step 1 does not fix the error, check that none of the wiring on your setup is being pinched, especially the cables coming from the
controller. Check to make sure that none of the wiring on your
installation is too taught and is pulling the cables from the
controller.
Open up the controller from the motor core and unplug all of the controller plugs and replug them again ensuring there is no silicone
interference and everything is properly connected.


Info grabbed from above link incase the site goes 404.