STLink Ninebot ESX ESC: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
In the case of a bricked ESC/Controller/Control Board, STLinking can save the master control board from needing to be replaced in some instances.
In the case of a bricked '''ESC/Controller/Control Board''', STLinking can save the master control board from needing to be replaced in some instances.


This is often the only way to save a board that has been bricked when the wrong firmware was flashed or an update failed.
This is often the only way to save a board that has been bricked when the wrong firmware was flashed or an update failed.
This guide shows how to STLink the Controller/Master Controlboard/ESC for the following scooters:
{{Ninebot ESX Series Model List}}


==Accessing the Debug Pins==
==Accessing the Debug Pins==


===Removing the Pole===
{{Ninebot ESX Access Internals}}


Remove the 4x Security Torx T25 screws or Hex Screws that hold the handlebar in place on the pole.
===Disassembling the ESC===


[[File: NinebotEsxHandlebarScrews.jpg|thumb|center|400px|The handlebar screws in place.]]
The internal battery unplugs fairly easily but the BMS connector may need needle-nose pliers to remove the connector.


Remove the 4x Security Torx T30 screws or Hex screws that hold the pole to the base.
3 longer hex screws hold the heat sink in place.


[[File: NinebotEsxFrontPoleScrews.jpg|thumb|center|400px|The front pole screws in place.]]
[[File:NinebotESXESCHeatsinkScrews.jpg|thumb|center|400px]]


[[File: NinebotEsxRearPoleScrews.jpg|thumb|center|400px|The rearpole screws in place.]]
2 shorter hex screws hold the charging port in place.


===Accessing the ESC===
[[File:NinebotESXESCChargingPortScrews.jpg|thumb|center|400px]]


Next comes arguably the most annoying part of the disassembly, removing the waterproofing grommets.
2 shorter hex screws hold the external battery port in place.


On the top and the bottom is two grommets that are twisted in place.  
[[File:NinebotESXESCExternalBatteryPortScrews.jpg|thumb|center|400px]]


Press down hard with a large flathead screwdriver and twist counter-clockwise until the slots line up with the metal ridge within the pole.
Once all screws have been removed, you can pull the ESC to remove it port end first.


[[File:NinebotESXInternalRubberGrommets.jpg|thumb|center|400px|Keep the grommets attached if you can.]]
[[File:NinebotESXESCRemoving.gif|thumb|center|400px|The ESC being removed from the housing/heatsink.]]


[[File:NinebotESXInternalRubberGrommetsRemoved.jpg|thumb|center|400px|The parts of the grommet.]]
[[File:NinebotESXESCRemoved.jpg|thumb|center|400px|The ESC removed from the housing/heatsink.]]
 
==Download Software==
 
{{ Install STM32 STLink Utility }}
 
==Flashing==


In some cases, pushing the rubber inner part through the plastic retainer ring will make it easier to remove.
===Connect the STLink to the Master Control Board===


Attempt to keep the wires pushed through the rubber part.
Connect pins to 5v/VCC, GND, SWDIO, and SWCLK as shown below.


Once one of the grommets has been separated/removed, the assembly can be slid out slightly which will make separating the other much easier.
[[File:NinebotESXESCSTLinkPinout.jpg|thumb|center|400px|The pins and where they should be connected.]]


Once both are separated the whole mechanism slides easily out of the pole unless the pole has been damaged or bent.
You can solder to these for a better connection or hold DuPont connectors as shown in the image.


[[File:NinebotESXInternalElectricalsRemoved.jpg|thumb|center|400px|The battery/esc internals.]]
[[File:NinebotESXESCSTLinkConnectors.jpg|thumb|center|400px|Using dupont cables to connect to the STM32.]]


===Dissassembling the ESC===
Here I did a poor solder job but it still works.


The internal battery unplugs fairly easily but the BMS connector may need needle-nose pliers to remove the connector.
===STM32 STLink Utility===
 
