TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

Ok quick question here. I still havent flashed this as I have the VLCD-5 and i didnt feel like buying a new display but it seems like some people have a method of flashing that one. Thinking it may be a waste of time though for what i am trying to accomplish

If i plan on diving in 100% and doing the wireless setup, there would be no reason for me to get a new display right? all the motor side flashing stuff is independent of the display stuff? I understand hardware a little better than software so the task doesn't appear too daunting now that i look closer
 
Manbeer said:
Ok quick question here. I still havent flashed this as I have the VLCD-5 and i didnt feel like buying a new display but it seems like some people have a method of flashing that one. Thinking it may be a waste of time though for what i am trying to accomplish

If i plan on diving in 100% and doing the wireless setup, there would be no reason for me to get a new display right? all the motor side flashing stuff is independent of the display stuff? I understand hardware a little better than software so the task doesn't appear too daunting now that i look closer

I think you need some method of changing the assist level perhaps? So you can use your existing "wired" display or build/use a bluetooth enabled control that has been built as described in this thread. I think one or more of the Garmin bike computers can also change the assist level, but I'm not certain of that?
 
gfmoore said:
Manbeer said:
Ok quick question here. I still havent flashed this as I have the VLCD-5 and i didnt feel like buying a new display but it seems like some people have a method of flashing that one. Thinking it may be a waste of time though for what i am trying to accomplish

If i plan on diving in 100% and doing the wireless setup, there would be no reason for me to get a new display right? all the motor side flashing stuff is independent of the display stuff? I understand hardware a little better than software so the task doesn't appear too daunting now that i look closer

I think you need some method of changing the assist level perhaps? So you can use your existing "wired" display or build/use a bluetooth enabled control that has been built as described in this thread. I think one or more of the Garmin bike computers can also change the assist level, but I'm not certain of that?

There is an app created to use your phone with it but I just realized that it's android only. Since I'm on an iPhone now I have to weigh out the disadvantage of carrying another device. No wires definitely cleans things up but since it will be going on a frame with internal routing and a spare slot for the front derailleur It's not a make it or break it deal i suppose. Just too many options with different displays or wireless etc. The older I get, the less I like making choices
 
Manbeer wrote: Since I'm on an iPhone now I have to weigh out the disadvantage of carrying another device.

Yes, quite a few have wondered about using iPhones. An idle thought has crossed my mind that rather than using Android Studio, whether it would be possible to develop using a cross platform generator like NativeScript https://nativescript.org/ which I think can create apps to run on android and ios. Sometime ago I did look at learning this, since I'm more at home with JavaScript nowadays, but got distracted. Not any time soon for me though :( .
 
woojak said:
Sorry for off topic
Casainho, could I ask for the dimensions of the controller PCB?
I saw that in the topic "TSDZ2 48v 2020 new firmware" you had to do with a removed PCB from a metal housing :)
I would be grateful for the information.
Greetings!
72mm * 58mm.
 
@casainho

Can you confirm please that you can build the SDZ2_wireless/EBike_wireless_remote/firmware from VS Code.

I am getting an error:
Code:
make: -gcc: Command not found
Cannot find: '-gcc'.
Please set values in: "/home/gordon/ebike/TSDZ2_wireless/EBike_wireless_remote/firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common:132: *** Cannot continue. Stop.
The terminal process "/bin/bash '-c', 'make'" failed to launch (exit code: 2).

It seems that the Makefile being used is the firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common directory

This contains the line at 119
Code:
# Toolchain commands
CC      := $(call quote,$(GNU_INSTALL_ROOT)$(GNU_PREFIX)-gcc)

I just can't figure this one out after 3 hours, so I have tried :)

Thanks Gordon

