Programming the Bafang Middrive BBS01+BBS02

waynebergman said:
Has anyone heard of any Mac based solutions for Programming our Bafang controllers? I was given a PC that I was only going to use for reprogramming my controller but that PC laptop just quit working. I really dont want to buy a PC just for this purpose if I can somehow use my Mac for the job. Also, I am not interested in running the virtual PC options on my Mac.


Ive been finally playing with a switcheroonie, very cool, can upload, download and store several versions.
 
FWIW It looks like I can use the BaFang config tool in free Mint Linux (Cinnamon and KDE desktops) with the free Wine emulator.

Will check soon - am waiting on a replacement battery charger.

That allows me to run my old netbook that someone gave me without looking for a Windows machine to use to program my BBSHD.
 
Hello everybody. i have bbs02b 750 watt motor. i want to make usb programmable cable. i bought PL2303 TTL USB converter.But my display connection tipe is HIGO-B3 (https://www.e-bike-technologies.de/index.php/en/connectors/higo/higo-mini-b-connectors/higo-b3-detail this one it has 3 pins)i think it doesnt have pl p+ .Anyone knows about how must it be connect to cables?
 
Thunderass said:
Hello everybody. i have bbs02b 750 watt motor. i want to make usb programmable cable. i bought PL2303 TTL USB converter.But my display connection tipe is HIGO-B3 (https://www.e-bike-technologies.de/index.php/en/connectors/higo/higo-mini-b-connectors/higo-b3-detail this one it has 3 pins)i think it doesnt have pl p+ .Anyone knows about how must it be connect to cables?

Review this thread and post.
https://endless-sphere.com/forums/viewtopic.php?f=28&t=58780&hilit=pexio&start=275#p915172
You should be connecting to the green Higo. To controller.
 
tomjasz said:
Thunderass said:
Hello everybody. i have bbs02b 750 watt motor. i want to make usb programmable cable. i bought PL2303 TTL USB converter.But my display connection tipe is HIGO-B3 (https://www.e-bike-technologies.de/index.php/en/connectors/higo/higo-mini-b-connectors/higo-b3-detail this one it has 3 pins)i think it doesnt have pl p+ .Anyone knows about how must it be connect to cables?

Review this thread and post.
https://endless-sphere.com/forums/viewtopic.php?f=28&t=58780&hilit=pexio&start=275#p915172
You should be connecting to the green Higo. To controller.

Thanks for your helping.i succesfully plug with hand made cable to motor.
These are my settings.
C.jpg


i have questions if you help me i ll appreciate.
1-After flash these settings my throttle was limited by speed.(40 km/s)Before throttle doesnt have speed limit.And i didnt any backup before flashing:(
2-Sometimes if i pedalling to backward ,motor is shaking .Generally on low speeds.
How can i fix these.

i fixed...
 
teslanv said:
ziltoid81 said:
Got the same interface like yours, but still to dumb to get a connection......3 wires to the Interface (gnd, rx, tx), switched rx and tx, shortened pl and p+ on the controllerplug to the motor/controller.
Connect battery and hit the connect button.....the same happens every time.

Always get an "error opening serial port" either the cables are connected or not.
The interface is showing a red light all the time and when i disconned the battery from the motor, a blue led light up for 2-3seconds(on the interface).

I ordered another interface, but now i see yours the same....
You dont get all the actions to work, but at least you got a connection
Maybe i should solder my wiring again.
Dont know where to start again.....

Do i need to setup the interface via windows?
Just installed the driver for the interface and opened the bafang software.
The interface is properly listed, without any warnings, in the device manager.

You will need to enter the COMM port ID in the software. Look for the Breakout Board hardware in the "Ports" Section of the Device Manager. Mine Was identified as "COM7"

Then, in the controllerst software, type in COM7 (or whatever port yours is) - The software should then be able to communicate with your PC.

BBS02sw_zps4e732918.jpg


Click "Connect" and you should be up and running.

My experience is that it won't connect to any port other than Com 1-4.
If it tries to designate the programming cable to any other port, you have to change the number to 1-4 whichever one is free.
 
Hi everyone,

I read a lot on this valuable topic (but could not read all messages in detail, I must admit).

I am considering to program by myself my BBS02, but I'm quite surprised by one thing : in the different assist levels description, I can read "Asst1 Limit Current(%): 52/20/52/10/52 – Power cut based on road speed at power level 1."

Did anyone confirm that the parameter "Limit Current" is really a "road speed limit" ? This would mean that the parameter name is totally wrong...

Thank you very much for your help
 
gbetous said:
Hi everyone,

I read a lot on this valuable topic (but could not read all messages in detail, I must admit).

I am considering to program by myself my BBS02, but I'm quite surprised by one thing : in the different assist levels description, I can read "Asst1 Limit Current(%): 52/20/52/10/52 – Power cut based on road speed at power level 1."

Did anyone confirm that the parameter "Limit Current" is really a "road speed limit" ? This would mean that the parameter name is totally wrong...

Thank you very much for your help
No, the name and function of 'Limit Current(%)' is correct. On my BBS02, I have found the best settings for me are to set 'Limit Current(%)' all to 100% and I set the 'Limit Spd(%) to match the gear ratios of my cassette using 5 PAS levels. Therefore, I can go slowly up steep hills and across difficult terrain (PAS 1), but with maximum torque. I can also ramp up the speed and maintain that speed by selecting a higher PAS level (PAS 5)

Oh, and max the 'Keep Current(%)' to 100%, you'll get much better hill climbing performance.
 
dunno if this is the right topic, but can i use the programming cable and software to program a frontwheel motor: BF FM G320.250 instead of the middrive BBS01 or BBS02 ?

any advice would be appreciated!


thx,
 
cluletrecl said:
dunno if this is the right topic, but can i use the programming cable and software to program a frontwheel motor: BF FM G320.250 instead of the middrive BBS01 or BBS02 ?
The programming lead and software programs the controller, so the motor is less important. All the Bafang programming cables I've seen come with the green 5 pin Higo connector. Also, the programming software doesn't appear to be BBS01, BBS02 or BBSHD specific.

Therefore, If your controller happens to connect to the display using a green 5 pin Higo connector, then I see no reason why the controller can't be programmed in the same way as the BBSxx series.
 
alfantastic said:
cluletrecl said:
dunno if this is the right topic, but can i use the programming cable and software to program a frontwheel motor: BF FM G320.250 instead of the middrive BBS01 or BBS02 ?
The programming lead and software programs the controller, so the motor is less important. All the Bafang programming cables I've seen come with the green 5 pin Higo connector. Also, the programming software doesn't appear to be BBS01, BBS02 or BBSHD specific.

Therefore, If your controller happens to connect to the display using a green 5 pin Higo connector, then I see no reason why the controller can't be programmed in the same way as the BBSxx series.

after reading this positive news, so the other day i bought the cable online, Installed the drivers of the cable and the software, and it worked, I could connect the software with the controller, and change the parameters, i've tried to set it to 40 km/h, however it only could go 30km/h (gps speed tested), I tried a lot of parameters, but 30km/h was the limit (before it was 25km/h) , it seems like there is still some (hardware?) limit to 30 km/h. Next few days will try other settings.

The motor itself is rated 250W, i suppose it is nominal power, @30km/h it is consuming 200-280W, so guess there won't be any margin left to go faster than that (air resistance is quadratic to speed). But I'm okay with 30 km/h .
 
Thanks for the hard work the originals put in on this thread. Particularly Kepler, who's Strava records I'm now trying to break with his own settings. :lol:

Thought I'd share this;
I've started tweaking the settings, using Kepler's as a starting point.
Yesterday I found that by reducing the slow start mode from 6 to 4, resulted in being limited to a very low speed ~5kph (despite all my speed limits being set to 40kph).

Quite annoying since I'd changed a few other settings simultaneously, but by process of elimination it was this setting that was the culprit.
Haven't tried three or five because I needed the bike to work and didn't have time to play.

Also noticed that the controller didn't like the current limit set to 17. When I'd write these settings, and then read again, factory settings were restored every time. 16 and 18 worked fine for me.

Such a quirky thing! Will be changing one variable at a time from now on.
Cheers!
 
I have a simpel Bafang "display" without lcd just led-lights showing assist level (DP E10.UART). I have 5 level of assist on the display, which level equals the 9 assist levels in the program? Is it possible to set the top level of assist to level 4 on the display and leave the level 5 to a "legal" assist level, maybe 50% assist?
 
I have tried fruitlessly to set my wheel diameter to 19" in the cfg file but the firmware seems to ignore that cfg setting, using the display setting instead. The display setting jumps 2" which gives an up to 5% error which is my case.

Am I doing something wrong or is the config value always ignored?
 
Hi there,

A little update.

I have upgraded the Software Programming Tool, starting from the S. Penoff amazing version he did ( so much thanks for his work)
Lot of improvments are now available, with a included help for each parameters, additional infos, bugs corrections, full multi language (available today : english french) translation. A easy system is set up to add any additional languages for who wants to contribute, by adding your own txt files in the "Languages" directory. (see readme.txt included
The included help is of course based on the electricbike wellknown reference
This new software has been successfully tested by a little communauty from France. All sources file are included of course.

Download link (V2.2a) and release history (in french, chapter 12 at bottom page, use the translate widget on the right) and future new versions here::
https://blitip.blogspot.com/2019/04/logiciel-de-configuration-bafang-bbs.html


Any comments or suggestions will be welcome :D


Enjoy !
Laurent
 
lolo.31 said:
Hi there,

A little update.

I have upgraded the Software Programming Tool, starting from the S. Penoff amazing version he did ( so much thanks for his work)
Lot of improvments are now available, with a included help for each parameters, additional infos, bugs corrections, full multi language (available today : english french) translation. A easy system is set up to add any additional languages for who wants to contribute, by adding your own txt files in the "Languages" directory. (see readme.txt included
The included help is of course based on the electricbike wellknown reference
This new software has been successfully tested by a little communauty from France. All sources file are included of course.

Download link (V2.2a) :
https://www.dropbox.com/s/jqpy0l9d2pn1a61/BafangConfigToolV22a.zip?dl=0


Release history (in french, chrpter 12 at bottom page) and future new versions here:
http://cyclurba.fr/velos/3584/conversion-d-un-vtt-orbea-sate-vn-lotaff.html

Any comments or suggestions will be welcome :D


Enjoy !
Laurent

Awesome! Can you please make a version with the torque tab settings for the Ultra Max?
 
Hi,
Recently I bought a city e-bike for my wife with e-novation engine=BBS01.
I really want to config it- but I spent half of day yesterday and WHOLE day today...with no success:(

I bought Prolific PL2303 interface- which I have read that is fake, but I downloaded a few drivers and 2/3 makes it appear correctly. Unfortunately programming tool don't want to connect (it recognize COM port)- everything is greyed out and no controller info. I believe I've done everything correct, like smbdy wrote (with no response) connected GND, RX to TX (initially I did it opposite- could I fry smthing?), shortened P+ with PL, started battery, speed sensor lights up. Prolific initally light red (power) LED and blue (read I think), when I turn on battery only red stays on.
I have checked with multimeter GND to RX and TX (they give about 4.7v and 3.8v).

I have tried with a couple of drivers, on laptop (win 10), PC (win 10) and PC win 7.

I run out of ideas.

Could you please help?
Thanks
 
When I connect, the buttons are greyed out unless I connect it to the motor cable. So if your buttons remain grey then I am guessing there is no comms between the motor and the module.

If your display unit still works correctly when you connect it to the motor, then you haven't damaged anything.
 
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
 
Hi, I programmed my BBS01B motor from 18Amp to 20Amp max (using 36v battery).
I use motor purely in PAS mode (full assistance mode most of the time) and I am alwyas trying to pedal hard between 40-70rpm, depends on terrain.
Do you think I could damage gears or something else in motor in the long run ? Does latest version of 20amp controller of BBS01 has some temperature protection ?
 
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
 
It’s not a great motor to increase amps. BBS01B May be more forgiving, but if it’s an early version it’s a mistake. Regardless these are not motors suited for pushing. Besides the speed gain is marginal. Added stress could over heat an already somewhat heat sensitive motor. Willy billy programing toasts controllers.

Then again, there are ways... https://endless-sphere.com/forums/viewtopic.php?f=28&t=94022
 
wr75 said:
Awesome! Can you please make a version with the torque tab settings for the Ultra Max?


Hello wr75

Sorry for my answer delay, I didn't seen your post
I'm not sure that Ultra Max uses the same serial protocol parameters, and I don't have an Ultra Max to test them.. so...

I plan a new update to correct some minor bugs. Don't hesitate to send me questions/suggestions or functionality request, if it is possible, it will be a pleasure for me to add your requests into the Software

Please note that software is now available on my blog :
https://blitip.blogspot.com/

As it is in french, you can use the Translate widget on the right of the page
 
Hi BotoXbz
Sorry for the bit late reply, but I just want to say thank you. The script is working!
The SW (or maybe the HW) is very buggy, I have to do multiple reads before you get a successful reply. But all in all it works.

:bigthumb:
 
When I set invalid parameter in the bafang tool and I will save it - whole 'profile' is not saved into controller but original setting of controller is somehow lost (e.g. changing max amps from 20A to 19A is not possible, only 18A is possible to save). I had to start from beginning (to set again all assist levels etc...). I that well known issue or just my incompetence ?
 
Back
Top