Download the [https://github.com/scooterhacking/firmware/blob/e0b55b1ef90aebf44305ab679d2494ceece0ce62/Ninebot%20ESx%20and%20SNSC1.x/DRV/esc139_fulldump.bin 1.3.9 full dump .bin from ScooterHacking].
 
You can only flash full dump files or the ESC will not function.


3 longer hex screws hold the heat sink in place.
Always check that you are downloading files from trusted sources(aka ScooterHacking) to avoid flashing malicious firmware.


[[File:NinebotESXESCHeatsinkScrews.jpg|thumb|center|400px]]
Open STM32 STLink Utility and attempt to connect to the ESC with the button shown below.


2 shorter hex screws hold the charging port in place.
[[File: STM32STLinkUtilityConnect.png|thumb|center|400px|Click the button shown here to attempt to connect.]]


[[File:NinebotESXESCChargingPortScrews.jpg|thumb|center|400px]]
You should be warned that readout protection is enabled if it is connected successfully.


2 shorter hex screws hold the external battery port in place.
[[File: STM32STLinkUtilityReadoutProtectionWarning.png|thumb|center|400px|The warning will be fixed in the next steps.]]


[[File:NinebotESXESCExternalBatteryPortScrews.jpg|thumb|center|400px]]
Next, press CTRL + B to open the chip settings.


Once all screws have been removed, you can pull the ESC to remove it port end first.
Select "Disabled" under "Read out protection".


[[File:NinebotESXESCRemoving.gif|thumb|center|400px|The ESC being removed from the housing/heatsink.]]
[[File: STM32STLinkUtilityChipSettings.png|thumb|center|400px|The warning will be fixed in the next steps.]]


[[File:NinebotESXESCRemoved.jpg|thumb|center|400px|The ESC removed from the housing/heatsink.]]
Next, click the open icon on the far right as shown.


==Software==
[[File:STM32STLinkUtilityOpenFile.png|thumb|center|400px|Click to open the file.]]


Download [https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link004.html#get-software STM32 STLink Utility] from the ST website.
Select the esc_fulldump139.bin file you downloaded earlier.


Scroll down and click "Get Software" and enter your email to receive a download link.
[[File:STM32STLinkUtilityOpenFulldumpFile.png|thumb|center|400px|Click to open the esc_fulldump139.bin file you downloaded earlier.]]


Install it and open it.
Click Target->Program & Verify or press CTRL + P.


==Flashing==
[[File:STM32STLinkUtilityProgramAndVerify.png|thumb|center|400px|Open the programming menu.]]


Connect pins to 5v/VCC, GND, SWDIO, and SWCLK as shown below.
Confirm one last time that the file you are flashing is the full dump and then press "Start".


[[File:NinebotESXESCSTLinkPinout.jpg|thumb|center|400px|The pins and where they should be connected.]]
[[File:STM32STLinkUtilityStartProgramming139FullDump.png|thumb|center|400px|Match the settings and confirm the file before pressing start.]]


You can solder to these for a better connection or hold DuPont connectors as shown in the image.
The program will now program the chip with the full dump.


[[File:NinebotESXESCSTLinkConnectors.jpg|thumb|center|400px|Using dupont cables to connect to the STM32.]]
Once it finishes check the console to make sure it was successful.


Download the [https://github.com/scooterhacking/firmware/blob/e0b55b1ef90aebf44305ab679d2494ceece0ce62/Ninebot%20ESx%20and%20SNSC1.x/DRV/esc139_fulldump.bin 1.3.9 full dump .bin from ScooterHacking].
[[File:STM32STLinkUtilitySuccessfulProgramming139FullDump.png|thumb|center|400px|Completely finished and successful programming.]]


Always check that you are downloading files from trusted sources(aka ScooterHacking) to avoid flashing malicious firmware.
==Reassembly==


Open STM32 STLink Utility and select the file.
{{Ninebot ESX Reassemble Internals}}


[[Category: Scooters]][[Category: Ninebot]][[Category: ESX]]
[[Category: Scooters]][[Category: Ninebot]][[Category: ESX]][[Category: STLink]]
Administrators, Swags, Bureaucrats, Administrators
3,830

edits

Navigation menu