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

Thanks for the updated 0.6.1 firmware for the Wireless remote.
I can confirm that this seems to have fixed my problem. I can now get the remote to connect.
It didn't work immediately after updating but after cycling the power to the controller and the remote it now seems to be OK.

Colin
 
g4eml said:
Thanks for the updated 0.6.1 firmware for the Wireless remote.
I can confirm that this seems to have fixed my problem. I can now get the remote to connect.
It didn't work immediately after updating but after cycling the power to the controller and the remote it now seems to be OK.

Colin
Good news!
Let us know how you make out.
Docs have also been updated.
https://opensourceebike.github.io/operation.html
Let me know if they are more comprehensible.
 
I just installed the remote new firmware on my EBike because I wanted to use it. The remote firmware simple does not connect to TSDZ2 wireless....
 
casainho said:
I just installed the remote new firmware on my EBike because I wanted to use it. The remote firmware simple does not connect to TSDZ2 wireless....
Oh no. Something must have broken in that last firmware change.
I should not have rushed out the fix without testing thoroughly.
I assume the red led stays flashing?
 
rananna said:
casainho said:
I just installed the remote new firmware on my EBike because I wanted to use it. The remote firmware simple does not connect to TSDZ2 wireless....
Oh no. Something must have broken in that last firmware change.
I should not have rushed out the fix without testing thoroughly.
I assume the red led stays flashing?
The red LED flashes for a bit of time and then stops... It never finds the other board.
 
I
casainho said:
rananna said:
casainho said:
I just installed the remote new firmware on my EBike because I wanted to use it. The remote firmware simple does not connect to TSDZ2 wireless....
Oh no. Something must have broken in that last firmware change.
I should not have rushed out the fix without testing thoroughly.
I assume the red led stays flashing?
The red LED flashes for a bit of time and then stops... It never finds the other board.
I didn't modify the ant connection code.
Did you change the ant id?
 
rananna said:
I
casainho said:
rananna said:
casainho said:
I just installed the remote new firmware on my EBike because I wanted to use it. The remote firmware simple does not connect to TSDZ2 wireless....
Oh no. Something must have broken in that last firmware change.
I should not have rushed out the fix without testing thoroughly.
I assume the red led stays flashing?
The red LED flashes for a bit of time and then stops... It never finds the other board.
I didn't modify the ant connection code.
Did you change the ant id?
Can you test it? If is working on your EBike that means is a problem. With my ebike
 
casainho said:
rananna said:
I
casainho said:
rananna said:
Oh no. Something must have broken in that last firmware change.
I should not have rushed out the fix without testing thoroughly.
I assume the red led stays flashing?
The red LED flashes for a bit of time and then stops... It never finds the other board.
I didn't modify the ant connection code.
Did you change the ant id?
Can you test it? If is working on your EBike that means is a problem. With my ebike
I will, but I am tied up for a couple of hours. Will test ASAP.
 
rananna said:
casainho said:
rananna said:
I
casainho said:
The red LED flashes for a bit of time and then stops... It never finds the other board.
I didn't modify the ant connection code.
Did you change the ant id?
Can you test it? If is working on your EBike that means is a problem. With my ebike
I will, but I am tied up for a couple of hours. Will test ASAP.
Does the android app connect and control?
 
rananna said:
rananna said:
casainho said:
rananna said:
I
I didn't modify the ant connection code.
Did you change the ant id?
Can you test it? If is working on your EBike that means is a problem. With my ebike
I will, but I am tied up for a couple of hours. Will test ASAP.
Does the android app connect and control?

I'm not having a good morning either - testing the buttons, seems there's some aspects of the VT still enabled - everything checks out when not moving or on my test rig but as soon as i started pedalling the assist goes bananas cycling through all levels - and I can only keep it at a constant level by holding +. I did a bit of rewiring beforehand too - so it could be a loose connection perhaps - but the symptoms seem too much like how VT functionality was described...

Going to have a look at the code now - and hopefully get a fix out asap.
 
beemac said:
rananna said:
rananna said:
casainho said:
Can you test it? If is working on your EBike that means is a problem. With my ebike
I will, but I am tied up for a couple of hours. Will test ASAP.
Does the android app connect and control?

I'm not having a good morning either - testing the buttons, seems there's some aspects of the VT still enabled - everything checks out when not moving or on my test rig but as soon as i started pedalling the assist goes bananas cycling through all levels - and I can only keep it at a constant level by pumping +. I did a bit of rewiring beforehand too - so it could be a connection issue - but the symptoms seem too much like how VT functionality was described...

Going to have a look at the code now - and hopefully get a fix out asap.

Ok, found what the problem looks to be - just testing on the bike. Always happens when I've taped the box up onto my bike - am right in assuming there's no current way to get the wireless controller into DFU mode for OTA flash without pressing the button on the nrf?
 
casainho said:
rananna said:
I
casainho said:
rananna said:
Oh no. Something must have broken in that last firmware change.
I should not have rushed out the fix without testing thoroughly.
I assume the red led stays flashing?
The red LED flashes for a bit of time and then stops... It never finds the other board.
I didn't modify the ant connection code.
Did you change the ant id?
Can you test it? If is working on your EBike that means is a problem. With my ebike

Just checked the remote.
It connects and controls the motor.
However, I need to update the firmware on the motor to the latest code.
I will do this and check again-stand by....
 
rananna said:
casainho said:
rananna said:
I
casainho said:
The red LED flashes for a bit of time and then stops... It never finds the other board.
I didn't modify the ant connection code.
Did you change the ant id?
Can you test it? If is working on your EBike that means is a problem. With my ebike

Just checked the remote.
It connects and controls the motor.
However, I need to update the firmware on the motor to the latest code.
I will do this and check again-stand by....
ok, I found the problem.
when you do a wireless DFU update, it wakes up the remote in configuration mode.
I didn't see this issue in testing as I was always using the stlink to program.
@ casainho, I will push a fix to the issue soon.
Also, the occasional remote unresponsiveness appears to be related to PWM LED control and timers.
I need to spend a bit more time tracking this one down.
Will work on it this weekend.
 
rananna said:
rananna said:
casainho said:
rananna said:
I
I didn't modify the ant connection code.
Did you change the ant id?
Can you test it? If is working on your EBike that means is a problem. With my ebike

Just checked the remote.
It connects and controls the motor.
However, I need to update the firmware on the motor to the latest code.
I will do this and check again-stand by....
ok, I found the problem.
when you do a wireless DFU update, it wakes up the remote in configuration mode.
I didn't see this issue in testing as I was always using the stlink to program.
@ casainho, I will push a fix to the issue soon.
Also, the occasional remote unresponsiveness appears to be related to PWM LED control and timers.
I need to spend a bit more time tracking this one down.
Will work on it this weekend.

@casainho, just to be sure, did you do an OTA update for the remote for the new firmware, or did you use the stlink?
 
rananna said:
@casainho, just to be sure, did you do an OTA update for the remote for the new firmware, or did you use the stlink?
I updated only the remote by DFU. So right now we have a combination of firmwares that does not work. It worked for me but I had flashed code from some point in time, but after all the recent changes...... Maybe we should not add new features at all until have a working version -- I will not accept more pull requests unless are for solving the current issues!! When we have a stable version, then I will acept PRs for new features, and we should discuss them previously.
 
casainho said:
rananna said:
@casainho, just to be sure, did you do an OTA update for the remote for the new firmware, or did you use the stlink?
I updated only the remote by DFU. So right now we have a combination of firmwares that does not work. It worked for me but I had flashed code from some point in time, but after all the recent changes...... Maybe we should not add new features at all until have a working version -- I will not accept more pull requests unless are for solving the current issues!! When we have a stable version, then I will acept PRs for new features, and we should discuss them previously.

I agree completely.
I will work on fixing the non-responsive issue you raised, and when that is fixed along with the DFU issue, I will give you a new release candidate.
At this stage in the development we cannot break the firmware with seemingly trivial bug fixes!
We should have a checklist based testing protocol for all new release candidates.
When I have completed the firmware changes for the next release candidate, I will make an attempt at developing such a testing checklist for the remote control.
We need to be very disciplined moving forward!
 
casainho said:
rananna said:
@casainho, just to be sure, did you do an OTA update for the remote for the new firmware, or did you use the stlink?
I updated only the remote by DFU. So right now we have a combination of firmwares that does not work. It worked for me but I had flashed code from some point in time, but after all the recent changes...... Maybe we should not add new features at all until have a working version -- I will not accept more pull requests unless are for solving the current issues!! When we have a stable version, then I will acept PRs for new features, and we should discuss them previously.

Makes sense - i'll focus on my changes - I don't think it's the code (since it's your code from the 860c!) but something is either causing interference or similar. It's only when the motor spins on my bike (doesn't do it when the motor spins on my spare motor I use for dev) - that the assist levels change. It's very odd.

On another note - I just used one of my ST-Links for the first time and it wouldn't flash the NRF because it didn't support the required transport. Not sure if this is the issue you had casainho as you didn't mention any symptoms. Mine are cheap brown/purple ones exactly like the images you posted - except with different innards to either of yours.

Code:
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "dapdirect_swd". To override use 'transport select <transport>'.
Info : STLINK V2J17S4 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.236436
Error: ST-Link version does not support DAP direct transport

so I flashed the fw to the latest version using https://www.st.com/en/development-tools/stsw-link007.html#

stlink fw update.png

And then it worked ok :

Code:
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "dapdirect_swd". To override use 'transport select <transport>'.
Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.238573
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000a80 msp: 0x20000400
Info : nRF52840-xxAA(build code: D0) 1024kB Flash, 256kB RAM
Info : Mass erase completed.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
Info : Padding image section 0 at 0x00000b00 with 1272 bytes
Info : Flash write discontinued at 0x0002f740, next section at 0x00031000
Warn : Adding extra erase range, 0x0002f740 .. 0x0002ffff
Info : Flash write discontinued at 0x0004ddb8, next section at 0x000eb000
Warn : Adding extra erase range, 0x0004ddb8 .. 0x0004dfff
Info : Flash write discontinued at 0x000fb564, next section at 0x000fe000
Warn : Adding extra erase range, 0x000fb564 .. 0x000fbfff
Info : Padding image section 4 at 0x000fe324 with 3292 bytes
Warn : Adding extra erase range, 0x000ff324 .. 0x000fffff
** Programming Finished **
** Verify Started **
** Verified OK **
shutdown command invoked
 
beemac said:
On another note - I just used one of my ST-Links for the first time and it wouldn't flash the NRF because it didn't support the required transport. Not sure if this is the issue you had casainho as you didn't mention any symptoms. Mine are cheap brown/purple ones exactly like the images you posted - except with different innards to either of yours.
Can you please make a PR to this page? https://opensourceebike.github.io/stlinkv2.html

@rananna, I installed the latest TSDZ2 wireless firmware and then the remote started to work. But seems you changed the LED colors for motor turn on, so it was difficult to me to understand what was going on. Is always nice to debug looking at the mobile app and see the colors / state of motor power icon.

Also my Garmin showed for the first time a blue quarter circle at bottom right, that I do not know what is for and I did not find anything online... do you know if is something about the ANT+ LEV since you added other fields??

And I guess we should have a page specifically for ANT+ LEV to explain how is possible to use so users can understand the relevance of it.

 
casainho said:
beemac said:
On another note - I just used one of my ST-Links for the first time and it wouldn't flash the NRF because it didn't support the required transport. Not sure if this is the issue you had casainho as you didn't mention any symptoms. Mine are cheap brown/purple ones exactly like the images you posted - except with different innards to either of yours.
Can you please make a PR to this page? https://opensourceebike.github.io/stlinkv2.html

Ok, but what made you post that about that model of the stlink clone in the first place though? What issues have you seen/had reported?
 
beemac said:
casainho said:
beemac said:
On another note - I just used one of my ST-Links for the first time and it wouldn't flash the NRF because it didn't support the required transport. Not sure if this is the issue you had casainho as you didn't mention any symptoms. Mine are cheap brown/purple ones exactly like the images you posted - except with different innards to either of yours.
Can you please make a PR to this page? https://opensourceebike.github.io/stlinkv2.html

Ok, but what made you post that about that model of the stlink clone in the first place though? What issues have you seen/had reported?
My issue were always a kind of timeout when flashing
 
casainho said:
beemac said:
casainho said:
beemac said:
On another note - I just used one of my ST-Links for the first time and it wouldn't flash the NRF because it didn't support the required transport. Not sure if this is the issue you had casainho as you didn't mention any symptoms. Mine are cheap brown/purple ones exactly like the images you posted - except with different innards to either of yours.
Can you please make a PR to this page? https://opensourceebike.github.io/stlinkv2.html

Ok, but what made you post that about that model of the stlink clone in the first place though? What issues have you seen/had reported?
My issue were always a kind of timeout when flashing

Ah ok ,I think most of my issues were down to loose connections to pins and so on. Connection quality seems to be everything when flashing. Did you try lowering the clock speed? I've never had to but might be another option.

Is this meant to be in the repo? :) https://github.com/OpenSourceEBike/OpenSourceEBike.github.io/blob/main/how-to-wire-3-way-switch.gif
 
casainho said:
@rananna, I installed the latest TSDZ2 wireless firmware and then the remote started to work. But seems you changed the LED colors for motor turn on, so it was difficult to me to understand what was going on. Is always nice to debug looking at the mobile app and see the colors / state of motor power Rx.

Also my Garmin showed for the first time a blue quarter circle at bottom right, that I do not know what is for and I did not find anything online... do you know if is something about the ANT+ LEV since you added other fields??

And I guess we should have a page specifically for ANT+ LEV to explain how is possible to use so users can understand the relevance of it.

I believe that is a visual representation of the motor temperature. I modified the ant lev encoding to send all the available data from the firmware that ANT LEV supports.
The edge will support a subset of these fields, but with the data field I recommended it will support ALL the ANT LEV fields. The datafield I recommended is a good option until we create a custom data field for garmin bike computers. I guess you don't want to fork the source code into the repo?

Anyway, the icon is there because I am sending a dummy value for temperature in the firmware for warm/cold temperature to test the ant lev additional fields, and this is being displayed by the Garmin as a blue icon.

On the good news/bad news front, I have tracked down the intermittent unresponsiveness of the remote issue.
Unfortunately, it relates to the sdk pwm implementation of Nordic's that I am using for LED control. There appears to be a timer conflict with the s340 soft device that causes intermittent hangups.
I cannot find any fix to the issue.
So, I undertook today to rewrite the firmware to eliminate pwm control. Needless to say, as I had spent considerable time implementing pwm, I was disappointed to have to do this.
However, most battery power loss is due to the time spent NOT riding the bike, so there should be minimal power hit due to this change.
Anyway, the firmware now appears stable and I gave not seen any intermittent hangs.
So, that bug seems to be squashed.

I want to write a testing checklist this evening to follow tomorrow to be sure the firmware works well, and I should be able to send you a release candidate along with updated docs later that day.
 
casainho said:
beemac said:
I tested in a different situations and one unit always worked while other did not.

That file was from @rananna, I do not know for what, seems it is not used.
Wow, that was a diagram I sent to my son on how to wire a three way switch. I have no idea how that got uploaded!
Please feel free to remove.
 
casainho said:
I tested in a different situations and one unit always worked while other did not.

Ok if it was just one sample then I think for now leave that info out about the 'bad stlink version' - as the bad board also looked burned from the photos you posted and without any information on errors or similar it may cause confusion. If anyone else reports issues we can add the info back. I've submitted a PR.

One side effect of asking people to open their Stlink adapters is if they don't realise they need to put it back in the case the same way around then the pin diagram on the case is incorrect... so by asking them to check - will probably cause more problems!
 
Back
Top