martes, 21 de julio de 2020

Flashing atcwatch and Stock(dafit) to P8 smartWatch


atcwatch menu

Flashing P8 - Daflasher (atcwatch and Stock)

Index
  • flashing atcwatch
  • flashing/restore the original P8 - stock dafit
    • flashing SD5
    • flashing the stock application (for dafit)
  • Common problems and solutions
  • Additional info/links
  • Glossary

 Intro:

OTA flashing process require to install and execute daflasher or nRFConnect app (available at Play)

[if you want to preserve you personal data from Dafit app, you can do a backup with android "oandbackup")

Note that:

Obvious, mobile requires to have BT enabled

If Dafit or other app to sync with smartbands are installed, they will be using the BLE connection so device will not be found, uninstall Dafit, and others such as D6notifications

flashing atcwatch

From a browser download following apps from github
  • DaFitBootloader23Hacked.bin (A custom Bootloader using the preInstalled SoftDevice5.0.1)
  • FitbootloaderDFU2 zip    (Soft Device 2)
  • ATCwatchP8.ino.zip
Daflasher app

Open daflasher app (* for  nrfConnect app see below )

Selectfile: DaFitBootloader23Hacked.bin
go back
Select: ATCdfu
Click button "Do DFU Update"
Selectfile: FitbootloaderDFU2 zip

  P8 screen    [red square and ATCnetz.de]

go twice back


Select: ATCdfu
Click button "Do DFU Update"
Atcwatch about
   [Checked box: Nordic bootloader]
   [Unchecked box: Toggle Bluetooth]
Select DFU file:  ATCwatchP8.ino.zip


 

 

flashing/restore the original P8 - stock dafit 

Intro:

Note that going back to Stock-Dafit disables the possibility of later OTA/BLE flashing. So no more easy way to flash experimental OS/ROM. You can still do it but it will require to open the back lid and connect a cable to pins)

You need to download  

  • SoftDevice: ATCdfuFromSD2toSD5.zip  (from atc1441 github page) 
  • The stock "firmware" application, you can try get the package from dafit upgrade function, and it will be .bin file of 1xxKB
  •  
Generate DFU package/nrfutil

Then you need to create DFU package containing the bin with nrfutil, a private key will be applied to the package. Though the previously downloaded SD5 will accept any possible key.

>nrfutil version  (nrfutil version 6.1.0 )

>nrfutil keys generate myprivate.key

 >nrfutil.exe pkg generate --hw-version 52 --application-version 1 --application MOY-TFK5-1.7.7.bin --sd-req 0x9D --key-file myprivate.key p8stock_tfk5.zip 

  --sd-req  softdevice FWIDs 

 --sd-req 0x9D = S132 v5.0.0S132 v5.0.0 (SD5 for stock TFK5-1.7.7)

 

flashing SD5

Select: ATCWatch

StartBootLoader
 P8 screen    [red square and ATCnetz.de]

Click button "Do DFU Update"
   [Checked box: Nordic bootloader]
   [Unchecked box: Toggle Bluetooth]
Select DFU file:ATCdfuFromSD2toSD5.zip


 P8 screen  [3 color squares and ATCnetz.de]


flashing the stock application (for dafit)

Select: ATCWatch
Do DFU Update
   [Checked box: Nordic bootloader]
   [Unchecked box: Toggle Bluetooth]
Select DFU file: p8stock_tfk5.zip  (3 files, inc .bin)





Common problems and solutions

  • Device is not found in BLE list
        turn off other BLE devices around
        stop or remove other apps that are using BLE connections
  • Progress percentage stop a some point, or it is is increasing in each attempt
      Do not panic and keep trying because to complete the flashing it can require several attempts, including restarting the P8 with a shortcut.
  • Error GATT ERROR  until success
       keep trying,
       disable/enable phone's Bluetooth
       kill daflasher app
       uninstall BLE apps (d6notification)
       turn off phone or
       try "nRF Connect" app as an alternative to Daflasher, as it also can flash a DFU 

  • Daflasher DFU FILE NOT FOUND
    • try with different file explorers
    • ES explorer (has 2 pick file 2modes), CXexplorer and Amaze
  • Reset the watch. requires to open the back lid, and create a Short in the battery, (during decs of a second) connect with metal both pins (+ and -)
  • Turn off the watch. It requires to open the back lid and unsolder the the red cable(+)

Additional info/links:

nrfConnect
select watch, Connect, DFU, ZIP
 
more info:
https://github.com/enaon/ninebot-one-nRF52/tree/master/p8-nb
https://github.com/fanoush/ds-d6/tree/master/espruino/DFU/P8 
https://github.com/atc1441/DaFlasherFiles

Glossary:

OTA On The Air
RSSI  Received Signal Strength Indicator
GATT Generic Attribute Profile
BLE Bluetooth Low Energy
DFU  Device Firmware Update
SD Soft device
precompiled and linked binary software implementing a wireless protocol developed by Nordic Semiconductor.
.ino.??
nb  ninebot (electric unicycle)



No hay comentarios: