How to flash your Ninebot Scooter

ProtoSkutR
Posts: 6
Joined: Sat Aug 24, 2019 9:45 pm

Re: How to flash your Ninebot Scooter

Postby ProtoSkutR Sat Aug 24, 2019 10:39 pm

Hello, I've been trying to flash ES2 dash with my nucleo64 (nucleo-l476rg) external st-link. It is using st-link v2-1, which should be backwards compatible, from what I've read. I've followed instructions and tried to use 2 different win10 machines to do it, with same result. Any ideas what to do?

C:\Users\Sonia\Downloads\openocd-0.10.0\openocd-0.10.0>.\bin-x64\openocd.exe -f .\scripts\interface\stlink-v2-1.cfg -f .\scripts\target\nrf51.cfg
Open On-Chip Debugger 0.10.0
<...>
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK v2 JTAG v28 API v2 SWIM v17 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.259513
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints -------> Every time I've gotten here, things are working.

image of my nucleo setup:
https://photos.app.goo.gl/tHSRanzgBJnmQozq8
0. See inline notes above^^^
1. Try stlink-v2, heres the diff:

Code: Select all

diff -y stlink-v2.cfg stlink-v2-1.cfg # # # STMicroelectronics ST-LINK/V2 in-circuit debugger/programme | # STMicroelectronics ST-LINK/V2-1 in-circuit debugger/program # # interface hla interface hla hla_layout stlink hla_layout stlink hla_device_desc "ST-LINK/V2" | hla_device_desc "ST-LINK/V2-1" hla_vid_pid 0x0483 0x3748 | hla_vid_pid 0x0483 0x374b
An "8" turns into a "B" that's the only difference it seems besides the -1. I would give it a try.
>>>The Nucleo is backward compat to v2 or the cfg file?

2. Make sure other USB devices are unplugged just to remove potential conflict. Think simple setup. It is crazy what can cause conflicts.
Also they recommend some side app that helps with USB drivers.
Ref#1: https://stackoverflow.com/questions/410 ... -supported

3. When I was researching using a Nucleo board, it seems that you only need to use one half of the hardware for debugging/programming at this simple level, this may somehow be related to the issue you are facing, though I don't have experience on them yet.

4. Here's what my openocd looks like when connected to STLINK usb adapter, and successfully connected to ESC (i think it is virtually identical to the dash programming)

Code: Select all

openocd -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/local/share/openocd/scripts/target/stm32f1x.cfg Open On-Chip Debugger 0.10.0 <...truncated for brevity...> adapter speed: 1000 kHz adapter_nsrst_delay: 100 none separate Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.243329 Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
5. After you have done all of these steps, what happens when you open another command windows and enter:

Code: Select all

telnet 127.0.0.1 4444
<Enter>
What happens then? Should either say accepting telnet connections or some other error. May help next steps.
Peace~
ProtoSkutR
Posts: 6
Joined: Sat Aug 24, 2019 9:45 pm

Re: How to flash your Ninebot Scooter

Postby ProtoSkutR Sat Aug 24, 2019 11:11 pm

So I connected up and flashed my head unit with errors on the programming side. See actual programming:

Head unit one:
> program full_BLE.bin
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
** Programming Started **
auto erase enabled
Unknown device (HWID 0x000000d2) -----> This is where the issue starts, I don't think it can function properly if it doesn't recognize the target HWID --> https://devzone.nordicsemi.com/f/nordic ... 0x00000142

using fast async flash loader. This is currently supported
only with ST-Link and CMSIS-DAP. If you have issues, add
"set WORKAREASIZE 0" before sourcing nrf51.cfg to disable it
flash write algorithm aborted by target
timed out while waiting for target halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x41000003 pc: 0xfffffffe msp: 0x000007a0
error waiting for target flash write algorithm
Failed to write to nrf51 flash
error writing to flash at address 0x00000000 at offset 0x00000000
embedded:startup.tcl:476: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 532
at file "embedded:startup.tcl", line 476
<...TRUNCATED for brevity...>

Since both ended with error I then tried to put the head unit back together and the head unit will not turn on. No lights no beeps but the brake lights flash a one code.. on off, on off, repeatedly. Tried to do a brake power toggle on at the same time power the unit but all I have is the steady one flash on the tail light.

Is this matching everyone's else* what do you make of the flashing process.?
~~~~~~~~~~~~~~~~~~

>>> As noted by someone else on this forum... I flashed my clone dash (no C15 cap or resist present) and all looked successful, but dash no longer displays or even appears to work, though it does turn the scooter on and off... <more to come on this later>

0. Unknown device (HWID 0x000000d2) -----> This is where the issue starts, I don't think it can function properly if it doesn't recognize the target HWID --> https://devzone.nordicsemi.com/f/nordic ... 0x00000142

I have wiggled connections and observed things going from non-working to working instantly, though mostly vice-versa.
The moment the STLINK is disconnected from target, openocd will have a GDB error and immediately will begin polling for the hardware reconnection.
With insufficient connections, it seems the data isn't sent/recvd properly


