After months of developing our own firmware for the Segway/Ninebot G2, we are finally ready to present a solution for modifying the firmware of your G2 scooter.
It works for every ESC/DRV firmware version.
To install our XiaoDash Firmware on your G2 Controller, you will need to follow multiple steps and use specific tools:
Tools:
Android Phone with OTG support (most phones support this feature, allowing you to attach USB devices to them)
StlinkV2: A small USB device used for programming microchips, such as the one on your scooter controller. For example, you can use this one: https://amzn.to/3RwBpV6 or https://amzn.to/3rlp1fU
OTG adapter/cable for your phone: This adapter is used to connect USB devices to your phone. We will use it to connect the Stlink device to your phone and flash the scooter controller. For example, you can use this one: https://amzn.to/46jw8UV or https://amzn.to/3PMl8Kl
XiaoDash License: The firmware license can be purchased in the app or on the website. Each license is bound to a specific controller, so if you have multiple scooters, each controller will require its own license.
Some basic tools to remove your controller from the scooter, allowing you to connect it to the Stlink device.
Your G2 Controller: You need to remove it from the scooter to connect the Stlink device to the specific pins and flash it.
Check the tools list and get everything ready. Video of the procedure: youtu.be/mmZo0D-FeaQ
Good tutorial in german: https://youtu.be/4FYH6iMkC4U
Open the bottom scooter compartment and remove the scooter controller from the scooter. ( Discharge the charged capacitor of the controller! Risk to create short circuits! Reduce the charge by unplugging the battery cable and pressing the power button on the dashboard)
Unscrew the bottom plate of the scooter (16 screws)
Locate the controller and lose the two screws that hold it in place
Take the controller out of the scooter compartment
Unplug the battery cable and press the dashboard button to reduce the charge in the capacitors
Unplug all other cables and remove the screws of the phase cables
The stlink pins are on the bottom plate of the controller. To reach them we have to get it out of it's metall case/heatsink
We tried to use only tools everyone should have access to: Therefore we used a hammer, a food can . a screwdriver and screw clamp and named this procedure the "CanHack" or "DosenHack"
Fix the controller by a screw clamp
Use a screwdriver and the sledge to remove the metall piece that holds the transistors in place
This way it will be much easier to loosen the PCB board
Next step is to loosen the PCB in the frame. Once loosened you can simply pull it out by hand.
Use the can or another object to concentrate the force of the hammer on the PCB without damaging it. So that it gets pressed out of the rails
Hold the can and controller in place with one hand and hammer on the upper heatsink part with the other
As soon as the PCB moved a few centimeters you can use your fingers to push it out.
Connect the four Stlink pins with a cable to the following points on your controller: GND, SWCK, SWIO, 5V. GND and 5V can be easily connected at multiple points on the controller. Check the attached image.
SWCLK and SWIO don't have a header and located on the backside of the controller. So it's not as easy to connect them without soldering. However, holding them in place for a few seconds is also sufficient. (The app has a built-in auto-flashing routine that will continuously attempt to flash the chip until successful.)
Launch the XiaoDash app and go to the Stlink Utility.
Select the correct controller and click the "Check connection" button. The app should provide a response with some chip details if it successfully communicates with the microchip.
Click "Start Stlink." The app will initiate a countdown and then attempt to flash the chip. During the countdown, you have time to hold the pins in place if you haven't soldered them. The countdown timer will restart if the flashing attempt fails, allowing you to easily retry until successful.
You will receive an accoustic and textual notification if the flashing attempt is successful.
After a successful flash, remount the in placeholder of the transistors (check video how to do that easily)
Reconnect all cables to the controller (be cautious with the power cable of the battery and avoid touching it with other cables to prevent shorting).
Power on the scooter (the dashboard will show EƎ and the light blink) and connect to it using the XiaoDash app. To proceed with the installation process, you will need to purchase a firmware license. You can pay directly in the app by clicking on the "Expand the scooter's functionality " button or on the website by providing your ScooterId : Buy
Once the payment is completed, the installation process will proceed and finished within a few seconds.
Congratulation! You successfuly installed XiaoDash Firmware on your scooter and start fine tuning it.