Don’t try this when you don’t really need it. Make sure you’ve read this post.

 

Cancel.

 Cancel is a special process. It is the termination of ESPrtk services on the user’s ESP32, this termination comes with an ESP32 security guarantee. So “Cencel” is not considered as a process used in ESPrtk.

Cancel and reuse:

  When users want to stop using ESPrtk to use ESP32 for other purposes. They will have to Flash ESP32 for their project, but this violates the security process on ESPrtk , if the user tries to FLash the program not Firmware file of ESPrtk, ESP32 will not run.

After Logout success:
Users can use ESP32 as usual (eg compiling projects on Arduino-IDE and uploading). And user can still go back to using ESP32 like ESPrtk by Re-register and Reload ESPrtk Firmware file.

 

That make the full process become :

Register -> Update firmware 1. -> Update firmware 2 -> …-> Update firmware N -> Cancel-> Register ->  Update firmware 1. -> Update firmware 2 -> …


  

However, this RegisterCancel  cycle is limited to 3 times. (The last time ESP32 can not Cancel).

 

Step 0 – Prepare hardware.:

GPIO13 pin is connected to 10 K resistor holding Pullup and CWB button. 

Release CWB (no press and no hold) with high Logic voltage level.

Press and hold CWB with low Logic voltage level.

See more circuit here :  Create an ESPrtk board from any ESP32 development boards.

To Cancel :

ESPrtk must be in state  “Register Done”  or “Update Firmware Success”    .

To upload .bin files for ESP32, we will use “Flash Download Tools” software, This is the tool provided by Espressif (ESP32 manufacturer).

If you don’t know how to use this tool, read this tutorial to learn how to upload an example:  How to use Flash Download Tools to flash .bin file for ESP32.

Download file here : 

Download .bin fileLink address
Cancel.bin Download WAP.SH
Cancel.bin Download GOOGLE DRIVE
Cancel.bin Download WORDPRESS

  

Upload configure: 

Number of bin file1
Cancel.bin address offset0x0
CrytalFreq40M
SPI SPEED80MHz
SPI MODEDIO
FLASH SIZE32Mbit

After flash Cancel.bin file.

 Open serial terminal and press Reset ESP32 . CWB button must be release. (no press and no  hold). 

Now ESP32 requires confirmation of the Cancel

To confirm Cancel , hold  the CWB button in 15 seconds., then you can release CWB button and wait until ESP32 print out  (Cancel Done …) message , total time to wait is about 2 second.

If it does not work , you can press Reset ESP32 then try again as above .

See video below:

After this step, when press Reset ESP32 ,  you will see ESP32 export an error message reading Flash like this at baudrate 115200:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun  8 2016 00:22:57

That means the Cancel is successful and ESP32 only accept plaintext code, so you need to upload the plaintext code file.

After Cancel

You can use ESP32 as usual.

To Re-register .

After Cancel, it can still be used as ESPrtk by re-registering and uploading Firmware files.
The steps to register are the same as the steps for the first registration.
Please read this post again:   Register and Update firmware to ESPrtk

Warning and limit.

This RegisterCancel  cycle is limited to 3 times, which helps prevent hardware access behaviors for FLash many times of Hackers.

The maximum number of Registrations is 4 and Cancel is 3. . (The last time ESP32 can not Cancel  and user only allow upload Firmware of ESPrtk to ESP32). 

 Therefore, the best way is not to Cancel when you are not really needed. Using a different ESP32 for your specific project would be more reasonable.


The Soda Pop