1. I'm thinking the start address and offset are wrong. This is all beginning to make sense, if it doesn't have the right info on the target, it cannot properly program it. Sigh, it appears I didn't save my notes from the dash flash, even though it doesn't work now, at least it was "successful" in programming.

>>> having a few dashboards is crucial when making these 'brick-worthy' firmware updates.
After significant effort, I'm starting to think that buying a true factory oem part would have been the better route.
<<< Though learning the ins and outs of this stuff sure has opened my eyes to the potential of what can really be done.

2. This error above really seems low level... it isn't able to identify the hardware, that's a problem that must be resolved first.
Must dive deeper.
Ref#1: https://devzone.nordicsemi.com/f/nordic ... 0x00000142
ProtoSkutR
Posts: 6
Joined: Sat Aug 24, 2019 9:45 pm

Re: How to flash your Ninebot Scooter

Postby ProtoSkutR Sat Aug 24, 2019 11:23 pm

Hey everyone, just trying to go through this process and when I run the first command I get this.

Code: Select all

Open On-Chip Debugger 0.10.0 <TRUNCATED> Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 1000 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Error: open failed in procedure 'init' in procedure 'ocd_bouncer'
All my solder connections are clean and the wires are plugged in as they should be. Any idea what's happening here?
0. Have you used a multimeter to VERIFY that you have 3.24 to 3.3V at the wire end? Using the GND to ground for the test.
1. I do not see the hardware, what are you using a clone STLINK or something else?

It will state something like the following when it actually connects to your STM/STLINK hardware (while having connection to the target):
Otherwise it is unable to access the hardware and fails before it even begins...
It can fail after below, but below shows that the hardware is connected for the most part.

Code: Select all

Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.245473
2. Do you have a light on your STLINK (or otherwise) when you plug it in to USB?
Oddly, I noticed the the protection sleeve may have been causing an issue on mine, after I removed it...
"lights, programming, action~" ~zProtoSkutR
ProtoSkutR
Posts: 6
Joined: Sat Aug 24, 2019 9:45 pm

Re: How to flash your Ninebot Scooter

Postby ProtoSkutR Sat Aug 24, 2019 11:45 pm

*SUMMARY OF ISSUES*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Clone Dashboard Reflashed with procedure - non-working dash
Issue:
- Flashed clone dash, (no C15 present), programming successful - functionality not.
Result:
- No display, turns scooter on and off, that is all.

Problem:
- That's not gonna work, need a fix for this dash.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2. Cloned Bird ESC/controller Reflashed with procedure - partially working with "Default s/n error"
Issue:
- Flashed Bird ESC, with STLINK clone, via OpenOCD &|| STUtility - programming successful - functionality not.
Result:
- Clone dash (not-flashed) connects normally, must hold BRAKE to bypass <Error35 - Default s/n>.
- Single click on dash button turns on and off headlight
- Double click on dash button switches between Eco Mode (no S) ~17kph, Normal mode (white S) ~23kph, and Sport mode (red S) ~27kph.

Problem:
- Ninebot Flasher can connect to scooter, a beep is heard, and appears to send the commands, but things pause after a bit, another beep is heard (disconnect/end operation?) and the 9botFlasher app buttons appear selectable again (showing the operation completed, in some way at least).
- ES_DownG can connect to scooter, often fails when *reading the data from scooter, never successfully completes anything.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Special Notes/Discrepancies:

When using Segway-Ninebot app on IOS, and look at scooter details, it shows version 1.3.9 (iirc, only after successful flash)
When using 9BotFlasher or ES_DownG, it shows DRV VER 5.0.5 still when I query the scooter.
>>>Why? :?:
(This is after "successfully" flashing several times)
User avatar
fivefingerdiscount
Posts: 18
Joined: Sun Jul 28, 2019 2:20 pm

Re: How to flash your Ninebot Scooter

Postby fivefingerdiscount Mon Aug 26, 2019 2:52 am

This procedure is to flash the dash board, but what about the second box on Spin scooter (got from auction) that have their gps and SIM card. ? Does flashing the dash board will brick the motor controller or anything eles or this straight forward to flash “any dashboard” and nothing eles would affects by it
You can throw away the second box on your Spin scooter that has the GPS, you don't need it. After you flash the dashboard, you need to flash the control board via ES_DownG(Android) or Ninebot-Flahser(Windows). After that enjoy your ride.
thanks for the reply with that info. but how do I flash the control board ? Tia
I paid for dis shyt!
dhscholtus
Posts: 2
Joined: Wed Aug 28, 2019 4:12 pm

Re: How to flash your Ninebot Scooter

Postby dhscholtus Wed Aug 28, 2019 4:40 pm

Interesting. I do have the st link flash tool but heres the problem. My dashboard isnt the round one like in the pictures but it is a snsc1.0 model.(longer withnsim card and gps on the circuit board)
Ive seen that bluetooth is present on the board but i dont get ir activated and so also i cant find info on where i have to solder the flash tool onto he board

https://drive.google.com/file/d/105lTTq ... p=drivesdk

https://drive.google.com/file/d/104dGKJ ... p=drivesdk
Sledhead70
Posts: 7
Joined: Wed Aug 28, 2019 11:05 pm