edit: btw the Makefile.posix (not visible in VS Code contains
Code:
#GNU_INSTALL_ROOT ?= /usr/local/gcc-arm-none-eabi-7-2018-q2-update/bin/
GNU_VERSION ?= 7.3.1
GNU_PREFIX ?= arm-none-eabi
 
gfmoore said:
@casainho

Can you confirm please that you can build the SDZ2_wireless/EBike_wireless_remote/firmware from VS Code.

I am getting an error:
Code:
make: -gcc: Command not found
Cannot find: '-gcc'.
Please set values in: "/home/gordon/ebike/TSDZ2_wireless/EBike_wireless_remote/firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common:132: *** Cannot continue. Stop.
The terminal process "/bin/bash '-c', 'make'" failed to launch (exit code: 2).

It seems that the Makefile being used is the firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common directory

This contains the line at 119
Code:
# Toolchain commands
CC      := $(call quote,$(GNU_INSTALL_ROOT)$(GNU_PREFIX)-gcc)

I just can't figure this one out after 3 hours, so I have tried :)

Thanks Gordon

edit: btw the Makefile.posix (not visible in VS Code contains
Code:
#GNU_INSTALL_ROOT ?= /usr/local/gcc-arm-none-eabi-7-2018-q2-update/bin/
GNU_VERSION ?= 7.3.1
GNU_PREFIX ?= arm-none-eabi
Is possible you need to change somewhere the path to your ARM GCC compiler, but that are just regular things a developer should be used to do.
 
casainho said:
gfmoore said:
@casainho

Can you confirm please that you can build the SDZ2_wireless/EBike_wireless_remote/firmware from VS Code.

I am getting an error:
Code:
make: -gcc: Command not found
Cannot find: '-gcc'.
Please set values in: "/home/gordon/ebike/TSDZ2_wireless/EBike_wireless_remote/firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common:132: *** Cannot continue. Stop.
The terminal process "/bin/bash '-c', 'make'" failed to launch (exit code: 2).

It seems that the Makefile being used is the firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common directory

This contains the line at 119
Code:
# Toolchain commands
CC      := $(call quote,$(GNU_INSTALL_ROOT)$(GNU_PREFIX)-gcc)

I just can't figure this one out after 3 hours, so I have tried :)

Thanks Gordon

edit: btw the Makefile.posix (not visible in VS Code contains
Code:
#GNU_INSTALL_ROOT ?= /usr/local/gcc-arm-none-eabi-7-2018-q2-update/bin/
GNU_VERSION ?= 7.3.1
GNU_PREFIX ?= arm-none-eabi
Is possible you need to change somewhere the path to your ARM GCC compiler, but that are just regular things a developer should be used to do.

@gfmoore - this is my 'autoexec' script that runs when I open the cmd window I use for dev work - it's for Windows and some paths are specific to my setup but might help you figure out the things you need to have in the path for things to build.

edit: cleaned it up a bit - i've also added the junctions i use - can't quite remember why i needed them but there will always be differences in how devs lay out their work area so some fiddling is expected.


SET TSDZ=%~dp0 // this is the root folder where all the repos are cloned - i also have a tools subfolder off this where i put openocd/srec_cat etc.

SET PATH=
%PATH%;
%TSDZ%tools\cygwin\bin;
%TSDZ%TSDZ2_wireless-master\common_firmware\nRF5_SDK_16.0.0\integration\nrfx;
C:\Program Files\GNU MCU Eclipse\ARM Embedded GCC\8.2.1-1.2-20190119-1237\bin;
C:\Program Files\GNU MCU Eclipse\ARM Embedded GCC\8.2.1-1.2-20190119-1237\libexec\gcc\arm-none-eabi\8.2.1;
C:\Users\avari\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts;
C:\Users\avari\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages;
%tsdz%\tools\OpenOCD\bin;
%tsdz%\tools\OpenOCD\share\openocd\scripts\target;
%tsdz%\tools\OpenOCD\share\openocd\scripts\interface;
%tsdz%\tools\srec_cat;
C:\Program Files (x86)\STMicroelectronics\st_toolset\stvp

md "%tsdz%TSDZ2-Smart-EBike\common"
junction64.exe "%tsdz%TSDZ2-Smart-EBike\common\STM8S_StdPeriph_Lib" "%tsdz%TSDZ2-Smart-EBike\src\STM8S_StdPeriph_Lib"
md "C:\Program Files (x86)\GNU Tools ARM Embedded\"
junction64.exe "C:\Program Files (x86)\GNU Tools ARM Embedded\7 2018-q2-update" "C:\Program Files\GNU MCU Eclipse\ARM Embedded GCC\8.2.1-1.2-20190119-1237"
junction64 "%tsdz%tools\openocd" "%tsdz%tools\OpenOCD-20201228-0.10.0"
 
casainho said:
gfmoore said:
@casainho

Can you confirm please that you can build the SDZ2_wireless/EBike_wireless_remote/firmware from VS Code.

I am getting an error:
Code:
make: -gcc: Command not found
Cannot find: '-gcc'.
Please set values in: "/home/gordon/ebike/TSDZ2_wireless/EBike_wireless_remote/firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common:132: *** Cannot continue. Stop.
The terminal process "/bin/bash '-c', 'make'" failed to launch (exit code: 2).

It seems that the Makefile being used is the firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.common directory

This contains the line at 119
Code:
# Toolchain commands
CC      := $(call quote,$(GNU_INSTALL_ROOT)$(GNU_PREFIX)-gcc)

I just can't figure this one out after 3 hours, so I have tried :)

Thanks Gordon

edit: btw the Makefile.posix (not visible in VS Code contains
Code:
#GNU_INSTALL_ROOT ?= /usr/local/gcc-arm-none-eabi-7-2018-q2-update/bin/
GNU_VERSION ?= 7.3.1
GNU_PREFIX ?= arm-none-eabi
Is possible you need to change somewhere the path to your ARM GCC compiler, but that are just regular things a developer should be used to do.

@casainho Not helpful and actually, quite insulting. :(

@beemac Thanks for your help, I'll see if I can gain some insights tomorrow. :)

Gordon
 
gfmoore said:
@casainho Not helpful and actually, quite insulting. :(
Sorry. What I wanted to say is that instructions for developers do not need to be perfect because they are used to figure out what tools to install as also adapt the paths. You can just ignore the Visual Code Studio errors, I think me and other developers are simple ignoring them, again, no need to be perfect.
 
casainho said:
gfmoore said:
@casainho Not helpful and actually, quite insulting. :(
Sorry. What I wanted to say is that instructions for developers do not need to be perfect because they are used to figure out what tools to install as also adapt the paths. You can just ignore the Visual Code Studio errors, I think me and other developers are simple ignoring them, again, no need to be perfect.

I appreciated the apology, but then you go on and re-accuse me in a roundabout way of being ignorant and an idiot. Maybe I am, but to beginners everything is hard and that's why we ask for help.

I am not totally ignorant, I have been programming since 1977, at times professionally in the 1980s, I have taught basic programming and computing at first year undergraduate level and recently completed a major project (to me) for a statistics professor in Australia https://thenewstatistics.com/itns/ and the software at https://www.esci.thenewstatistics.com/. So I'm not entirely ignorant, though I am ignorant of embedded devices (apart from the odd play with Raspberry Pi and Micro:bit).

What really upset me (a lot) is that you insist your repos are correct. I have followed the instructions exactly and cloned YOUR repos and they simply don't work. They are NOT correct.

The error I eventually traced is due to the fact that the file TSDZ2_wireless/EBike_wireless_remote/firmware/nRF5_SDK_16.0.0/components/toolchain/gcc/Makefile.posix doesn't exist. There! the explanation was in the error description. Lesson: read the error description - doh.
I thought it did exist having done a locate and had assumed it was hidden in VS Code and had looked at it and it seemed ok.
Once I moved it from common_firmware to the local directory location the problem went away.

So you tell me. How can the repository be correct?

I've said previously after reading the entire thread that you are a good leader and obviously have outstanding skills, but great leaders need to show a little humility and take responsibility.

How long would it have really taken you to clone your repository and check that they were correct - 10 minutes? instead it has cost me many days!

And as for ignoring warnings and even errors, then you are just plain wrong. I wouldn't want you to be responsible for any mission critical software where lives or property is at stake.

And whilst I'm on my soapbox your repository and code structure needs a thorough "spring clean" i.e. refactored. For instance there should only be ONE nRF5_SDK_16.0.0 directory for the project - not many all over the place. What if it needs to be updated in the future?

In future if you don't want to help "newbies" and have nothing constructive to say, then simply keep your thoughts to yourself. I want to help, but I don't want to be treated with contempt. :shock: :cry:

There I've vented and feel better!

Gordon
 
Since one of my EBikes with 860C display stopped to work suddenly (860C display do not work anymore), I built another TSDZ2 EBike wireless controller and all went perfect as expected - this time I used thin wires:

2021-05-14-16-11-58-1.jpg
 
Hello.
In my spare time I made a few corrections in mine board (v2.1) and a new "adaptive" PCB for nRF.

Front%20nRF.png

nRF%20Back.png

nRF%203D%20front.png

nRF%203D%20back.png

maybe someone will come in handy. :]
More on wiki: https://github.com/woojak/TSDZ2-Internal-Wireles-Board/wiki


I still have a question about nRF programming.
is the given programming sequence is good?
1. STLink - TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex
2.nRF Connect - TSDZ2_wireless-bootloader_ota_update-v0.9.0.zip
3.nRF Connect - TSDZ2_wireless_ota_update-v0.7.0.zip

question 2: nRF will show up in bt devices if is not connected to TSDZ2?

follows this procedure and after uploading, the device does not show up in the BT list or in the list in the APP; /

greetings
 
woojak said:
I still have a question about nRF programming.
is the given programming sequence is good?
1. STLink - TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex
2.nRF Connect - TSDZ2_wireless-bootloader_ota_update-v0.9.0.zip
3.nRF Connect - TSDZ2_wireless_ota_update-v0.7.0.zip

question 2: nRF will show up in bt devices if is not connected to TSDZ2?

1. You need first to program the bootloader, using the STLinkV2: https://github.com/OpenSourceEBike/OpenSourceEBike.github.io/blob/main/getting_started.md

2. Then flash the firmware by wireless: https://opensourceebike.github.io/firmware.html

NRF will always show up on the Bluetooh devices.
 
woojak said:
Hello.
Yesterday I received 2 new nRFs, I put the bootloader and flash the firmware by wireless.
I still can't find the device in the Bluetooth list.
screenshots below.






Cmd log.txt
log nrf.txt

I have no idea what I am doing wrong ;/
Make sure you have GPS and Bluetooth enabled on the phone. Please check again
 
Is the device shown on the Nordic app that you use to flash the firmware?
 
woojak said:


Wysłane z mojego MAX1 przy użyciu Tapatalka

So, seems the device is not working. The hardware must be ok since the bootloader works, but for some reason the firmware does not. Try to startup again the bootloader and try flash other older firmware versions to see if makes difference. Maybe even build the firmware by yourself from the repository and test.
 
casainho said:
woojak said:


Wysłane z mojego MAX1 przy użyciu Tapatalka

So, seems the device is not working. The hardware must be ok since the bootloader works, but for some reason the firmware does not. Try to startup again the bootloader and try flash other older firmware versions to see if makes difference. Maybe even build the firmware by yourself from the repository and test.


ok I will check older versions.
"Maybe even build the firmware by yourself from the repository and test." - I'll have to read how to do it.
I ordered nRF from Aliexpress, maybe this is the reason?
 
woojak said:
ok I will check older versions.
"Maybe even build the firmware by yourself from the repository and test." - I'll have to read how to do it.
I ordered nRF from Aliexpress, maybe this is the reason?
It is almost for sure something about the firmware, as the hardware used for the Bluetooth bootloader is just the same as for the firmware Bluetooth.
 
Back
Top