rayholland
1 mW
- Joined
- Nov 25, 2022
- Messages
- 18
I'm having some problems with 'street mode' in combination with the Enerpower SW102 (Enerpower SW102 Display UART Tongsheng compatible 6-Pins)
Wiki states:
Street mode is selected on the LCD with the enable/disable 25Km/h setup option
But on the Enerpower SW102 i have, i can't ENABLE/DISABLE the 25km/h setup option.
I only can CHANGE the Speed limit from 15km/h to max. 60 km/h in the config menu (no enable/disable option)
It seems that the ESP32 can't read this value from the display, so 'street mode' (fallback from STREET_MODE_LCD_MASTER) is always activated when i power on the bike.
Can this be altered/hardcoded in the ESP32 firmware code, so that by default 'street mode' is turned off when starting the bike?
@mspider65 : is this the right place?
tsdz_data.c
volatile uint8_t ui8_app_street_mode = STREET_MODE_LCD_MASTER;
changing into:
volatile uint8_t ui8_app_street_mode = STREET_MODE_FORCE_OFF;
???
Addon: i'm getting this error when trying to build from source:
[1110/1160] Building C object esp-idf/mqtt/CMakeFiles/__idf_mqtt.dir/esp-mqtt/mqtt_client.c.objninja: build stopped: subcommand failed.
Fixed: downgraded to ESP-IDF 4.1. Build is now succesfull
Addon:
When i try to upload my TSD2-ESP32-Main.bin over OTA i get a message
Error 30 (communication error) on the display and then ESP32 started! Update error:10 in the app (firmware is not updated)
Flashing with FTDI does not work anymore (Failed to connect to Espressif device: Timed out waiting for packet header). Even when i try the original bin file (otherwise the board is working, i can connect etc. to it)
What could be wrong?
BTW: i'm using a v3 board
So, if you want to use the TSDZ2-ESP32 with an Enerpower SW102 please be aware:
It works in general out of the box but there are 3 things you have to take into account:
1. You can't update the esp32 over OTA (error 30 on the display, error 10 in the app). Fix: Just hookup the original VLCD5 display before you do the OTA update. It then will update fine.
2. It will always boot-up in street mode
3. the display has 5 assist modes (0 - off, 1 ,2 ,3 ,4 ,5) but the esp32/app/controller firmware only handles 4 (0-off, 1, 2, 3 ,4) which results in:
0 - off on the display results in 0 in the esp32/app
1 on the display does nothing in the esp32/app/controller
2 on the display maps to 1 in the esp32/app/controller
3 on the display maps to 2 in the esp32/app/controller
4 on the display maps to 3 in the esp32/app/controller
5 on the display maps to 4 in the esp32/app/controller
This is no show-stopper for me, but it is something to consider if you plan to use this Enerpower SW102 display (UART Tongsheng compatible 6-Pins)
Wiki states:
Street mode is selected on the LCD with the enable/disable 25Km/h setup option
But on the Enerpower SW102 i have, i can't ENABLE/DISABLE the 25km/h setup option.
I only can CHANGE the Speed limit from 15km/h to max. 60 km/h in the config menu (no enable/disable option)
It seems that the ESP32 can't read this value from the display, so 'street mode' (fallback from STREET_MODE_LCD_MASTER) is always activated when i power on the bike.
Can this be altered/hardcoded in the ESP32 firmware code, so that by default 'street mode' is turned off when starting the bike?
@mspider65 : is this the right place?
tsdz_data.c
volatile uint8_t ui8_app_street_mode = STREET_MODE_LCD_MASTER;
changing into:
volatile uint8_t ui8_app_street_mode = STREET_MODE_FORCE_OFF;
???
Addon: i'm getting this error when trying to build from source:
[1110/1160] Building C object esp-idf/mqtt/CMakeFiles/__idf_mqtt.dir/esp-mqtt/mqtt_client.c.objninja: build stopped: subcommand failed.
Fixed: downgraded to ESP-IDF 4.1. Build is now succesfull
Addon:
When i try to upload my TSD2-ESP32-Main.bin over OTA i get a message
Error 30 (communication error) on the display and then ESP32 started! Update error:10 in the app (firmware is not updated)
Flashing with FTDI does not work anymore (Failed to connect to Espressif device: Timed out waiting for packet header). Even when i try the original bin file (otherwise the board is working, i can connect etc. to it)
What could be wrong?
BTW: i'm using a v3 board
So, if you want to use the TSDZ2-ESP32 with an Enerpower SW102 please be aware:
It works in general out of the box but there are 3 things you have to take into account:
1. You can't update the esp32 over OTA (error 30 on the display, error 10 in the app). Fix: Just hookup the original VLCD5 display before you do the OTA update. It then will update fine.
2. It will always boot-up in street mode
3. the display has 5 assist modes (0 - off, 1 ,2 ,3 ,4 ,5) but the esp32/app/controller firmware only handles 4 (0-off, 1, 2, 3 ,4) which results in:
0 - off on the display results in 0 in the esp32/app
1 on the display does nothing in the esp32/app/controller
2 on the display maps to 1 in the esp32/app/controller
3 on the display maps to 2 in the esp32/app/controller
4 on the display maps to 3 in the esp32/app/controller
5 on the display maps to 4 in the esp32/app/controller
This is no show-stopper for me, but it is something to consider if you plan to use this Enerpower SW102 display (UART Tongsheng compatible 6-Pins)
Last edited: