BLE OpenOCD UICR

meister_sd
Posts: 31
Joined: Mon Feb 24, 2020 4:29 am

BLE OpenOCD UICR

Postby meister_sd Tue Mar 31, 2020 8:05 pm

Hi There,

I posted this elsewhere with no reply so I'm trying here......

I've been messing around with my G30 and OpenOCD. I've noticed BLE113 from my replacement dashboard that is supposed to be OEM is slightly different than the BLE113 firmware from ScooterHacking. Also, when connecting the Ninebot app, it forever alters the BLE at address 0x0003F400 and puts in "N3M-Ninebot-Mini0001" along with some other info. If I flash back the dashboard with the original full dump, it verifies OK but on rebooting, it gets put back in. I verified this has something to do with the UICR because if I add into the script to program the UICR file from the M365PRO flash file:
"program UICR 0x10001000 verify"
All gets reset and all is well.

What I'm trying to do is to dump the UICR in the dashboard but the commands I use aren't working or are the wrong ones. If I issue this command:
"dump_image maxble_full_backup.bin 0 0x40000"
I get a full chip backup. I want the same, but for the UICR.

Thanks everyone
meister_sd
Posts: 31
Joined: Mon Feb 24, 2020 4:29 am

Re: BLE OpenOCD UICR

Postby meister_sd Mon Apr 06, 2020 6:16 am

The UICR is read/dumped like any other address:

bin\openocd.exe -f share\openocd\scripts\interface\stlink-v2.cfg -f share\openocd\scripts\target\nrf51.cfg -c init -c "reset halt" -c "dump_image maxble_UICR_backup.bin 0x10001000 0x400" -c reset -c exit


The script used to program BLE555 (or modified to program back another dump) is missing a programming command and you need to add a file. The script should have more at the end, like the program BLE365REC.

This is the script in the file:
bin\openocd.exe -f share\openocd\scripts\interface\stlink-v2.cfg -f share\openocd\scripts\target\nrf51.cfg -c init -c halt -c "nrf51 mass_erase" -c "program full_BLE.bin"

This is what it should be:
bin\openocd.exe -f share\openocd\scripts\interface\stlink.cfg -f share\openocd\scripts\target\nrf51.cfg -c init -c "reset halt" -c "nrf51 mass_erase" -c "program full_BLE.bin 0 verify" -c "program UICR 0x10001000 verify" -c reset

You need to pull the file "UICR" from ble365rec and put it in the max_BLE555_stlink working directory

With the UICR properly programmed back, you will get the expected bluetooth identifier to connect to and the ability to change names again.

Return to “Ninebot Max”

Who is online

Users browsing this forum: No registered users and 40 guests