Re: How to flash your Ninebot Scooter

Postby Sledhead70 Wed Aug 28, 2019 11:22 pm

I have found a lot of great information on this forum, and am grateful for those maintaining it! I do have some questions and welcome any assistance.

I have 2 ES4's that both have been updated to 1.5.1 DRV and neither one will go above 15 mph any longer (both about 300 miles and used to go about 18-19mph) and despite checking battery health, throttle magnets, etc. I have found nothing wrong. I am now reading this thread and some others on the battery and realize I need to flash back to a previous version and use the generator. My questions though are do I need to flash the battery back to an earlier version of BMS to match the DRV? If so, do I use the same program (ES DownG)? I read the toolbox thread with the tutorials, but it isn't clear on what else should be updated, in what order, and starting from 1.5.1 so I want to confirm before starting anything.

Thanks!
User avatar
fivefingerdiscount
Posts: 18
Joined: Sun Jul 28, 2019 2:20 pm

Re: How to flash your Ninebot Scooter

Postby fivefingerdiscount Fri Aug 30, 2019 11:07 pm

Anyone know why I’m stuck at “asking scooter version”? I’m able to connect to it but can’t get the version in order to flash it. Reseted multiple times and nothing
I paid for dis shyt!
housi
Posts: 3
Joined: Fri Aug 23, 2019 12:36 pm

Re: How to flash your Ninebot Scooter

Postby housi Mon Sep 02, 2019 8:33 pm

Hello, I've been trying to flash ES2 dash with my nucleo64 (nucleo-l476rg) external st-link. It is using st-link v2-1, which should be backwards compatible, from what I've read. I've followed instructions and tried to use 2 different win10 machines to do it, with same result. Any ideas what to do?

C:\Users\Sonia\Downloads\openocd-0.10.0\openocd-0.10.0>.\bin-x64\openocd.exe -f .\scripts\interface\stlink-v2-1.cfg -f .\scripts\target\nrf51.cfg
Open On-Chip Debugger 0.10.0
<...>
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK v2 JTAG v28 API v2 SWIM v17 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.259513
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints -------> Every time I've gotten here, things are working.

image of my nucleo setup:
https://photos.app.goo.gl/tHSRanzgBJnmQozq8
0. See inline notes above^^^
1. Try stlink-v2, heres the diff:

Code: Select all

diff -y stlink-v2.cfg stlink-v2-1.cfg # # # STMicroelectronics ST-LINK/V2 in-circuit debugger/programme | # STMicroelectronics ST-LINK/V2-1 in-circuit debugger/program # # interface hla interface hla hla_layout stlink hla_layout stlink hla_device_desc "ST-LINK/V2" | hla_device_desc "ST-LINK/V2-1" hla_vid_pid 0x0483 0x3748 | hla_vid_pid 0x0483 0x374b
An "8" turns into a "B" that's the only difference it seems besides the -1. I would give it a try.
>>>The Nucleo is backward compat to v2 or the cfg file?

2. Make sure other USB devices are unplugged just to remove potential conflict. Think simple setup. It is crazy what can cause conflicts.
Also they recommend some side app that helps with USB drivers.
Ref#1: https://stackoverflow.com/questions/410 ... -supported

3. When I was researching using a Nucleo board, it seems that you only need to use one half of the hardware for debugging/programming at this simple level, this may somehow be related to the issue you are facing, though I don't have experience on them yet.

4. Here's what my openocd looks like when connected to STLINK usb adapter, and successfully connected to ESC (i think it is virtually identical to the dash programming)

Code: Select all

openocd -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/local/share/openocd/scripts/target/stm32f1x.cfg Open On-Chip Debugger 0.10.0 <...truncated for brevity...> adapter speed: 1000 kHz adapter_nsrst_delay: 100 none separate Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.243329 Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
5. After you have done all of these steps, what happens when you open another command windows and enter:

Code: Select all

telnet 127.0.0.1 4444
<Enter>
What happens then? Should either say accepting telnet connections or some other error. May help next steps.
Peace~
Yeah, it turned out to work just fine, despite errors ;) Little mad cause I've reinstalled libusb like 10 times with diff tools before just trying to go further... they should've marked this as 'warning' not as 'error' but well, my ES4 is alive again so... :DDD
CDogg
Posts: 79
Joined: Tue Sep 03, 2019 7:08 am

Re: How to flash your Ninebot Scooter

Postby CDogg Tue Sep 03, 2019 8:18 am

Anyone know why I’m stuck at “asking scooter version”? I’m able to connect to it but can’t get the version in order to flash it. Reseted multiple times and nothing
I've seen this question asked a few times in this thread and it doesn't seem to get a response.. does anyone know if this has been addressed somewhere else?

I too am looking for an answer to this. I purchased a (clone probably) dash from Amazon, Bluetooth enabled. ES_downG connects to NBscooter0420 just fine and Bluetooth icon on the dash stops blinking. However, I'm hung on the check ver. step as well.
Any help or direction would probably merit a nice donation :)

Return to “Ninebot ES and E-series”

Who is online

Users browsing this forum: No registered users and 5 guests