ScooterHacking ReFlasher - ESC recovery/downgrade

If you want to discuss about random things
User avatar
Lothean
Site Admin
Posts: 142
Joined: Fri Mar 15, 2019 2:40 am
Location: France
Contact:

ScooterHacking ReFlasher - ESC recovery/downgrade

Postby Lothean Sat Mar 26, 2022 2:51 am

ScooterHacking ReFlasher is a Windows software that facilitates the recovery of your soft-bricked Xiaomi/Ninebot ESC/BLE through SWD using an ST-Link programmer.

Image

[Download v1.2 | Last version]

Version history and changelog:
[v1.2], May 9th 2022 - Added support for BLE boards & Ninebot F-series
[v1.1], March 26th 2022 - Initial release

I had this software laying around for a few months now - never got around to finishing the BLE part. But since Segway-Ninebot and Xiaomi decided they wanted to keep modders out of their scooters, I figured making ST-Link flashing easier wouldn't hurt. So I'm releasing this version with DRV flashing only. Depending on how many of you use the software and need new functionalities, I'll see how much time I'll allocate to improve it. Update May 9th, 2022: BLE flashing now added, thanks Topol

It's fairly easy to use, just connect your ST-Link to the SWD pads of your controller. Identifying them is universal across different scooters, there's only one group of 3 pads on those boards. The square pad is GND, the middle one is SWDCLK, the last one is SWDIO. Users - feel free to post pictures of your boards with the correct pinout: I don't have any on hand.

Once all hooked up properly, select your scooter model, enter your desired serial number, put your mileage and click "Start recovery". If it doesn't work, make sure to check the console (can be displayed through the Settings drop-down menu) to read the verbose and see what went wrong.


IMPORTANT NOTE: the WinUSB driver must be installed for your ST-Link to work with this software as it uses OpenOCD.
Download the Zadig utility from the official link, then in "Options", select "List all devices", and install WinUSB.


Enjoy!
guybrush
Posts: 2
Joined: Thu Apr 04, 2019 12:28 am

Re: ScooterHacking ReFlasher - ESC recovery/downgrade

Postby guybrush Sat Mar 26, 2022 12:54 pm

Thank you, very cool !
Pavel_EST
Posts: 1
Joined: Sun May 08, 2022 8:07 pm

Re: ScooterHacking ReFlasher - ESC recovery/downgrade

Postby Pavel_EST Sun May 08, 2022 8:14 pm

Hello. I was trying to use this app but for any reason it dont work with me. I flashed drv126 fulldump with stlink sucsessfully and then opened ReFlasher. Pressing Launch recovery gives error. Win USB installed.


here is tet from console :
[ReFlasher] Starting..
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748
[ReFlasher] Found ST-Link
Info : Target voltage: 3.099297
Warn : target stm32f1x.cpu examination failed
Error: jtag status contains invalid mode value - communication failure
[ReFlasher] Lost connection
Polling target stm32f1x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Info : Previous state query failed, trying to reconnect
Polling target stm32f1x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Info : starting gdb server for stm32f1x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: mem2array: Read @ 0xe0042004, w=4, cnt=1, failed
[ReFlasher] Unknown error, check console
Error executing event examine-end on target stm32f1x.cpu:
[ReFlasher] Unknown error, check console
C:/Program Files (x86)/ScooterHacking ReFlasher/oocd/bin/..//scripts/mem_helper.tcl:6: Error:
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 288
in procedure 'mmw' called at file "oocd\scripts\target\stm32f1x.cfg", line 81
in procedure 'mrw' called at file "C:/Program Files (x86)/ScooterHacking ReFlasher/oocd/bin/..//scripts/mem_helper.tcl", line 36
at file "C:/Program Files (x86)/ScooterHacking ReFlasher/oocd/bin/..//scripts/mem_helper.tcl", line 6

Image
User avatar
Lothean
Site Admin
Posts: 142
Joined: Fri Mar 15, 2019 2:40 am
Location: France
Contact:

Re: ScooterHacking ReFlasher - ESC recovery/downgrade

Postby Lothean Mon May 09, 2022 1:05 am

Hello,

Code: Select all

Warn : target stm32f1x.cpu examination failed Error: jtag status contains invalid mode value - communication failure
This looks like an issue with OpenOCD rather than ReFlasher - which is just a wrapper for this software.

Maybe ST-Link Utility uses a lower SWD frequency, we use 1000kHz for the ESC.

You could either try having shorter leads and reducing interferences or lowering the

Code: Select all

adapter speed 1000
to 450 at line 63 in the file located at

Code: Select all

C:\Program Files (x86)\ScooterHacking ReFlasher\oocd\scripts\target\stm32f1x.cfg
User avatar
Visthum
Posts: 6
Joined: Sun Jun 05, 2022 12:19 pm

Re: ScooterHacking ReFlasher - ESC recovery/downgrade

Postby Visthum Thu Jul 28, 2022 4:11 pm

This saved my esc. Make sure to plug it into USB 2.0 port. Was very straight forward to use.
Thank you for this software!
Visthum
kris0725pl
Posts: 1
Joined: Tue Aug 30, 2022 2:33 pm

Re: ScooterHacking ReFlasher - ESC recovery/downgrade

Postby kris0725pl Tue Aug 30, 2022 2:35 pm

Windows 10...app not working. Errot net.core dll
Engeloki
Posts: 1
Joined: Tue Sep 27, 2022 11:14 am

Re: ScooterHacking ReFlasher - ESC recovery/downgrade

Postby Engeloki Tue Sep 27, 2022 11:19 am

Thanks a lot for this! Just revived successfully my Xiaomi 1S. Here are all the connections I used: https://raw.githubusercontent.com/CamiA ... g_pro2.png

Return to “Off topic”

Who is online

Users browsing this forum: No registered users and 1 guest