How to STLink Ninebot Max G30 BMS – Fixes Bricked or Updated Batteries

August 18th, 2023





In the case of a bricked BMS/battery, STLinking can save the battery from needing to be replaced in some instances.

For this process you will need:

  • Windows computer
  • STLink (Decent quality clones will work)
  • Tools to disassemble the scooter and access the ESC
  • Dupont male/female jumper cables

This process can be dangerous if done incorrectly so take caution when performing these steps and make sure you use a computer you are comfortable possibly destroying.

If you short a battery line you could end up blowing up your STLink, Computer, and more or even causing a fire.

This process can also be used to remove downgraded-protected rental/IoT firmware if you are returning your fleet vehicle to on-demand use rather than a rental.

I also have an article on how to STLink the controller.

Accessing the Debug Pins

Accessing the Battery

Start by removing the 18 Security Torx T-15 screws on the bottom.

The locations of the 18 screws.

The locations of the 18 screws.

Using an M4 Allen/Hex wrench or bit, remove the ten screws holding the battery in place.

Your vehicle may or may not have a metal protecting shell around the battery.

The ESC after being removed. The battery is to the left in this image.

The ESC after being removed. The battery is to the left in this image.

Carefully unplug each of the connectors.

You may need to scrape more rubber potting compound away from some of the connectors in order to unplug them.

Battery Disassembly

9 Phillips head screws hold the top cover in place.

These are EXTREMELY easy to strip so take care.

These 9 screws hold the top in place.

These 9 screws hold the top in place.

Under the white rubbery spots on the battery, there are 8 more aluminum Phillips head screws.

The screws may get stripped if you do not first remove the white potting rubber.

The screws may get stripped if you do not first remove the white potting rubber.

STLink BMS/Battery

Finding the Debug points

The top of the battery is covered in gray silicon. The area around the debug pins must be removed to access the pins as shown below.

It is just below the BMS 4-pin JST data cable.

The debug pins on a normal BMS.

The debug pins on a normal BMS.

Some boards have a slightly different layout.

The alternate debug points.

The alternate debug points.

Once you have these pins exposed, either solder jumper cables on or hold them for the next step according to the diagram below:

The pinout on a normal BMS.

The pinout on a normal BMS.

Some boards have a slightly different layout.

The alternate debug pinout.

The alternate debug pinout.

Flashing Stock BMS Firmware

The debug pins must be connected to the STLink as shown. This can be done by manually holding jumpers to the debug points or by soldering wires to connect to the jumpers.

Download the hex file from ScooterHacking, and open it in STVP.

To flash, a separate software must be used instead of the normal openOCD/STM32 STLink Utility method.

To flash it, different software is needed, in this case, STVP.

1. Connect ST-Link to BMS through STVP.

2. STM8L15xK6 for the chip

The correct chip selected here.

The correct chip selected here.

3. In the top menu select Read -> All Tabs

4. Select the bottom tab labeled “PROGRAM MEMORY”

5. Open the full dump file.

6. In the top menu select Program -> All Tabs

Verify Successful Flash

 

Connect over BLE or connect the White of the battery data line to TX and yellow to RX and black to ground in order to check the version.

It should read 1.3.4 or 5.3.4, and not 4.4.8 or anything else.

A successful flash will have either version 1.3.4 or version 5.3.4.

A successful flash will have either version 1.3.4 or version 5.3.4.

Alternatively, connect the battery to a scooter or skeleton setup and check the version there.

An unsuccessful flash will have either version 4.4.8 or something else.

An unsuccessful flash will have either version 4.4.8 or something else.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *