BT Interface for TSDZ2 Open Source firmware - Work in progress

Electric Motors and Controllers
Beli   1 W

1 W
Posts: 55
Joined: Dec 07 2020 5:08pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by Beli » Sep 24 2021 1:57pm

Elinx wrote:
Sep 24 2021 8:00am
so with 60 degrees rise there is no problem with regulations.
:?:
The raise must not be more than 20 degrees (at test conditions from 25°C to max. 45°C) - as far as I understood.
Elinx wrote:
Sep 24 2021 8:00am
The same is for a higher Voltage from battery. With the same power there is a lower current through the engine coils and less temperature rise.
:?:
Still valid is:
P = U * I
So there is theoretically still the same copper loss (i.e. raise of temperature).

Elinx   10 kW

10 kW
Posts: 844
Joined: Aug 09 2019 6:58am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by Elinx » Sep 24 2021 5:09pm

Beli wrote:
Sep 24 2021 1:57pm
......
The raise must not be more than 20 degrees (at test conditions from 25°C to max. 45°C) - as far as I understood.
....
Still valid is:
P = U * I
...
I tried to explain continous power the simple way. It wasn't meant to start a discussion in this BT thread.
It could be an interesting discussion too, but this thread isn't the place for that. Only correct me if my explanation is wrong.

As answer on your remarks, my opinion.
The max. power isn't defined, so a rise of more than 20 degrees is imho overheating and could only be there for a (again not defined) short time. (NB. this is measured on the bare motor. The temperature on the housing outside will be lower,)
P=U*I, so with a higher Voltage at same power you got a higher rpm with lower current, which means imho an altered ratio between kinetic energy and heat.

fietstasss   100 µW

100 µW
Posts: 9
Joined: Dec 08 2020 1:41pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by fietstasss » Nov 04 2021 7:34am

Anyone has one or multiple assembled PCBs left for sending to the Netherlands?

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 04 2021 10:43am

fietstasss wrote:
Nov 04 2021 7:34am
Anyone has one or multiple assembled PCBs left for sending to the Netherlands?
I also needed a couple of PCB for a friend, but due to the global chip shortage, the current v3 cannot be ordered.
I then created a new PCB version (v4) which uses the currently available chips.
The new PCBs have already been shipped and are on their way.
As soon as they arrive I will test them and hopefully I will publish the new version of the PCB.
Furthermore, if the test goes well, I will have two spare PCBs available for those interested (one v3 and one v4 PCB)
TSDZ2_ESP32_V4_3D_up.png
TSDZ2_ESP32_V4_3D_up.png (131.53 KiB) Viewed 938 times

Beli   1 W

1 W
Posts: 55
Joined: Dec 07 2020 5:08pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by Beli » Nov 04 2021 4:00pm

mspider65 wrote:
Nov 04 2021 10:43am
I then created a new PCB version (v4) which uses the currently available chips.
Would be interesting which DC/DC controller chip you are using now. The LM5166 seems to be rather sensitive anyway (burned one of my PCBs completely...).

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 04 2021 4:35pm

Beli wrote:
Nov 04 2021 4:00pm
mspider65 wrote:
Nov 04 2021 10:43am
I then created a new PCB version (v4) which uses the currently available chips.
Would be interesting which DC/DC controller chip you are using now. The LM5166 seems to be rather sensitive anyway (burned one of my PCBs completely...).
LM5166 has a nominal input voltage of up to 65V and Texas Instruments are usually high quality components. If it burned out, it should have received a too high voltage (possibly electrostatic discharge).
The v4 uses the Chinese XLSEMI XL7005A, the same used on the TSDZ2 controller board. It is rated up to 80V input voltage.

Beli   1 W

1 W
Posts: 55
Joined: Dec 07 2020 5:08pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by Beli » Nov 05 2021 4:01pm

mspider65 wrote:
Nov 04 2021 4:35pm
LM5166 has a nominal input voltage of up to 65V and Texas Instruments are usually high quality components. If it burned out, it should have received a too high voltage (possibly electrostatic discharge).
It happened while plugging in the VLCD5 - with battery not being disconnected.
Also the turning on transistor in the VLCD5 burned. I guess it happened because the plug might have had contact with battery plus and the switching line before ground had contact and a too high current flow through the turning on pin of LM5166. A resistor in that line might prevent that.
mspider65 wrote:
Nov 04 2021 4:35pm
The v4 uses the Chinese XLSEMI XL7005A, the same used on the TSDZ2 controller board. It is rated up to 80V input voltage.
Interesting - thank you.

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 06 2021 3:15am

Beli wrote:
Nov 05 2021 4:01pm
It happened while plugging in the VLCD5 - with battery not being disconnected.
Also the turning on transistor in the VLCD5 burned. I guess it happened because the plug might have had contact with battery plus and the switching line before ground had contact and a too high current flow through the turning on pin of LM5166. A resistor in that line might prevent that.
Strange, because the LM5166 Enable pin is a MOS input that doesn't sink current.
However, if this is the cause, it should no longer happen with the v4 as the XL7005A has an active low Enable which is connected to an external NMOS driven by the switching line through a high value resistor.
On the other hand the v4 has a slightly worse DC/DC conversion efficiency but it will be a better choice for those with a 14s battery as in that case with the v3 you only have about 5v of headroom.

P.S:
The V4 boards arrived yesterday and the preliminary tests went well. In the next days I will complete the tests and if all goes well I will publish the files on Github.

Pooyan   1 mW

1 mW
Posts: 13
Joined: May 20 2018 10:44am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by Pooyan » Nov 06 2021 5:45am

fietstasss wrote:
Nov 04 2021 7:34am
Anyone has one or multiple assembled PCBs left for sending to the Netherlands?
I have some....

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 08 2021 3:28pm

Hi @mspider65;
I would like to build your board, but as I have for most of the chips similar ones already available, I will not be able to use your nice and small pcb, but something more clunky...

Therefor I have the following questions:
- Will your code / the board still work, if I will not use U4 (TMP112AIDRLR), the PCB Temp sensor?
- You are using 2 different types of chips for the level shifting of TX & RX (U5 vs U6&U7). Is there a reason for that other than available space on the PCB? I have a TXB0108 chip (8 channel bi-directional level shifter) available. Could that work as well for all RX / TX shifting?

Other than that - thank you for this great project!

Beli   1 W

1 W
Posts: 55
Joined: Dec 07 2020 5:08pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by Beli » Nov 08 2021 8:49pm

endlessolli wrote:
Nov 08 2021 3:28pm
Will your code / the board still work, if I will not use U4 (TMP112AIDRLR), the PCB Temp sensor?
I may answer: yes because it's not essential.
endlessolli wrote:
Nov 08 2021 3:28pm
You are using 2 different types of chips for the level shifting of TX & RX (U5 vs U6&U7). Is there a reason for that
There is a simple reason: two different directions.
endlessolli wrote:
Nov 08 2021 3:28pm
I have a TXB0108 chip (8 channel bi-directional level shifter) available. Could that work as well for all RX / TX shifting?
I 'm not sure if the auto direction sensing will work correctly or as needed. This circuit is intended for different use.

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 09 2021 12:08pm

New PCB v4
All the the tests of v4 PCB went well.
I have updated the Giuthub repository and the wiki with the new version.
Attachments
20211109_175727.jpg
20211109_175727.jpg (1.61 MiB) Viewed 768 times

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 18 2021 5:02pm

Beli wrote:
Nov 08 2021 8:49pm
endlessolli wrote:
Nov 08 2021 3:28pm
Will your code / the board still work, if I will not use U4 (TMP112AIDRLR), the PCB Temp sensor?
I may answer: yes because it's not essential.
endlessolli wrote:
Nov 08 2021 3:28pm
You are using 2 different types of chips for the level shifting of TX & RX (U5 vs U6&U7). Is there a reason for that
There is a simple reason: two different directions.
endlessolli wrote:
Nov 08 2021 3:28pm
I have a TXB0108 chip (8 channel bi-directional level shifter) available. Could that work as well for all RX / TX shifting?
I 'm not sure if the auto direction sensing will work correctly or as needed. This circuit is intended for different use.
Thank you for the feedback.
I would still very much like to also hear @mspider65 's judgement on this.
Especially wrt if the whole thing still works, if I leave the boards temp sensor TMP112AIDRLR (not the motor-sensor) out.

Reason I am asking is that when I stumbled through the code (I am a noob wrt programming), I saw this:

Code: Select all

    if (err != ESP_OK) {
        ESP_LOGW(TAG,"TMP112 sensor not found: %d", err);
        i2c_cmd_link_delete(cmd);
        return;
    }
So the code checks, if the sensor is present.
But I don't understand enough from coding to judge if this is just a warning, or if this inhibits otherwise normal funcion of the board / code.

-> So, feedback would be highly appreciated.

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 19 2021 3:13am

endlessolli wrote:
Nov 18 2021 5:02pm
Especially wrt if the whole thing still works, if I leave the boards temp sensor TMP112AIDRLR (not the motor-sensor) out.
Yes, I can confirm that everything works even without the TMP1XX sensor installed.
endlessolli wrote:
Nov 08 2021 3:28pm
You are using 2 different types of chips for the level shifting of TX & RX (U5 vs U6&U7). Is there a reason for that
One is for 5V to 3.3V conversion and the other for 3.3V to 5V conversion. But in the new version I have used two SN74LVC2G17 for both conversion since I verified that the 3.3V output of the ESP32 is able to drive the inputs of the SN74LVC2G17 powered at 5V.
endlessolli wrote:
Nov 08 2021 3:28pm
I have a TXB0108 chip (8 channel bi-directional level shifter) available. Could that work as well for all RX / TX shifting?
It should work but sometimes these types of circuits have problems. To be sure the only way is to try.

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 19 2021 4:23am

mspider65 wrote:
Nov 19 2021 3:13am
endlessolli wrote:
Nov 18 2021 5:02pm
Especially wrt if the whole thing still works, if I leave the boards temp sensor TMP112AIDRLR (not the motor-sensor) out.
Yes, I can confirm that everything works even without the TMP1XX sensor installed.
endlessolli wrote:
Nov 08 2021 3:28pm
You are using 2 different types of chips for the level shifting of TX & RX (U5 vs U6&U7). Is there a reason for that
One is for 5V to 3.3V conversion and the other for 3.3V to 5V conversion. But in the new version I have used two SN74LVC2G17 for both conversion since I verified that the 3.3V output of the ESP32 is able to drive the inputs of the SN74LVC2G17 powered at 5V.
endlessolli wrote:
Nov 08 2021 3:28pm
I have a TXB0108 chip (8 channel bi-directional level shifter) available. Could that work as well for all RX / TX shifting?
It should work but sometimes these types of circuits have problems. To be sure the only way is to try.
Great - thank you!
I will report back once I have put it together.

Beli   1 W

1 W
Posts: 55
Joined: Dec 07 2020 5:08pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by Beli » Nov 19 2021 3:27pm

mspider65 wrote:
Nov 19 2021 3:13am
But in the new version I have used two SN74LVC2G17 for both conversion since I verified that the 3.3V output of the ESP32 is able to drive the inputs of the SN74LVC2G17 powered at 5V.
I'm using even only one Schmitt-Trigger circuit powered by 5V (which excepts 3.3V Input high level) for both directions. Towards the ESP32 I simply use a resistor voltage divider.

Theoretically no circuit is needed at all. Towards the ESP32 just a resistor voltage divider should be enough (I added the buffer for safety reasons), from the ESP32 the 3.3V level obviously works too, at least if I remember correctly casainho is using ii this way in his wireless version.

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 20 2021 2:17am

Beli wrote:
Nov 19 2021 3:27pm

I'm using even only one Schmitt-Trigger circuit powered by 5V (which excepts 3.3V Input high level) for both directions. Towards the ESP32 I simply use a resistor voltage divider.

Theoretically no circuit is needed at all. Towards the ESP32 just a resistor voltage divider should be enough (I added the buffer for safety reasons), from the ESP32 the 3.3V level obviously works too, at least if I remember correctly casainho is using ii this way in his wireless version.
Yes a reistor voltage divider works well, but in the other direction, a 5v buffer/driver is useful not only for safety reason but also to have a better connection reliability.
The cable that goes to the display is quite long an the noise margin using a 3.3v driver and a 5v receiver is small and, even though the cable going to the controller is short, it is still in a noisy environment with quite high currents switching at PWM frequency.

casainho   100 GW

100 GW
Posts: 5777
Joined: Feb 14 2011 2:43pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by casainho » Nov 20 2021 6:58pm

Sorry for took so many time to link this project on the wiki. Finally I did a relevant update to the project and so finally I added links to other projects:

Image

I were betting on TSDZ2 fully wireless (and I reused this project mobile app) using a wireless remote but I found it was very frustrating having only a LED to give feedback for user, like to see battery SOC user would need to count LED blinks.
I decided to move back again for very small display but reusing the TSDZ2 wireless hardware + using the SW102 display firmware we did developed, so the final result is a DIY simple display, that still has Bluetooth and ANT wireless connection.

Anyway, it is very interesting to see such different approaches for TSDZ2 motor.
- TSDZ2 and OpenSource EV display: 128x64 OLED display, easy to build as DIY, Bluetooth and ANT, OTA wireless updates, easy to repair and customize for other EVs.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of OpenSource knowledge and technology for ebikes: OpenSource EV display, Wireless EBike standard ANT+ and Bluetooth, TSDZ2 OpenSource firmware, KT motor controllers and displays.

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 27 2021 5:06am

endlessolli wrote:
Nov 19 2021 4:23am
Great - thank you!
I will report back once I have put it together.
Another small obstacle - hope again on help from @mspider65 ...
If I follow your instructions in the github wiki for flashing, I get an error that the esptool.exe can not be executed.
I assume this is because I use an old 32bit Window 10 Tablet for this (and I assume the exe is a 64bit version?)

So I searched and found a esptool.exe for 32 bit version (from igrr's github) , which I used to replace the one in your esptool.zip
But still no luck - now the batch file complains about the arguments passed on.
(I checked and the esptool <arguments> syntax is different, if I compare what you use vswhat igor uses; for example -p vs -cd and others)

-> Long story short: Could you provide a 32 bit Version of the esptool.exe you are using?
Last edited by endlessolli on Nov 27 2021 6:41am, edited 2 times in total.

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 27 2021 6:40am

OK - still very interested in the above question wrt 32 bit ESPTool version, but for now I did the upload on my std. 64 bit PC and it worked!
But... next problem:
My (older) Android Phone sees the device ('TSDZ2_ESP32'), when I am in the phones bluetooth settings - and I also can pair it (within the Phones settings via 123456), but - the App itself does not see the paired device:
When I go to 'Setup Bluetooth' within the App and Scan: Nothing. :-(
(I also tried to unpair it on the phones settings level and then try to see it via the App / scan function - no luck)

My phone is running lineageOS 17.1 (Android 10) and the phone has Bluetooth 4.0 capabilities (Its an old Moto G 2015 'osprey').
I tried multiple App versions from TSDZ2_ESP32v2.0.1 to TSDZ2_ESP32v2.1.11
(My day to day phone is an iPhone, so I am not soo familiar w/ Androir, but I think it tried everything, including allowing contacts etc...)

Any ideas?

This is what I get from the esp via serial, when I pair the ESP via the phones bluetooth settings:

Code: Select all

I (111322) tsdz_bt: T ESP_GATTS_CONNECT_EVT, conn_id = 0
I (111322) tsdz_bt: C ESP_GATTS_CONNECT_EVT, conn_id = 0
I (111792) tsdz_bt: The passkey Notify number:123456
I (111852) tsdz_bt: update connection params status = 0, min_int = 32, max_int =                                                 48,conn_int = 48,latency = 0, timeout = 400
W (136142) BT_SMP: FOR LE SC LTK IS USED INSTEAD OF STK
I (136392) tsdz_bt: key type = ESP_LE_KEY_LENC
I (136392) tsdz_bt: key type = ESP_LE_KEY_PENC
I (136392) tsdz_bt: key type = ESP_LE_KEY_LID
I (136802) tsdz_bt: key type = ESP_LE_KEY_PID
I (136802) tsdz_bt: remote BD_ADDR: 7422cee11ab3
I (136802) tsdz_bt: address type = 1
I (136812) tsdz_bt: pair status = success
I (136812) tsdz_bt: auth mode = ESP_LE_AUTH_REQ_SC_MITM_BOND
I (137652) tsdz_bt: update connection params status = 0, min_int = 0, max_int =                                                 0,conn_int = 6,latency = 0, timeout = 500
I (138182) tsdz_bt: update connection params status = 0, min_int = 0, max_int =                                                 0,conn_int = 48,latency = 0, timeout = 400

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 27 2021 10:36am

endlessolli wrote:
Nov 27 2021 5:06am
endlessolli wrote:
Nov 19 2021 4:23am
Great - thank you!
I will report back once I have put it together.
Another small obstacle - hope again on help from @mspider65 ...
If I follow your instructions in the github wiki for flashing, I get an error that the esptool.exe can not be executed.
I assume this is because I use an old 32bit Window 10 Tablet for this (and I assume the exe is a 64bit version?)

So I searched and found a esptool.exe for 32 bit version (from igrr's github) , which I used to replace the one in your esptool.zip
But still no luck - now the batch file complains about the arguments passed on.
(I checked and the esptool <arguments> syntax is different, if I compare what you use vswhat igor uses; for example -p vs -cd and others)

-> Long story short: Could you provide a 32 bit Version of the esptool.exe you are using?
The original esptool is a python script.
I just provided a dummy-proof one click executable version.
You could just install a python interpreter an use the original esptool script.
https://github.com/espressif/esptool

mspider65   100 W

100 W
Posts: 169
Joined: Aug 04 2019 2:10pm

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by mspider65 » Nov 27 2021 10:40am

endlessolli wrote:
Nov 27 2021 6:40am
OK - still very interested in the above question wrt 32 bit ESPTool version, but for now I did the upload on my std. 64 bit PC and it worked!
But... next problem:
My (older) Android Phone sees the device ('TSDZ2_ESP32'), when I am in the phones bluetooth settings - and I also can pair it (within the Phones settings via 123456), but - the App itself does not see the paired device:
When I go to 'Setup Bluetooth' within the App and Scan: Nothing. :-(
(I also tried to unpair it on the phones settings level and then try to see it via the App / scan function - no luck)

My phone is running lineageOS 17.1 (Android 10) and the phone has Bluetooth 4.0 capabilities (Its an old Moto G 2015 'osprey').
I tried multiple App versions from TSDZ2_ESP32v2.0.1 to TSDZ2_ESP32v2.1.11
(My day to day phone is an iPhone, so I am not soo familiar w/ Androir, but I think it tried everything, including allowing contacts etc...)

Any ideas?

This is what I get from the esp via serial, when I pair the ESP via the phones bluetooth settings:

Code: Select all

I (111322) tsdz_bt: T ESP_GATTS_CONNECT_EVT, conn_id = 0
I (111322) tsdz_bt: C ESP_GATTS_CONNECT_EVT, conn_id = 0
I (111792) tsdz_bt: The passkey Notify number:123456
I (111852) tsdz_bt: update connection params status = 0, min_int = 32, max_int =                                                 48,conn_int = 48,latency = 0, timeout = 400
W (136142) BT_SMP: FOR LE SC LTK IS USED INSTEAD OF STK
I (136392) tsdz_bt: key type = ESP_LE_KEY_LENC
I (136392) tsdz_bt: key type = ESP_LE_KEY_PENC
I (136392) tsdz_bt: key type = ESP_LE_KEY_LID
I (136802) tsdz_bt: key type = ESP_LE_KEY_PID
I (136802) tsdz_bt: remote BD_ADDR: 7422cee11ab3
I (136802) tsdz_bt: address type = 1
I (136812) tsdz_bt: pair status = success
I (136812) tsdz_bt: auth mode = ESP_LE_AUTH_REQ_SC_MITM_BOND
I (137652) tsdz_bt: update connection params status = 0, min_int = 0, max_int =                                                 0,conn_int = 6,latency = 0, timeout = 500
I (138182) tsdz_bt: update connection params status = 0, min_int = 0, max_int =                                                 0,conn_int = 48,latency = 0, timeout = 400
Probably the ESP32 board is already connected.
When connected it isn't discoverable.

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 27 2021 2:39pm

mspider65 wrote:
Nov 27 2021 10:40am
endlessolli wrote:
Nov 27 2021 6:40am
OK - still very interested in the above question wrt 32 bit ESPTool version, but for now I did the upload on my std. 64 bit PC and it worked!
But... next problem:
My (older) Android Phone sees the device ('TSDZ2_ESP32'), when I am in the phones bluetooth settings - and I also can pair it (within the Phones settings via 123456), but - the App itself does not see the paired device:
When I go to 'Setup Bluetooth' within the App and Scan: Nothing. :-(
(I also tried to unpair it on the phones settings level and then try to see it via the App / scan function - no luck)

My phone is running lineageOS 17.1 (Android 10) and the phone has Bluetooth 4.0 capabilities (Its an old Moto G 2015 'osprey').
I tried multiple App versions from TSDZ2_ESP32v2.0.1 to TSDZ2_ESP32v2.1.11
(My day to day phone is an iPhone, so I am not soo familiar w/ Androir, but I think it tried everything, including allowing contacts etc...)

Any ideas?

This is what I get from the esp via serial, when I pair the ESP via the phones bluetooth settings:

Code: Select all

I (111322) tsdz_bt: T ESP_GATTS_CONNECT_EVT, conn_id = 0
I (111322) tsdz_bt: C ESP_GATTS_CONNECT_EVT, conn_id = 0
I (111792) tsdz_bt: The passkey Notify number:123456
I (111852) tsdz_bt: update connection params status = 0, min_int = 32, max_int =                                                 48,conn_int = 48,latency = 0, timeout = 400
W (136142) BT_SMP: FOR LE SC LTK IS USED INSTEAD OF STK
I (136392) tsdz_bt: key type = ESP_LE_KEY_LENC
I (136392) tsdz_bt: key type = ESP_LE_KEY_PENC
I (136392) tsdz_bt: key type = ESP_LE_KEY_LID
I (136802) tsdz_bt: key type = ESP_LE_KEY_PID
I (136802) tsdz_bt: remote BD_ADDR: 7422cee11ab3
I (136802) tsdz_bt: address type = 1
I (136812) tsdz_bt: pair status = success
I (136812) tsdz_bt: auth mode = ESP_LE_AUTH_REQ_SC_MITM_BOND
I (137652) tsdz_bt: update connection params status = 0, min_int = 0, max_int =                                                 0,conn_int = 6,latency = 0, timeout = 500
I (138182) tsdz_bt: update connection params status = 0, min_int = 0, max_int =                                                 0,conn_int = 48,latency = 0, timeout = 400
Probably the ESP32 board is already connected.
When connected it isn't discoverable.
Unfortunately, no.
When it is being paired through the phone's bluetooth settings (like I described above), I see in the App still the grey crossed out bluetooth icon. Also, in the App's bluetooth settings, it states 'No device selected'.
Finally, also no communication towards Motor or Display is visible through the App.

Any further ideas would be highly welcome; I am also open for doing / helping with troubleshooting or root cause finding of this BT problem. (I also just saw a potentially related issue raised on your Github page? 'Bluetooth 4.2 pairing issue')

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 27 2021 5:22pm

Update: After a couple of reboots of the phone and various BT option toggles - it suddenly worked!
Amazing stuff, @mspider65!

(So far, the ESP32 (development board) is running standalone, as I am still waiting on the ESP board I am planning to use for the bike. Will update

endlessolli   1 W

1 W
Posts: 55
Joined: Jul 31 2020 11:55am

Re: BT Interface for TSDZ2 Open Source firmware - Work in progress

Post by endlessolli » Nov 28 2021 8:57am

mspider65 wrote:
Nov 27 2021 10:36am
endlessolli wrote:
Nov 27 2021 5:06am
endlessolli wrote:
Nov 19 2021 4:23am
Great - thank you!
I will report back once I have put it together.
....
-> Long story short: Could you provide a 32 bit Version of the esptool.exe you are using?
The original esptool is a python script.
I just provided a dummy-proof one click executable version.
You could just install a python interpreter an use the original esptool script.
https://github.com/espressif/esptool
Thanks - that worked well.

Post Reply