Page 15 of 17

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Dec 09 2019 4:04am
by casainho
gatorsean wrote:
Dec 09 2019 1:50am
I am trying to get throttle working on the SW102 and noticed in configscreen.c in the define section for SW102, there is only two options for the ADC (temp sensor or off):
Line 80:
FIELD_EDITABLE_ENUM("Feature", &l3_vars.ui8_temperature_limit_feature_enabled, "disable", "enable"), // FIXME, share one array of disable/enable strings

Is there some reason we cannot have all three options like 850C?
Lin 204:
FIELD_EDITABLE_ENUM("Feature", &l3_vars.ui8_temperature_limit_feature_enabled, "disable", "temperature", "throttle"), // FIXME, share one array of disable/enable strings

Thanks for any tips!
Yes, that is the issue. We need to find a way to use the same code for both displays to avoid this issues.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Dec 28 2019 6:45am
by Cbisbaf
some pictures I did with my soldering microscope while I was breaking my sw102 sadly lifted the pad and now it wont do a thing :lol: :lol: odd though as I was only at 270 on my soldering station.might try magnet wire on the trace

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Dec 28 2019 6:49am
by Cbisbaf
some more

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Dec 28 2019 8:02am
by casainho
Nice details :-)

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 05 2020 2:06am
by gatorsean
Once I have compiled an SW102 FW with some modifications, how do I create the zip file for ota update? I found info on the "nrfutil pkg generate" command, but I am not sure I know how to set the options for this.

Any help documenting this step would be greatly appreciated!

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 12 2020 6:31am
by stefkrger
I just did some first test rides on my TSDZ2 + SW102. Works great so far. However when I start pedaling from standing still I need around half a crank rotation until motor power kicks in. Is that normal? I thought the TSDZ2 would kick in immediatelly. Is there any setting I can use to influence that behavior?

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 12 2020 11:56pm
by windburner
stefkrger wrote:
Jan 12 2020 6:31am
I just did some first test rides on my TSDZ2 + SW102. Works great so far. However when I start pedaling from standing still I need around half a crank rotation until motor power kicks in. Is that normal? I thought the TSDZ2 would kick in immediatelly. Is there any setting I can use to influence that behavior?
Yes, it is normal and it is one of my complaints of the v0.19.0 TSDZ2 firmware, which I understand will be different in the next version which is not yet supported for the SW-102. You can change this by locating and enabling "Motor assist", but, be careful, as with this setting, the weight of the foot on the pedal can/will activate assist. I turned it off after a few minutes, as I am on a recumbent trike and the feet naturally rest on the pedals when idle, and I had a couple of (fortunately safe) surprise activations.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 15 2020 2:23am
by stefkrger
So is it correct that the development for SW102 support is currently on hold?

Who was the main contributer? geeksvile?
He has not made a commit since early November and not posted here either. Did he mention somewhere that he has left the project?

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 15 2020 5:26am
by obcd
https://github.com/OpenSource-EBike-fir ... -540186577

This might answer some of your questions.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 16 2020 8:30am
by Nfer
I was waiting for the SW102 flash with the phone update but it seems it is not going to happen soon. So I was thinking on giving a second try to the solderless method with a second display. But I have some questions:

1. Is it the current SW102 firmware stable and usable?
2. Is there anyone using the firmware and display for everyday commuting?
3. Where is the SW102 firmware file located?
4. Right now my motor is flashed with V0.19 using marcoq configurator. Do I have to flash it again with a base V0.19?

Thanks

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 16 2020 4:10pm
by hefest
Second sw102 I ordered after frying the first, finally arrived after.
Successfully flashed as it seems "motor simulator" mode is running.
When I press the M button configuration menu appears but it disappears as soon as I release the M button.
So the configuration menu is visible only while I hold the M button. Is this normal or my unit is faulty?

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 17 2020 3:44pm
by Nfer
bikelpl wrote:
Nov 11 2019 4:02am
Info screen 2 has only once entered the configuration mode for me.
I have the same.

I also noticed that, when You press M button and return to main screen , the assist level digit dissapears.
You have to press ^ or v button to change .

Image
It is an known issue

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 23 2020 10:26am
by Nfer
Finished the SW102 installation with 0.19.17 display firmware and 0.19 motor version. Previously I used the VLCD5 marcoq firmware.

SW102 is nice and small, a little bit hard to read the motor watts. Down button does not work smoothly after cutting the keypad to install the firmware. I have experience all the issues commented here:

-trip distance and odometer do not have the decimal point
-the battery capacity percentage always shows 100%. I changed back to show the battery voltage

But now that the development of the SW102 has stopped I am not sure if all the investment to put this display worth it. I have bought 2 displays and the harness adapter from 8 pins to Bafang system....and at the end I prefer Marcoq firmware with the start ups configuration.
My next step will be buying a VLDC6 display and an adapter to 6 pins to put marcoq or new mbrusa implementation of the 0.20 firmware.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 23 2020 12:09pm
by casainho
Nfer wrote:
Jan 23 2020 10:26am
But now that the development of the SW102 has stopped I am not sure if all the investment to put this display worth it.
I am being working to make it at pair with 850C firmware. I want to do it up to the end of next week.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 23 2020 12:57pm
by Nfer
casainho wrote:
Jan 23 2020 12:09pm
Nfer wrote:
Jan 23 2020 10:26am
But now that the development of the SW102 has stopped I am not sure if all the investment to put this display worth it.
I am being working to make it at pair with 850C firmware. I want to do it up to the end of next week.
Oh, i didn't know about it. Thanks for keeping the SW102 alive! You are really pushing this project practically alone. How many hours have your days?

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 30 2020 3:31pm
by wildekek
casainho wrote:
Jan 23 2020 12:09pm
Nfer wrote:
Jan 23 2020 10:26am
But now that the development of the SW102 has stopped I am not sure if all the investment to put this display worth it.
I am being working to make it at pair with 850C firmware. I want to do it up to the end of next week.
I saw your fixes to master and building a release worked fine for me. I'd be happy to help test sw102_v0.6.4 and controller v0.20.0-beta.1 and give some feedback/make a PR if you'd like unless you'd recommend against it.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 30 2020 3:39pm
by casainho
wildekek wrote:
Jan 30 2020 3:31pm
casainho wrote:
Jan 23 2020 12:09pm
Nfer wrote:
Jan 23 2020 10:26am
But now that the development of the SW102 has stopped I am not sure if all the investment to put this display worth it.
I am being working to make it at pair with 850C firmware. I want to do it up to the end of next week.
I saw your fixes to master and building a release worked fine for me. I'd be happy to help test sw102_v0.6.4 and controller v0.20.0-beta.1 and give some feedback/make a PR if you'd like unless you'd recommend against it.
Yes, the firmware now builds for both SW102 and 850C. My plan is to make next release for both simultaneously. And for new features, the assist level factor from 0.001 up to 10.000, in steps of 0.001.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 31 2020 8:42am
by Nfer
casainho wrote:
Jan 30 2020 3:39pm
wildekek wrote:
Jan 30 2020 3:31pm
casainho wrote:
Jan 23 2020 12:09pm
Nfer wrote:
Jan 23 2020 10:26am
But now that the development of the SW102 has stopped I am not sure if all the investment to put this display worth it.
I am being working to make it at pair with 850C firmware. I want to do it up to the end of next week.
I saw your fixes to master and building a release worked fine for me. I'd be happy to help test sw102_v0.6.4 and controller v0.20.0-beta.1 and give some feedback/make a PR if you'd like unless you'd recommend against it.
Yes, the firmware now builds for both SW102 and 850C. My plan is to make next release for both simultaneously. And for new features, the assist level factor from 0.001 up to 10.000, in steps of 0.001.
Great news!

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 31 2020 8:47am
by casainho
SW102 firmware working

Finally I got the SW102 firmware working for the most recent version of motor controller, the SW102 and 850C uses the same firmware base (thanks to Geeksville developer!!) and so the same motor controller firmware. I hope today to make a new firmware release for both displays, where the assist levels factor can be configured starting from 0.001 and in 0.001 steps.

