Bafang M500/M600 thread

bikelpl said:
Tricky said:
Awesome work thanks, I have the M600 and Besst tool but I am missing a couple of steps to try this out.
1. Do I need to import vue along with simplejson and socket server?
2. Where do I place the statement v-if="userName.indexOf('fqc') > -1"
Alternatively could you provide an updated login bypass

No, you don't need anything of that.

You just need to login with "user-fqc" to BESST software (with loginbypass.py running in background)
but first in loginbypass.py in line no 20 you have to change 'id': from 25 to 1340
so the whole line no 20 in loginbypass.py will look like:
Code:
userdata = json.dumps( {'code':0,'data':{'account_type':[1,2,3,6,7],'user':{'status':6,'org': {'id': 1340, 'type': 6}},'token':123}} )
thats all

Ok tried that, logs in fine but no write button.
Tried on version 1.2.26 & 1.2.23 with no luck
User name: user-fqc
Password: ? - any suggestions
 
Hello builders.

www.fb.com/K1eBikes presents portable and simple K1 CAN Monitor - no need computer. Works ONLY with Bafang motors with CAN bus (green connector to display with "house" shape connector - M300, M400, M420, M500, M510, M600, M615, M620, M800). Rechargable battery (works cca 8h on one charge, or can be run also from USBC).

Idea was to monitor motor temperature, then I have added also other monitor parameters: Speed, Energy consumption per km, Voltage, Current, Power, Used energy over coulomb counter (SOC should be more accurate), Temperature of stator windings and controller. Also can setup max assistance speed, wheel size and circumference.

If you interested send an email to CanMon@K1eBikes.sk - specify which country you want to ship. Then I will reply you with information and details email. First 2 email orders to be shipped now. Next production batch will be in 1 month - please be patient, I am building it by hand and will manage according demand. Price: 120 Eur + Shipping (will keep shipping as low as possible).

K1 CAN Monitor is determined for testing purpose only. One disadvantage - small buttons - you can get used to it. ;)

https://youtu.be/6z3TzEqNWsQ
 

Attachments

  • 5 K1 CAN.jpg
    5 K1 CAN.jpg
    2.8 MB · Views: 1,653
  • Programming screen.jpg
    Programming screen.jpg
    2 MB · Views: 1,653
  • On Bike.jpg
    On Bike.jpg
    2 MB · Views: 1,653
Can it be used simultenausly with standard display?
I mean - to have it always connected, to be able to change speed limit.
 
Yes, works only with a display - you need to turn on motor with display.

Next version maybe will be working also without display and power from controller.
 
DaDo.Bzz said:
Yes, works only with a display - you need to turn on motor with display.

Next version maybe will be working also without display and power from controller.

The thing that may be mostly useful would be the 'speedbox' alternative, that is:
- set the speed limit to max, and is enabling a throttle, at button push
- start ebike with disabled throttle and speed limit set to 25 or 32 (eu or us)

That would require the in and out plug for a throttle of course. Even display is not necessary, and cost may be lower. Just 'offroad mode' module.
Technically its known how to do it, even with throttle (just signal cut by button), but someone need to do it and put on the market. If you do it something like that - i think here and on emtb forum is a nice niche for it.
 
Thats not a problem. Yes, another connectors to throttle, if theres no some can code to disable throttle over software.

And can be glued to inside in head space and activated/deactivated by magnet on keychain.
 
CiDi said:
To configure the Bafang M500 / M600 motor without using the BESST programmer, you can use this interface.

Link interface USB to CAN on Amazon:
https://www.amazon.co.uk/USB-Converter-Module-Raspberry-Zero/dp/B07Q812QK8/ref=sr_1_2?dchild=1&keywords=usb+to+can+innomaker&qid=1604409709&sr=8-2

Link cables Bafang HMI M500/M600 on e-bike-technologies:
https://www.e-bike-technologies.de/index.php/en/connectors/connectors-signal/connectors-higo-mini-f-series/higo-b5-f-detail
https://www.e-bike-technologies.de/index.php/en/connectors/connectors-signal/connectors-higo-mini-f-series/higo-s5-f-detail

