Programming the Bafang Middrive BBS01+BBS02

gsa103 said:
I've tried two different USB -> TTL cables, is my controller killing them or something?
Make sure you have the correct Prolific driver.
https://www.google.com/search?client=safari&rls=en&ei=SdBsX-Q02Lq1Bun5toAL&q=Prolific+driver+bbshd&oq=Prolific+driver+bbshd&gs_lcp=CgZwc3ktYWIQAzoECAAQRzoCCAA6BAgAEEM6BggAEBYQHjoFCCEQoAE6BQgAEM0CUJh8WLiTAWDvlwFoAHABeACAAdQBiAGaBZIBBTQuMS4xmAEAoAEBqgEHZ3dzLXdpesgBCMABAQ&sclient=psy-ab&ved=0ahUKEwik_bfpoYLsAhVYXc0KHem8DbAQ4dUDCAw&uact=5
 
How are the Kepler's settings working now days? Meaning 100% speed limit on all PAS settings? BBS02B controller better than first gen bbs02? Currently I don't like the motor going on-off when riding with friends and speed varies a lot.
 
HELLO GUYS a little help!
I need to replace my bs01 48v 500w motor Core ( it burned!)....but the only that I can find are 48v 750w.....does that mean that the motor core is the same identical for both 500 and 750w and it's all a matter of programming or controller?
IMG_6993.jpg

LET ME KNOW please... :oops: :oops:
 
@electroriderIT The Controller and the Motor have different Max currents. What you will see it that the Controller can handle more Amps than the Motor itself.

In the programming tool you see the max current for the Controller after connected on the right side.
In my case with the BBS01 that is 20 Amps. But my Motor itself can only handle 15 Amps.

WARNING: NEVER set the Max current in the Programming Tool (the Motor) to the Max current of your controller.

Your Controller can probably handle 20 amps. With 48V that will produce 960W. So 750W motor can be controlled. Ask the seller in this case?
 
Hi all. Since there was no Bafang BBS config tool for Mac or Linux, I wrote one! It runs in your web browser (using Serial Web API which should be supported by any modern browser). So, no need to download and install anything. You can find it here: https://devnotes.kymatica.com/BafangWebConfig/

I've tested it on my BBS02B, but I don't think I've tweaked all parameters so please let me know if there's any problems.
 
BotoXbz said:
cross33 said:
elenhinan said:
Well, not anymore. I wrote a really small python script that spoofs the login response of their server, letting one access the programming tool in the BESST software (tested with v1.06). For this to work you need to add the line "127.0.0.1 besst-api.yuntick.com" to c:\windows\system32\drivers\etc\hosts . This will redirect all communication intended for the bafang servers to the local web-server run by the script. Any login will then automatically be accepted. Open notepad with administrative privileges to edit this file, or save it somewhere else and copy and overwrite it afterwards. Then start the spoof.py if you already have python installed, or spoof.exe if not. It might need some microsoft visual c++ redist package, but most computers already have this installed. Login with whatever email and password you want. After login click menu and then tool. Just to clarify, this does not give you access to any restricted Bafang servers or anything I would consider shady, it just let's you open the software that runs locally on your computer.

An diagnostics mode is also available if one modifies the python script (type from 4 to 3 on line 19), which should do some testing of the display and controller.

As I have no programming cable I have not tested this. Since the software comes straight from Bafang I wouldn't expect it to put your bike on fire, but then again don't blame me if it does. If anyone want to test it out it would be interesting if you could share your experience.

Hi elenhinan
First of all, thank you for making the besst-spoof script. But, I'm unable to get it woking with the current version of BESST (v.1.2.17). I'm just getting "Unable to connect to remote service". Are you able to share the v.1.06? Or is there a another fix to this problem?

Best
Martin

they changed a few things, need to add
127.0.0.1 test.api.besst.bafang-service.com
to hosts file now

and here is the updated python code (converted it to python3):
Code:
# written by elenhinan, 24.11.2016

from http.server import BaseHTTPRequestHandler, HTTPServer
import socketserver
import simplejson as json
import socket

class BESST_server(BaseHTTPRequestHandler):
	def do_POST(self):
		data_string = self.rfile.read(int(self.headers['Content-Length']))
		print("got post from BESST (%s)"%data_string)
		
		if b"password" in data_string:
			print("login accepted ;)")
			self.send_response(200)
			self.send_header('Content-type', 'application/json;charset:UTF-8\r\n')
			self.end_headers()
			#user type: 1 brand, 2 dealer, 3 assembler, 4 manufacturer, 5 terminal. 4 for tool access, 3 for diagnostics
			userdata = json.dumps( {'code':0,'data':{'user':{'status':1,'org': {'id': 12345, 'type': 4}},'token':123}} )
			self.wfile.write(userdata.encode('utf-8'))
		else:
			self.send_response(200)
			self.send_header('Content-type', 'application/json;charset:UTF-8\r\n')
			self.end_headers()
			userdata = json.dumps( {'code':0} )
			self.wfile.write(userdata.encode('utf-8'))
 
		
def run(handler_class=BESST_server, port=80):
        ip_lookup = socket.gethostbyname('besst-api.yuntick.com')
        print(("test.api.besst.bafang-service.com forwards to %s"%ip_lookup))
        httpd = socketserver.TCPServer(("", port), handler_class)
        print("Starting httpd...")
        httpd.serve_forever()

	
if __name__ == "__main__":
	run()

I don't have a BESST tool sadly so this was kinda useless for me as the program doesn't seem to work with just a CP2102
But I unpacked the code from the BESST tool, it's an electron app.
Here's most of the logic: https://cloud.botox.bz/s/6577jFi9a2nrT3g
It has a bunch of battery related stuff, gonna use that info to make my open source BMS firmware compatible with Bafang displays :D

Hi, any updates on besst tool and firmware? I will need to calibrate g510 to new controller. I have a source for besst tool but no software. where do I downkoad the besst software that will work with python script? perhaps there's a script update to work with:
https://bafang-e.com/fileadmin/Media/BESST/BESST_Setup_1.2.26.zip
 
Here's my experience programming a Bafang 750w BBS02.

Perhaps some will remember me and my Currie USPD I ran for 20 years.
Three years on lead-acid, 8 years on NiMH, then 9 years on LiPo.

I've been running the Bafang bone stock on a Schwinn Frontier MTB for 10 months and 860 miles.
It's so much better than the Currie; I decided to just take some time and enjoy the turn-key experience.
I ordered a programming cable from Luna and spent a few days reading this long thread in the meantime.
The cable was delivered today.

I fully embrace the Bafang characteristic of setting the cadence, like cruise control.
I let it set a comfortable pace while I pedal with a level of force that's easy on my 62 y.o. knees.

After getting the (flawless Luna) cable set up and working, the first thing I played with was Throttle - End Voltage.
While still in Speed Mode, I found the highest value that still reaches full speed, to minimize throttle dead zone.
Later, I switched to Current Mode; level 9 available at the flick of the thumb is a game changer for city riding.

On the Basic tab I lowered current limit from 24 to 22A, out of caution
My go to level up to now was PAS 2; PAS 3 was a bit brisk unless the battery is run down some.
I picked PAS 3 to be where PAS 2 was.
PAS 2-8 now have Speed Limit values closely spaced, so I can fine tune cadence on hills and compensate for battery sag.
Before, PAS 5-8 were useless to me: cadence too fast; and I'd just go to 9 when I wanted some zip with the throttle.

I lowered Stop Delay from 25 to 10, which nearly eliminated the feel of run-on when I stop pedaling.
Settings updated 7/2/23:

pedal.gifthrottle.gifbasic.gifP1020072.jpg
 
Last edited:
I updated the previous post after making some tweaks.
I increased current limit numbers back to just below their original values, after trying some of the low recommendations, which made low end torque feel anemic.
 
Hi Dear Friend. I have prophete bike with BBS 01 + DP-C11 Has anyone been able to reflash the controller or display to remove the speed limit at 25 km / h? I put the magnet on the connecting rod and it didn't work. The display disables support and writes error 21
 
