How to use ST-LINK on Xiaomi controller

ST-Link can be used on bricked controllers. A brick of the controller can occur due to an error during data transfer, the choice of a wrong firmware or a flashing of Xiaogen firmware with BLE clone or that are not 073, 074, 090.
To unlock this controller, it will be necessary to remove it from the scooter and connect the ST-LINK PINs to the controller as follows:
Subsequently it will be necessary to download the package relating to the flashing of an original Xiaomi firmware on the control unit, in order to unlock everything.
You can download M365rec file on our download page
Once the controller has been connected with ST LINK on the appropriate PINs, install the driver package for PC, insert the ST LINK dongle in the USB port and then start the m365rec.exe file . On this screen enter the serial of your scooter (easily found on a sticker on the left side of the battery compartment) and enter it in the dedicated field. Start the flashing procedure, it will take some time, once finished disconnect all the wires before reassembling the control unit on the scooter. Your control unit will have a firmware version 134, from there you can flash your firmware via bluetooth . I am attaching a video guide to make the procedure clearer:
For newer models you will find connections down below: