Bafang SW102 Bluetooth LCD - OpenSource firmware and mobile app

casainho said:
hefest said:
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.

I'm convinced that MD on Github supports tables as well. There is also helper bash script to automatically format tables. Let me check that and get back at you.

On the first point, if you want to keep the major version 0 for some reason, you could use 4 numbers for versioning.
 
casainho said:
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).
...

This update represents my most satisfying use & ride experience using the SW102 & TSDZ2 OpenSource Firmware!!!

Downloaded & installed both updates without incident (except "remembering how" given the time since the last try), then tested and tuned the configuration to my preference. Gave it a Big Thumbs Up!

However, alas, I then turned off the display, and went to get pen & paper to make notes for my documentation of the settings. When I turned the display back on and went to settings, every one of my configuration changes had been reset to the defaults.

Ouch, there went an hour or so!

However, I am still at a Big Thumbs Up! It's winter here and very few opportunities to ride, and I am sure that not saving the configuration will be resolved by the spring.

In addition to the above, I did note:
--cursor remnants/blobs from time to time when moving around the settings screen.
--the numbers disappear on Main1 panel after pressing "M" to see the text.
--I liked the fact that the light flashes and the motor jiggles a little when returning from settings with changes,
------however, a couple time the motor jiggle went for nearly a second, which was enough to move the trike.
--------- (Assuming, of course, that this is intentional notification behavior and not an accident.)
------------ (This same light/jiggle behavior occurs as the SW102 welcome screen changes to the Main panel.)

What I really liked about this update:
--default values on the Main2 panel are perfect for me. (I assume reconfiguration of Main2 is still there?)
--the ability to restore the odometer setting after a new FW install.
--the much smoother application of power for Walk mode.
--I'm sure there's more, but memory fails.

Thanks casainho for this effort and especially for continuing the support of the SW102!
 
windburner said:
--I liked the fact that the light flashes and the motor jiggles a little when returning from settings with changes,
------however, a couple time the motor jiggle went for nearly a second, which was enough to move the trike.

While testing to see what minimum re-config I could do to take advantage of an opportunity to ride with v0.6.5, I made the following additional observations:

  • The long motor jiggle noted above is not good. When it happens, the application of assist power afterwards is all wrong (sounds destructive!!!), and requires a power off to correct, and, you guessed it, re-config. This upset has also occurred simply cycling through Main2/Config/Main1 to see the values on Main2. So, any way you get to Main1 is preceeded by the jiggle, with the potential to upset power application.

  • From time to time in configuration, after making a change and returning to the config main panel, the SW102 locks up, requiring a power off, and redo. Had this happen twice in a row after changing the Battery settings. Appeared to defeat it by returning to main panel immediately after the Battery changes, then returning to config for any other changes. Didn't see this at all during the initial testing session.?.?.?
Overall, I have found that I only need to config my wheel diameter, battery, and SOC settings to eek out an enjoyable ride. :thumb: Actually, wheel diameter is enough, but, I like to see the battery indicator look ~right.
 
#################################################
# #
# Windows Standalone SW102 Full Installer #
# #
#################################################
.
.
(e)xit / (t)est connection / (f)lash sw102-full-0.19.11 (1).hex : t
GNU MCU Eclipse OpenOCD, 32-bitOpen On-Chip Debugger 0.10.0+dev-00593-g23ad80df4 (2019-04-22-16:40)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : STLINK V2J28S7 (API v2) VID:pID 0483:3748
Info : Target voltage: 3.239683
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Listening on port 3333 for gdb connections



im getting this when trying to flash the sw102 any fix ?
 
I have no experience, but don't you have to press f instead of t for flashing?
 
A Caution For TSDZ2 Trike Riders and OSF V0.6.5/V0.54.0: Don't get off the trike with the display still turned on with 'Various-Assist w/o pedal' enabled. Given that a trike is always "ready to roll", I had a runaway!!!!! Fortunately, it was a slow-speed-chase at ~1 MPH on level ground as the TSDZ2 stuttered/sputtered along, instead of a solid power-on. But, a stark reminder to always think Safety. Honestly, given some of the other observations on this version, it's probably best to hit the power switch (if you have one) when dismounting, even if this option isn't enabled.
 
windburner said:
A Caution For TSDZ2 Trike Riders and OSF V0.6.5/V0.54.0: Don't get off the trike with the display still turned on with 'Various-Assist w/o pedal' enabled. Given that a trike is always "ready to roll", I had a runaway!!!!! Fortunately, it was a slow-speed-chase at ~1 MPH on level ground as the TSDZ2 stuttered/sputtered along, instead of a solid power-on. But, a stark reminder to always think Safety. Honestly, given some of the other observations on this version, it's probably best to hit the power switch (if you have one) when dismounting, even if this option isn't enabled.

Wow, that sounds dangerous. I really like that option because motor is much more responsive on starts.
 
Would it be possible to use something like ESP32 to send and receive signals and a cell phone app for display and controls?
 
freechainin said:
Would it be possible to use something like ESP32 to send and receive signals and a cell phone app for display and controls?

I remember seeing a video of someone putting a bluetooth module onto the motor itself, and then using a phone app as the TSDZ2 display.
 
skestans said:
freechainin said:
Would it be possible to use something like ESP32 to send and receive signals and a cell phone app for display and controls?

I remember seeing a video of someone putting a bluetooth module onto the motor itself, and then using a phone app as the TSDZ2 display.
Would be great if that guy jumps in and supports sw102 bluetooth.

Casainho mentioned his wife potentially working on android app for sw102 bluetooth but not sure at what stage is that.

I've explored a bit possibility of developing such app but in Golang since I'm not familiar with android java development.
 
hefest said:
skestans said:
freechainin said:
Would it be possible to use something like ESP32 to send and receive signals and a cell phone app for display and controls?

I remember seeing a video of someone putting a bluetooth module onto the motor itself, and then using a phone app as the TSDZ2 display.
Would be great if that guy jumps in and supports sw102 bluetooth.

Casainho mentioned his wife potentially working on android app for sw102 bluetooth but not sure at what stage is that.

I've explored a bit possibility of developing such app but in Golang since I'm not familiar with android java development.
Currently there is no firmware on SW102 that sends and receives data over Bluetooth so the app projected is halted. I am working on the firmware but there is a big issue that I don't know how to solve...
 
hefest said:
I've explored a bit possibility of developing such app but in Golang since I'm not familiar with android java development.
I think you should go ahead. Maybe you have a better motivation than my wife. I personally do not expect to use the app myself so no big motivation for me.
 
casainho, have you found out yet why the new fw for SW102 does not store settings? Currently I cannot use my bike because I installed the new motor and display fw before I found out about the issue. I have a lot of settings to configure after every start up (36v system)
 
casainho said:
hefest said:
I've explored a bit possibility of developing such app but in Golang since I'm not familiar with android java development.
I think you should go ahead. Maybe you have a better motivation than my wife. I personally do not expect to use the app myself so no big motivation for me.

But there is no support on sw102 for sending data over bluetooth, that has to be developed as well?
 
Not sure how communication protocol between tsdz2 and sw102 works, but can we just forward what ever sw102 is getting from tsdz2 over bluetooth to mobile?
 
hefest said:
Not sure how communication protocol between tsdz2 and sw102 works, but can we just forward what ever sw102 is getting from tsdz2 over bluetooth to mobile?
Yes, I would start to replicate the same that is already working between display <-> motor controller. But then we will need to implement the change of the same variables from both display and mobile app, this is new.
 
Hi.
I installed the latest version on my commuting bike, comming from the stock version (VLCD5)

Some questions and returns:

Sometime, the interface freeze while browsing the menus. The bike is still usable anyway.
As already mentioned, there is the issue saving the settings.

I modified the tsdz2 to include a temperature sensor:
Is there any way to read the temp using the sw102?

And I didn't find any way to turn on the lights, is that possible?

anyway, I realy like the new feeling.
Thanks for everyone involved on this project, it's awsome.
 
feyris said:
...
And I didn't find any way to turn on the lights, is that possible?
...

Press and hold the ' ^ ' button to toggle the lights on & off.
 
Hi,

I just purchased an ebike with the SW102 screen and a Bafang Hub Motor (36v 350W). Do you think it will work if I flash the firmware with the OpenSource firmware ?

Thanks,

Mart
 
MartDesjardins said:
Hi,

I just purchased an ebike with the SW102 screen and a Bafang Hub Motor (36v 350W). Do you think it will work if I flash the firmware with the OpenSource firmware ?
Read here all the details of this firmware: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki
 
casainho said:
hefest said:
Not sure how communication protocol between tsdz2 and sw102 works, but can we just forward what ever sw102 is getting from tsdz2 over bluetooth to mobile?
Yes, I would start to replicate the same that is already working between display <-> motor controller. But then we will need to implement the change of the same variables from both display and mobile app, this is new.

Ok, it looks to me like sizeable implementation of stuff have to be implemented on sw102 side including creation of GATT server and sending over data. Having ind mind the state of sw102 firmware at the moment, this wouldn't be happening any time soon, right?
 
SW102 new firmware release

The previous firmware version on SW102 had a problematic issue where the configurations and other settings were not being saved and I was able, finally, to correct it.

Changelog:
- corrected issue on SW102 display were the configurations and other settings were not being saved
- changed SW102 display enter configuration button, to be different from button to change screen

Download the new version here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases
 
hefest said:
casainho said:
hefest said:
Not sure how communication protocol between tsdz2 and sw102 works, but can we just forward what ever sw102 is getting from tsdz2 over bluetooth to mobile?
Yes, I would start to replicate the same that is already working between display <-> motor controller. But then we will need to implement the change of the same variables from both display and mobile app, this is new.

Ok, it looks to me like sizeable implementation of stuff have to be implemented on sw102 side including creation of GATT server and sending over data. Having ind mind the state of sw102 firmware at the moment, this wouldn't be happening any time soon, right?
Next, I will start looking at sending data over Bluetooth. As you can see by yourself, latest version works well, some data is already sent by Bluetooth -- see the sources.
 
The open source firmware for SW102 is not compatible with the bafang motor.
That motor display combination will only work with the original firmware.
The open source firmware is for the tungsheng tsdz2 mid drive motor (also running on open source firmware)
And, you need matching firmware versions or it won't work either.
 
casainho said:
SW102 new firmware release
The previous firmware version on SW102 had a problematic issue where the configurations and other settings were not being saved and I was able, finally, to correct it.
Hi casainho, I just installed this update since I had been waiting for a fix for the configuration bug. However, with this update when I start the system in the lower part of the display it says "motor bloc" (blinking) and I cannot enter the configuration screen. With the previous version (0.6.5) it was working except for the configuration bug. I did not change anything except the display FW.

Motor FW is 0.54.0 and motor is a 36V version.
 
Back
Top