BBS-FW: Open Source Firmware for BBSHD/BBS02 Controller

1/ Yes, the cable works as before, so the official software tool will not work, just usethe tool provided in the .zip
2/ Try to find a PDF/specs sheet, in my case (750c), for example level 5 remaps lv1(controller)->2(display), lv3->2, lv5->3, lv7->4, lv9->5. If not, it may be 1->1, 2->2, 3->3... until the end of available levels on display. Just try-remake-try... and you should find sooner your better working mode
I'm not sure if I understand you so I'll rephrase:

1) My questions was not how to change setting after flashing the new Opensource firmware, my questions was how to flash the firmware in the first place to replace the original bafang. That there is a new tool used to change the controller setting is clear to me.

2) On my display it is not possible to change the ammount of PAS levels, it is fixed to 9 (there are different versions of the sw102). So that is my questions, if anyone knows what will happen, because my guess is the display does not know that the controller is limited to just 3 PAS?
 
I'm not sure if I understand you so I'll rephrase:

1) My questions was not how to change setting after flashing the new Opensource firmware, my questions was how to flash the firmware in the first place to replace the original bafang. That there is a new tool used to change the controller setting is clear to me.

2) On my display it is not possible to change the ammount of PAS levels, it is fixed to 9 (there are different versions of the sw102). So that is my questions, if anyone knows what will happen, because my guess is the display does not know that the controller is limited to just 3 PAS?
1/It's well explained in gitgub (keep in mind there's NO EASY ROLLBACK TO ORIGINAL FW): Flashing the Firmware

2/The display doesn't communicate with controller as well as it can be (is not as smarter that can read all levels you actually used and discard not used, in my opinion too basic for 2023 and even 2017, yep...), if you said your display is set for 9 levels and if you want just 3, you may only set 3 first levels by the tool and forget another 6 levels exists, or even better, set it with a different parameters (for example focusing to use over high speed on flat road -low cadence, high power- or "naked" mountain areas where is not convenient having too much power -high cadence, less power- or whatever circumstance you can wonder)
 
1/It's well explained in gitgub (keep in mind there's NO EASY ROLLBACK TO ORIGINAL FW): Flashing the Firmware

2/The display doesn't communicate with controller as well as it can be (is not as smarter that can read all levels you actually used and discard not used, in my opinion too basic for 2023 and even 2017, yep...), if you said your display is set for 9 levels and if you want just 3, you may only set 3 first levels by the tool and forget another 6 levels exists, or even better, set it with a different parameters (for example focusing to use over high speed on flat road -low cadence, high power- or "naked" mountain areas where is not convenient having too much power -high cadence, less power- or whatever circumstance you can wonder)
I cant really understand the issue with answering a question, the guide says "programing cable", my questions is: Is there a special cable or the same that you use for changing settings in the controller today?
 
I cant really understand the issue with answering a question, the guide says "programing cable", my questions is: Is there a special cable or the same that you use for changing settings in the controller today?
theres no special cable. its the normal program cable.
 
O.K. Don't know what I fixed but I copied some data from KB-79's xml and the error is gone! Now all I need to figure out is the speed settings.
Edit: I think I figured out the speed. The only thing I can't seem to do is get the default assist to start on 0. I flashed it and read it and it says 0. But when I turn it on it defaults to 1.

The PAS override throttle issue is GONE! My BBS02 started with [IAP15F2K61S2] now it has 1.3.1.
OK Joe, I got the same problem with PAS/throttle on a new install for friend. My old Luna BBS02B was perfect, and I dunno how anyone can ride the newer BBS02B. PAS 1 runs out of steam at 11 mph. Hit throttle and nothing happens til I drop under 9 mph. Go to PAS 2 and it repeats but at 14 mph. Jeez, it's unrideable

But if 1.3.1 works, gonna do it,
 
OK Joe, I got the same problem with PAS/throttle on a new install for friend. My old Luna BBS02B was perfect, and I dunno how anyone can ride the newer BBS02B. PAS 1 runs out of steam at 11 mph. Hit throttle and nothing happens til I drop under 9 mph. Go to PAS 2 and it repeats but at 14 mph. Jeez, it's unrideable

But if 1.3.1 works, gonna do it,
It solved my problem. I also uploaded the .xml I used in my post from Apr 12, 2023
 
I'm thinking about uploading this software to the fiancée's bike with BBS02b.
Does the shift sensor work well in 1.31 now?
What is the safe current for the BBS02b 48V?
 
Firmware 1.4.0 beta compiled from source:

New:
  • More options for switch normal/sport mode. You can now use light on+PAS 0-9 (not only PAS0), it also can be set braking at boot for starting in sports mode. Hope in the future we can use more advanced ways alike brake on boot + light in PASX, or light in PASX + light in PASY
Fixed:
  • In my BBS02 the 0% battery bug appears to be solved (same for BBSHD? I really don't know)

I've compiled this preliminary version (tested in about 100km without any throuble in my BBS02B).
 

Attachments

  • bbs-fw-1.4.0BETA.zip
    628.4 KB · Views: 24
Anyone had this problem before?

Flashed the latest version from github (and viriago's beta above) to a BBS02B (MCU STC15F2K60S2)- seems to work ok, motor spins, display works HOWEVER none of the assist levels seem to work - or more to the point there is no difference in any of them except if I select 0 then the motor is deactivated as expected. It seems to be just pegged at the 'start up' assist level. Tried with two displays (800s and C961) - same result.

Don't know if it's relevant, but the voltage shows as zero in the log.

Anyone any ideas?


Edits - looks to be the same problem as geofft - BBS-FW: Open Source Firmware for BBSHD/BBS02 Controller
 
Last edited:
Anyone had this problem before?

Flashed the latest version from github (and viriago's beta above) to a BBS02B (MCU STC15F2K60S2)- seems to work ok, motor spins, display works HOWEVER none of the assist levels seem to work - or more to the point there is no difference in any of them except if I select 0 then the motor is deactivated at all. It seems to be just pegged at the 'start up' assist level. Tried with two displays (800s and C961) - same result.

Don't know if it's relevant, but the voltage shows as zero in the log.

Anyone any ideas?


Edits - looks to be the same problem as geofft - BBS-FW: Open Source Firmware for BBSHD/BBS02 Controller

Yep, that sounds exactly like the outcome I had on my first flashing attempt. It's caused by a lack of communication between the controller and display, you've probably already seen the various messages regarding this starting from page 4 of this thread.

In my case the only cure was a replacement controller, which flashed with no issues. Hopefully you have better luck....:)
 
Yep, that sounds exactly like the outcome I had on my first flashing attempt. It's caused by a lack of communication between the controller and display, you've probably already seen the various messages regarding this starting from page 4 of this thread.

In my case the only cure was a replacement controller, which flashed with no issues. Hopefully you have better luck....:)
Which is weird because it is communicating with the display (ie there is a difference between pas 0 and the othe pas settings.

I have another bbso2 bike but I don't want to brick that too.
 
Which is weird because it is communicating with the display (ie there is a difference between pas 0 and the othe pas settings.

I have another bbso2 bike but I don't want to brick that too.
Just guessing here, but I think it's just the battery voltage which is not communicated (or it's being communicated as zero...) so the fw operates in lvc mode only.

I've a feeling that the answer to this issue is probably quite simple but lacking a developer brain I can't go any further with it...:(

I subsequently flashed Daniel's fw on both the new controller and an older one I have on another BBS02 bike, both worked no problem.
 
Anyone had this problem before?

Flashed the latest version from github (and viriago's beta above) to a BBS02B (MCU STC15F2K60S2)- seems to work ok, motor spins, display works HOWEVER none of the assist levels seem to work - or more to the point there is no difference in any of them except if I select 0 then the motor is deactivated as expected. It seems to be just pegged at the 'start up' assist level. Tried with two displays (800s and C961) - same result.

Don't know if it's relevant, but the voltage shows as zero in the log.

Anyone any ideas?


Edits - looks to be the same problem as geofft - BBS-FW: Open Source Firmware for BBSHD/BBS02 Controller
Not the same problem for me in my 750c display, it works well and I've not experienced anymore the 0v start bug or a momentary power loss. It may be necessary calibrate voltage with config tool (I've calibrated mine using display voltage read in full battery).

If it doesn't work after calibrating, try my V5 or V4 profile (set right voltages if your battery is not 48V) User profiles (BBS02B, BBSHD) for BBS-FW (Daniel Nilsson's Open Source Firmware)
 
Not the same problem for me in my 750c display, it works well and I've not experienced anymore the 0v start bug or a momentary power loss. It may be necessary calibrate voltage with config tool (I've calibrated mine using display voltage read in full battery).

If it doesn't work after calibrating, try my V5 or V4 profile (set right voltages if your battery is not 48V) User profiles (BBS02B, BBSHD) for BBS-FW (Daniel Nilsson's Open Source Firmware)
Yup. tried both of those.

It only shows 0v in the log in the config tool. Battery gauge on display is correct.
 
Update.

Controller isn't bricked - managed to install OEM firmware and it's working fine now.

Instructions for uploading OEM firmware and hex file are here - note using 18.462mhz as the clock frequency.
 
Update.

Controller isn't bricked - managed to install OEM firmware and it's working fine now.
Ah...good news.
Just wondered which OEM fw you used, all the versions I tried on my failed controller gave 'error 30' (comms error) after flashing. This is now making me wonder if I was using the correct clock frequency, I can't remember what setting I was using.
Do you have a link to the fw you used? - I've still got the misbehaving controller, I may have another attempt to revive this sometime...
 
Ah...good news.
Just wondered which OEM fw you used, all the versions I tried on my failed controller gave 'error 30' (comms error) after flashing. This is now making me wonder if I was using the correct clock frequency, I can't remember what setting I was using.
Do you have a link to the fw you used? - I've still got the misbehaving controller, I may have another attempt to revive this sometime...
Sorry, I thought I'd linked it. This is it.

 
I have a newly purchased BBS02B (May 2023); regular config tool works; but when I connect with STC, the MCU check just hangs.

It says

1684336977993.png

It just hangs
1684337121251.png

Any ideas?
 
Hello,
Thank you for this great work
I post a message because I have a problem with the size of the wheels: I cannot change the default of 28 inches. When I change the value and I do a "write" everything goes well. But when I redo a "read" afterwards, the 28 inches come back
Second thing, after turning off the screen, the controller sends a flash which turns on the lights for a fraction of a second, can we delete this?
I have a BBS02 750w
 
Replaced a controller on a BBSHD, Says error 10 overheat. No pedal assist. Thinking about trying to reflash this unit. I have a patch cord coming in. Gotta get the bike to the computer, download files, and possibly give this a try...
 
first time flashing i got error 5h, then i set the throttle start value to 1100(from stock 900), then the error disappeared. im running a cyc style thumb throttle btw, so anyone who isnt running a stock thumb throttle should try this
 
Back
Top