• Hello ES! We could use some help to get us past the finish line on building the new knowledgebase for the forum.
    Can you donate? Please see our fundraising page. Thank you!

CANable Pro & MMG340.250 Assist Levels (Parameter Block 1) not written correctly

Schauff

🔌 New-ish
Joined
Feb 5, 2026
Messages
20
Location
Germany
Hi I have tested the CANable Pro software
The read of Assist Levels (Parameter Block 1) was ok but after write it is not working ... to much power at all assist levels
So I think the offset of parameter block is wrong at the write command for my controller type CR R209.C 7.0 inside of MMG340.250


1784721117982.png



also if I use BafangGo+ App with DP C010.CN 1.0 nothing works with the assist level slider, read, change slider, write , read (changes ok) , no effect
I go back in afternoon to the varstrom tool that worked for me last time varstrom

for interested people I added the backup file *.json from canable pro and renamed ist to *.txt
you can restore it to view if the stick is present with no cable in canable pro
 

Attachments

  • 2026-07-21T17-02-04_canable_backup.txt
    7.1 KB · Views: 1
Last edited:
I go back in afternoon to the varstrom tool that worked for me last time varstrom
If you have both, the Canable and the Varstrom tool, it would be great, if you could sniff the traffic on the CAN bus when setting up the controller with the Varstrom tool. You can use the Cangaroo tool with the Canable for that.
If we know the proper commands, we can implement them for sure!
 
If you have both, the Canable and the Varstrom tool, it would be great, if you could sniff the traffic on the CAN bus when setting up the controller with the Varstrom tool. You can use the cangaroo tool with the Canable for that.
If we know the proper commands, we can implement them for sure!
Good idea, I can sniff the can bus with with Linux and cangaroo with my candlelight at the line on the display connector, but I have no inline cable for the varstrom usb can cable . The varstrom cable comes with an connector to motor controller.. so no display or better; the handle bar cable is not connected :-(
I need this expensive cable to run both usb can adapters, I have two notebooks windows and linux for the apps
...mhh ..I try to fix the bike first with varstrom app and the windows notebook...

one that is cheaper
 
The varstrom cable comes with an connector to motor controller
?! In this YouTube video it is connected to the display connector on the main harnish. So if you have the Canable with two connectors, you should be able to plug the Canable to the harnish and the Varstrom adapter to the Canable.

 
?! In this YouTube video it is connected to the display connector on the main harnish. So if you have the Canable with two connectors, you should be able to plug the Canable to the harnish and the Varstrom adapter to the Canable.

Thanks yes I remember its the green can display connector , so I need 2 green extend cables to build a second adapter to hook it on the bus. I will order soon.
 
No better I have a second green extend cable , i cut the varstrom connector off and solder the CAN L to the white and CAN H to green, but I am done if the cables from the varstrom connector have different colors. Is there a pin out picture in the www for the male can display connector ?
Or I use my working candlelight adapter and beep it out with a multimeter...
 
I have build CANgaroo successfully

1784732783927.png

Who knows the varstrom bit rate should be the same as the display bit rate

1784732905056.png
 

Attachments

  • 1784732715739.png
    1784732715739.png
    206.9 KB · Views: 0
Another option CAN protocol decoding via Wireshark
Another problem even as sudo ** (wireshark:81333) 17:22:22.161930 [Capture MESSAGE] -- Error message from child: "The capture session could not be initiated due to error getting information on pipe or socket: Permission denied."
Problem solved.. initialize and activate can0 to be visible for user on cmdline and setup and start wireshark for user .. capture can begin
 
Last edited:
Who knows the varstrom bit rate should be the same as the display bit rate
It's 250000 Bit/s

See here:

Perhaps, you could check the resistance/voltage on the orange wire also. The on/off display button pulls it down a bit, as far as I know, the BESST tool pulls it down to GND completely, perhaps the controller checks this for full write access.:unsure:
 
Last edited:
Good news the varstrom programming worked. Cause I didn't saved my file :-( I hat to copy the values from canablePro :)
The Display has 5 Levels here we have 9 and I didnt have the patience to figure out the valid ones so far

1784736727088.png
The cut off and restore voltage was also overwritten I set it to 28V and 31V and capacity is possibly not 21Ah and was set to 10Ah default.. I will continue if I build my cable ,, tomorrow first some testing on bike to work if it was fixed. ECO mode with 8A was not so drive-able

I have the delivery values saved so we can program them and do a dump on write with CANgroo or direct on the line by piping can0 to a file ... does any one know were I can find can0 from candlelight... its not like /dev/ttyACM0 or some thing

I will check if candump can0 > can_log.txt is doing the trick
 
Last edited:
It's 250000 Bit/s

See here:

Perhaps, you could check the resistance/voltage on the orange wire also. The on/off display button pulls it down a bit, as far as I know, the BESST tool pulls it down to GND completely, perhaps the controller checks this for full write access.:unsure:
I will check if its pulled down at the weekend
 
Does some one know how the reduction ratio is calculate ? I have 36/ 22 * Shimano Alfine 11.
RPM * 36/22 * Alfine = Bafang out * 1,636 * [0,527 - 2,153]
RPM * [0,862 - 3,522]
Torque / [0,862 - 3,522]
 
Last edited:
Thanks for the description link Bafang_M500_M600/CANBUS at main · OpenSourceEBike/Bafang_M500_M600

conParams_1GET/SET6011
conParams_2GET/SET6012
conParams_3GET/SET6013
conParams_4GET/SET6014
conParams_5GET/SET6015
conParams_6GET/SET6016
conParams_7GET/SET6017
conParams_8GET/SET6018

first read was done correctly ! why ? and why only 5 power stages ?
maybe I check next time after write what I got back by varstrom
we dump also the write than we can find out who is doing the activated Params overwrite first
are the arrays same size ? at varstrom we have additional accelleration parameter and so we have 9 data fields or power stages with 3x9 Byte ... this is not 2x9 Byte or 2x5 Byte !

does anyone knows where the array size is defined ?
no JTAG no memory map compare :-(
 
Last edited:
does anyone knows where the array size is defined ?
You can look into the source code of the Canable tool. There you can see, which parameter is saved in which block. But of course, we don't know, if the BAFANG firmware handles it the same way internally. The guys from the Fake Taxi project will know it best, as they have reverse engineered the original firmware. For a M820. Maybe the BBSxx firmware handles it completely different. There seem to be different, independend development teams at Bafang, it seems that they don't talk with each other ;)
 
You can look into the source code of the Canable tool. There you can see, which parameter is saved in which block. But of course, we don't know, if the BAFANG firmware handles it the same way internally. The guys from the Fake Taxi project will know it best, as they have reverse engineered the original firmware. For a M820. Maybe the BBSxx firmware handles it completely different. There seem to be different, independent development teams at Bafang, it seems that they don't talk with each other ;)
Thank you, I have a look at it. Another idea , cause I didn`t know each Bafang Motor / Controler. I think my BBS01 has no torque sensor and may that`s why we need the "I called it acceleration timer" to go for constant ampere. I can see that I have constant ampere when I am pedaling maybe this is done by torque sensor in M820 and then its a sensor input inside of the motor control loop.. no delay counter and then you have one parameter less in the motor mapping !
The bigger the company's the more people who know all first better and then if you have to turn on the crap they are away ;)
 
at varstrom we have additional accelleration parameter and so we have 9 data fields or power stages
Canable pro will show the stages which are set in the display, just like the original Bafang tool when using Besst Pro. your DPC010CN is in display settings probably set to 6 (yes 6 they include the "0"). My DPC010CN is set the same and hence canable pro shows 5 stages. If i connect another display which i can set to 9 then Canable pro shows 9 stages. When connected to canable pro set you DPC010CN to 4 and resync "limited assist" it should now show 3 stages instead of 5 if all is well.
In Varstrom tool you have indeed additional accelleration parameter.. For that in canable pro you just have to use the tab "full assist" and then you have even 1 more that Varstrom tool does not have... "assistance %" for each level. In the thread bafang canable pro master you can find the original settings BBS01B canbus 36V 250W hardware version 7.0
 
Cables are hooked together without cutting the varstrom connector. I cut my reserve display extender and hoked it to the candleight usb connector.. In the afternoon I am ready to capture frames with CANgaroo or wireshark ... thanks for help so far

1784801677490.png
 
Canable pro will show the stages which are set in the display, just like the original Bafang tool when using Besst Pro. your DPC010CN is in display settings probably set to 6 (yes 6 they include the "0"). My DPC010CN is set the same and hence canable pro shows 5 stages. If i connect another display which i can set to 9 then Canable pro shows 9 stages. When connected to canable pro set you DPC010CN to 4 and resync "limited assist" it should now show 3 stages instead of 5 if all is well.
In Varstrom tool you have indeed additional accelleration parameter.. For that in canable pro you just have to use the tab "full assist" and then you have even 1 more that Varstrom tool does not have... "assistance %" for each level. In the thread bafang canable pro master you can find the original settings BBS01B canbus 36V 250W hardware version 7.0
Thanks for help .. maybe I forget to sync the full assist tab, cause this tab was empty. I will try again in the late afternoon.
 
I don't know if at first you tried to change some parameters on the "controller tab"? It seemingly accepts it and possible a brief popup at the bottom something like "Ack ok". But you should have got on top of the page also a big banner saying "checksum mismatch"... If you don't click the "fix" button you normally then lose the "riding params" page in the DPC010CN display... Completely gone lol, see canable pro thread. (That warning banner, on my end i can not see it unless i scroll up).
 
But I only saved the changed controller tab because I want that to squeeze out the battery on a 100km tour. If cut off default at the varstrom values with 31 V the BMS show still 2 LEDs on rack battery ... by 5 LEDs that's still 40% .. I want cut off inside 1 LED window .. Of course I do on work or daily a battery between 80% and 20% but on tour I want to use the battery cell spec values ... 28V cut off is 3V above total minimum of 25V (most cells have this as minimum)
So looks like if you save controller tab only and do not sync Assist full something more is written to config area .. can I enable log to check whats written to config and share ?
Also calculated range is wrong with 10Ah battery default in controller want to change to 21Ah ... as I did last time only controller save read back after power on was ok.. so write works ! my battery has no CAN its the varstrom rack battery ..they correct cell types from LG Chem to china battery type now on the page Rear Rack Battery with Charger for E-Bike Conversion
LG was 5Ah and 40 are enough in 10S but the battery is too heavy so now maybe correct with 80 cells :)
Question is: why motor map was overwritten by controller save only ?
If you check my backup on top of the post on the default read of controller the assit (ltd) was read too !
Looks like more is written if you save only controller !
We have to analyze code before.. give me some private message input as C code Linux Kernel driver programmer I will may understand more about this programing by some hints ..I will help and can debug on CAN bus by my cable with CANgeroo too or wireshark on linux.. a saleae is also possible with CAN applet or Pulseview .. may the develloper of this great software can give a feedback
 
Last edited:
Looks ok if you like these settings. For assist level 1 to 5 the "acceleration", you have them all at 1. Standard setting was 2, 3, 3, 4, 4
I can't change a thing on the controller tab with canable pro, for example changing overvoltage from 47 to 46 seems to work but after "resync" it results in checksum error...
It was a long time ago sinds i used it but i played today with Varstrom tool too. I already had forgotten that Varstrom makes automatically a backup when reading from controller.
 
Back
Top