Is it possible to solder to the RX, TX, GND display and program the controller without turning off the display?
 
I am guessing this has been mentioned, but this is a huge thread, no way I am gonna read through it all!

Anyway, I just built my first ebike and opted for one of those eggrider displays because it is small. A nice feature it (and I am sure other displays) has is a dual mode setup. It allows for me to have two different profiles that I can switch between at the press of a button. This allows for me to avoid many of the compromises I see people making here. For example, my "off-road" profile is very "kepler-esque" in the sense that every PAS level is only limited by amperage, with 'keep current' at 100% and a designated throttle assist of 9 with 100% ... The 'road' profile is much like Matt from Empowered cycles, with speed limits on each PAS level, 'keep current' at 60 and the throttle followed PAS levels.

I'm new at this so I am still tweaking settings to my liking, but the ability to switch between setups on the fly is a really nice feature to consider investing in, especially if you find yourself constantly switching between different compromises.
 
I worked for a shop that sold them. I setup my eggrider and two days later I sent to an online pal freeze . Unimpressed!

More features and useful information with Grin displays.

They have wiring for a clean install of an electrical external controller.
 
I was getting quite frustrated with it myself at first. Mainly, the amperage limit is not always honored by the controller without power cycling. I got around that by keeping them the same (28a) on both profiles and adjusting the PAS levels on my "road" profile to maxing out at 70% of that on PAS9. The other issue was Bluetooth connection, but turning off battery management (Android) for that app makes it pretty reliable. I still need to set my cadence (speed) levels for that profile, but I need to wait until I get back down to LA for the 4th. There just isn't enough flat ground for me to test things up here in the mountains so I primarily just ride around with the exclusively amperage dictated offroad profile.

What was your experience, besides being unimpressed? I don't understand "online pal freeze" ...
 
Online friend. I sold 30-40. Most were happy, but many were disappointed when they had issues.

Farcebook has an EggRider page. Pretty helpful.
 
Yeah, I think most of the disappointment is generated from connection issues and trying to set amperage limits per profile ... Once that's figured out, the display works as advertised.
 
When a mountain bikes tire loses traction the BBOS2 motor stops.
Is there a setting that can keep the motor from stopping or at least help it from stopping as quickly.
 
Hi all, is it possible to change the speed limit when you have a DP-C10 display? Do I need a programming cable for this? I read here that it does not work for a DP-C11 but I want to try it with a DP-C10. FWIW, the password screen does not come up on my display. Can the DP-C10 itself be reprogrammed?
 
patrickw said:
Hi all, is it possible to change the speed limit when you have a DP-C10 display? Do I need a programming cable for this? I read here that it does not work for a DP-C11 but I want to try it with a DP-C10. FWIW, the password screen does not come up on my display. Can the DP-C10 itself be reprogrammed?

All available display settings will be found in the display manual. No program cable is needed. Cable is only needed for changes to the controller.
 
tomjasz said:
patrickw said:
Hi all, is it possible to change the speed limit when you have a DP-C10 display? Do I need a programming cable for this? I read here that it does not work for a DP-C11 but I want to try it with a DP-C10. FWIW, the password screen does not come up on my display. Can the DP-C10 itself be reprogrammed?

All available display settings will be found in the display manual. No program cable is needed. Cable is only needed for changes to the controller.

The display manual indeed mentions that the speed limit can be changed. But this screen is no longer accessible on the DP-C10, as I found out, and as many others on the web have also reported. So my original question remains: how can I change the speed limit? Can it be done by reprogramming the controller? For a DP-C11 display this seems not to work, as reported here https://endless-sphere.com/forums/viewtopic.php?t=58780&start=1150#p1516013 and here https://endless-sphere.com/forums/viewtopic.php?t=58780&start=1150#p1516285 But what if you have the DP-C10?
 
patrickw said:
So my original question remains: how can I change the speed limit? Can it be done by reprogramming the controller?
Perhaps you'll get a better response if you start a separate thread.
 
Back
Top