This means that for instance if I do 200W of pedal human power in average, I will get assistance of motor current of 2 amps if assist level is 0.01 (0.01 * 200 = 2) and I can increment in steps of 0.001, meaning next step can be 0.011, or +10% of previous step - this should give enough granularity for users to be able to adjust for their preferred assistance level factors.

Image

Image

Image

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 31 2020 10:38am
by casainho
850C and SW102 displays new firmware

850C_SW102_v0.6.5

This version was developed for the TSDZ2 motor controller firmware v0.54.0 (TSDZ2-v0.54.0.hex).

Changelog:
- updated SW102 firmware, which have the same firmware base as 850C
- assist levels now with increasing steps of 0.001
- corrected Startup BOOST level

Download here: https://github.com/OpenSource-EBike-fir ... 102_v0.6.5

Follow the wiki How to install the Flexible OpenSource firmware: https://github.com/OpenSource-EBike-fir ... _wiki/wiki

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 31 2020 12:18pm
by wildekek
casainho wrote:
Jan 31 2020 10:38am
850C and SW102 displays new firmware

850C_SW102_v0.6.5

This version was developed for the TSDZ2 motor controller firmware v0.54.0 (TSDZ2-v0.54.0.hex).

Changelog:
- updated SW102 firmware, which have the same firmware base as 850C
- assist levels now with increasing steps of 0.001
- corrected Startup BOOST level

Download here: https://github.com/OpenSource-EBike-fir ... 102_v0.6.5

Follow the wiki How to install the Flexible OpenSource firmware: https://github.com/OpenSource-EBike-fir ... _wiki/wiki
Congrats, this is a huge milestone.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 31 2020 12:39pm
by Nfer
casainho wrote:
Jan 31 2020 10:38am
850C and SW102 displays new firmware

850C_SW102_v0.6.5

This version was developed for the TSDZ2 motor controller firmware v0.54.0 (TSDZ2-v0.54.0.hex).

Changelog:
- updated SW102 firmware, which have the same firmware base as 850C
- assist levels now with increasing steps of 0.001
- corrected Startup BOOST level

Download here: https://github.com/OpenSource-EBike-fir ... 102_v0.6.5

Follow the wiki How to install the Flexible OpenSource firmware: https://github.com/OpenSource-EBike-fir ... _wiki/wiki
Great! What are the changes on the startup boost?

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Jan 31 2020 2:12pm
by casainho
Nfer wrote:
Jan 31 2020 12:39pm
Great! What are the changes on the startup boost?
Just a correction, previously the BOOST level were a constant value while it should not, when changing the assist level.

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Feb 01 2020 12:43pm
by hefest
Not sure if this the correct thread to discuss this, but isn't it a bit difficult to keep track of which display firmware version works with tsdz2 firmware version?
Wouldn't it make more sense to use semantic versioning where major and minor versions are the same across the firmwares if they are compatible with each other?
For example, 1.1.X tsdz2 firmware is compatible with any 1.1.x version display firmware?

Another thing that can be improved is configuration. Instead of maintaining it on wiki which already is hard to find valid info on, keep the CONFIGURATION.md in each git branch/tag that corresponds to that version of the software and just maintain the link on Wiki to the MD file?

Re: Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

Posted: Feb 01 2020 1:45pm
by casainho
hefest wrote:
Feb 01 2020 12:43pm
Not sure if this the correct thread to discuss this, but isn't it a bit difficult to keep track of which display firmware version works with tsdz2 firmware version?
Wouldn't it make more sense to use semantic versioning where major and minor versions are the same across the firmwares if they are compatible with each other?
For example, 1.1.X tsdz2 firmware is compatible with any 1.1.x version display firmware?

Another thing that can be improved is configuration. Instead of maintaining it on wiki which already is hard to find valid info on, keep the CONFIGURATION.md in each git branch/tag that corresponds to that version of the software and just maintain the link on Wiki to the MD file?
I think those 2 points are good suggestions.

I think next time I will implement point 1.

Point 2, there is one thing I don't like that makes me not want to do it. As you say, is hard to find the valid info on the wiki and so I try to make the configurations page with a structure and Table of Contents at top of the page - happens that .md files do not support Table of Contents but only the wiki pages when using the Mediawiki style, so, I will keep with that.