Below are the software and the instructions for configuration and use.

I manage to connect CAN adapter to my ebike with bafang motor and change speed limit from 25 to 60km/h. When I tried to drive, motor only support up to 32km/h with full power and then only with very reduced ca.5% power. I guess speed/current settings must be changed accordingly. Does anybody know how to adjust speed/current curve via innomaker?
 
Tricky said:
Ok tried that, logs in fine but no write button.
Tried on version 1.2.26 & 1.2.23 with no luck
User name: user-fqc
Password: ? - any suggestions

Ok, so you also have to select"Remember me" ;) Only then the username is stored and then can be checked.
Sorry for confusion.
 

Attachments

  • fqc.jpg
    fqc.jpg
    18.9 KB · Views: 1,631
DaDo.Bzz said:
Hello builders.

www.fb.com/K1eBikes presents portable and simple K1 CAN Monitor - no need computer. Works ONLY with Bafang motors with CAN bus (green connector to display with "house" shape connector - M300, M400, M420, M500, M510, M600, M615, M620, M800). Rechargable battery (works cca 8h on one charge, or can be run also from USBC).

Idea was to monitor motor temperature, then I have added also other monitor parameters: Speed, Energy consumption per km, Voltage, Current, Power, Used energy over coulomb counter (SOC should be more accurate), Temperature of stator windings and controller. Also can setup max assistance speed, wheel size and circumference.

If you interested send an email to CanMon@K1eBikes.sk - specify which country you want to ship. Then I will reply you with information and details email. First 2 email orders to be shipped now. Next production batch will be in 1 month - please be patient, I am building it by hand and will manage according demand. Price: 120 Eur + Shipping (will keep shipping as low as possible).

K1 CAN Monitor is determined for testing purpose only. One disadvantage - small buttons - you can get used to it. ;)

https://youtu.be/6z3TzEqNWsQ

Hello DaDo.Bzz
very nice and interesting your motor display
Bafang M .... CAN bus.
I have a bafang M600 motor installed by me and a friend of mine
on a GT Fury chassis.
If I understand correctly it is possible to change speed, wheel diameter,
and wheel circumference.
I ask you, once you have made the changes you can uninstall your display
and the changes remain stored.
In your opinion it can also work with a third-party display
not bafang to understand.
Does your display replace the Bafang display?
I ask you this question because I have replaced the original display with a larger one because my vision is poor.
Good job
I queue up for an upcoming production display.

hello Luigi
 
DaDo.Bzz said:
Thats not a problem. Yes, another connectors to throttle, if theres no some can code to disable throttle over software.

And can be glued to inside in head space and activated/deactivated by magnet on keychain.

There is no command on CAN to disable throttle, so connectors are necessary. The box need to be 'a man in the middle' for a throttle.

The point is to have it always 'legal' when you turn on the bike.
When the bike 'is turned ON' the box shall also put the bike into the 'legal' mode, because in case of accident, when for example a car hit the biker, and someone else turn on the bike - it need to be 'legal'

Box need to have a one button for easy switch legal/offroad mode during a ride, only on biker demand, manually, each time after turning on the bike
 
Hello Luigi, yes, it can change speed, wheel and circumference and it will stay programmed in controller.

It is not a replacement of Bafang dispaly as it is not waterproof.
Dont understand what u mean by non Bafang displays. It works with every Bafang CAN bus motors.
 
Kyokushin said:
DaDo.Bzz said:
Thats not a problem. Yes, another connectors to throttle, if theres no some can code to disable throttle over software.

And can be glued to inside in head space and activated/deactivated by magnet on keychain.

There is no command on CAN to disable throttle, so connectors are necessary. The box need to be 'a man in the middle' for a throttle.

The point is to have it always 'legal' when you turn on the bike.
When the bike 'is turned ON' the box shall also put the bike into the 'legal' mode, because in case of accident, when for example a car hit the biker, and someone else turn on the bike - it need to be 'legal'

Box need to have a one button for easy switch legal/offroad mode during a ride, only on biker demand, manually, each time after turning on the bike

I undertsand, just find it as a bad solution, when it is outside and theres button on it. Better to hide it and turn on with magnet keychain.
 
DaDo.Bzz said:
Hello builders.

www.fb.com/K1eBikes presents portable and simple K1 CAN Monitor - no need computer.

https://youtu.be/6z3TzEqNWsQ
Hi Dado.

Nice builds! I could understand that you have a shop that builds EBikes based on Bafang M500/M600. Your display is similar to our OpenSource EasyDIY display, but I guess your does not have the ANT+ LEV EBike and Garmin Edge page change. Even if your display is not OpenSource, I hope we can collaborate and at least share information - most probably you already used our work at: https://github.com/OpenSourceEBike/Bafang_M500_M600


Would you like to also build and sell our OpenSource EasyDIY display?? You know, electronics on cycling are very expensive but nice piece of technology - for instance, I saw your video where you use the SRAM electronics gears, and for what I could understand, that SRAM electronic gears has ANT also!! Myself, I plan to use instead the Shimano electronic gears, that also has ANT.

Your video where you use the SRAM electronics gears:
[youtube]NniumV5gH0s[/youtube]
 
Trying to get BESST software and loginbypass.py set up. I've run through all the steps to set up python, json, update hosts file, etc. When I run the loginbypass.py, it comes back with:

Code:
Traceback (most recent call last):
  File "C:\Users\Me\Ebike\loginbypass.py", line 46, in <module>
    run()
  File "C:\Users\Me\Ebike\loginbypass.py", line 40, in run
    httpd = socketserver.TCPServer(("", port), handler_class)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 452, in __init__
    self.server_bind()
  File "C:\Users\Me\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

Looking for this error on line, seems like there were some references to not being able to access port 80. If I change port 80 to most any other port... 81, 1000, 7000, 7777, etc, then loginbypass does seem to run and I get to the

Code:
test.api.besst.bafang-service.com forwards to 139.196.174.48
Starting httpd...

...but then BESST says it unable to connect to the remote service. I tried once with my firewall completely off to make sure I wasn't blocking anything there and still had the same issues.

Any thoughts on what could be wrong?
 
4πr^2 said:
Looking for this error on line, seems like there were some references to not being able to access port 80. If I change port 80 to most any other port... 81, 1000, 7000, 7777,

The port has to be 80 otherwise, it will not work.

If the server doesn't want to start on port 80, then you have to search for the root cause and fix it.
 
DaDo.Bzz said:
Kyokushin said:
DaDo.Bzz said:
Thats not a problem. Yes, another connectors to throttle, if theres no some can code to disable throttle over software.

And can be glued to inside in head space and activated/deactivated by magnet on keychain.

There is no command on CAN to disable throttle, so connectors are necessary. The box need to be 'a man in the middle' for a throttle.

The point is to have it always 'legal' when you turn on the bike.
When the bike 'is turned ON' the box shall also put the bike into the 'legal' mode, because in case of accident, when for example a car hit the biker, and someone else turn on the bike - it need to be 'legal'

Box need to have a one button for easy switch legal/offroad mode during a ride, only on biker demand, manually, each time after turning on the bike

I undertsand, just find it as a bad solution, when it is outside and theres button on it. Better to hide it and turn on with magnet keychain.

Ok, its also sounds good 👍
Its also always need to start in „legal”, even with key/magnet, because for example a cyclist may not be able to remove magnet after crash.
 
bikelpl said:
4πr^2 said:
Looking for this error on line, seems like there were some references to not being able to access port 80. If I change port 80 to most any other port... 81, 1000, 7000, 7777,

The port has to be 80 otherwise, it will not work.

If the server doesn't want to start on port 80, then you have to search for the root cause and fix it.

Thanks for the feedback! Think I may have found the issue. Based on the last post here: https://stackoverflow.com/questions/51709854/oserror-winerror-10013-an-attempt-was-made-to-access-a-socket-in-a-way-forbid

I ultimately sent "NET stop HTTP" from an admin command prompt window and it killed off 3-4 services which seemed to be 'listening' on port 80. Tried to re-run loginbypass, then it worked. So the issue seems to be resolved here. Possibly a print spooler and other services all running on port 80 meant it was blocked for this.

Not sure if a command like that could be issued within the loginbypass script or not. It would make the script more robust to clear port 80 first, but since that seems to be an elevated admin level command, and I seem to be the only one with a network printer, maybe not worth the hassle. :)

Now - on to the next issue: I don't really see that entire list of parameters. Possibly I need to have BESST tool hooked up or load up a firmware file?
 
4πr^2 said:
Now - on to the next issue: I don't really see that entire list of parameters. Possibly I need to have BESST tool hooked up or load up a firmware file?

Yes, the list of all parameters should show up when there is CAN connection with besst tool / motor (and when there is org.id = 1340 in loginbypass.py).
I'm assuming that because there is a logical condition to show this list that looks like: "if isCan connection, then show the list".

In my screenshots, as I don't have besst tool, I forced this list to show by removing this logical condition in the source code, so the list always shows.
 
DaDo.Bzz said:
Hello Luigi, yes, it can change speed, wheel and circumference and it will stay programmed in controller.

It is not a replacement of Bafang dispaly as it is not waterproof.
Dont understand what u mean by non Bafang displays. It works with every Bafang CAN bus motors.

Hi DaDo
If I understand, your display works paired with the Bafang display,
or I change the parameters, unplug it and continue to use only the Bafang dysplay.
I have mounted this larger dysplay 860C
 
bikelpl said:
Tricky said:
Ok tried that, logs in fine but no write button.
Tried on version 1.2.26 & 1.2.23 with no luck
User name: user-fqc
Password: ? - any suggestions

Ok, so you also have to select"Remember me" ;) Only then the username is stored and then can be checked.
Sorry for confusion.
Yes! This worked for login. So when I select controller I get the basic parameter screen with write button (Besst unplugged). Then when I plug the Besst tool in it goes straight to the full parameter list. I’m unsure of these settings. It would be nice if it just stayed on the basic parameter screen to change max current and speed. I can’t see where max current is changed once it goes to the full parameter list.
 

Attachments

  • 41D64A9E-EC89-4359-8796-7C6E570654ED.jpeg
    41D64A9E-EC89-4359-8796-7C6E570654ED.jpeg
    1.4 MB · Views: 1,517
  • CF7C59BC-2E74-4FA4-B9B8-7A150C1667E9.jpeg
    CF7C59BC-2E74-4FA4-B9B8-7A150C1667E9.jpeg
    1.5 MB · Views: 1,516
bikelpl said:
I've changed the translation from Chinese to English in every section to be more readable:

Please tell me if this is useful to anybody? Or this is already well known?

All already known and documented on GitHub.

https://github.com/OpenSourceEBike/Bafang_M500_M600/blob/main/BESST%20Parameter%206011-6012-6017-6018.md
 
If you guys want a fast way to chat for development, use this Telegram channel that is specifically for M500/M600 development: https://t.me/bafang_m500_m600_development
 
Sandur-Rx said:
Animalector said:
Has anyone described the process to actually calibrate the torque sensor (like hang a 1kg mass from the pedal?)

I’m wondering the same thing

@sandur-Rx
I've PM'ed you back. (though not sure if it gets through as it stays in 'Outbox' folder)
 
Today I had a BIG issue with my Bafang M500, while riding on mountains with a 680Wh battery pack, when I had about 36%, the motor start to reduce a LOT the power, outputing only like 100W instead of the 500W. First I thought it could be the motor temperature, and I saw on the display it was 50ºC. Then I wait for 45 minutes until it was like 30ºC but still, the motor outputting only low power.

Here is the discharge graph of the battery, that was recorded by my Garmin Edge - as you can see, at the end I tried to use the max power assist level of 7 / 9:



At 31% remaining as seen on the graph, the battery voltage was 46.8V, so around 3.6V per cell.

Since I had a few more step hills ahead, and I was already very tired after riding for 5h, I was forced to stop and ask for help of event organization to come get me.

Anyone knows what this is happening??
 
Back
Top