-->
Page 1 of 1

OTA manual reset freezes the device

PostPosted: Fri Jun 29, 2018 10:40 am
by picstart
With OTA installed code can be modified and uploaded just fine. The modified code will start running.
So far so good however if the reset button ( Wemos D1 r2) is pressed the device will hang trying to reconnect.
If the power is removed and then reapplied it will boot and run the new code just fine.
Is this a feature ( reset freeze on WiFi reconnect after reset button pressed manually) of OTA?

Without OTA the reset button works as expected

Re: OTA manual reset freezes the device

PostPosted: Fri Jun 29, 2018 12:23 pm
by rudy
picstart wrote:With OTA installed code can be modified and uploaded just fine.

I will assume you mean uploading the code with a serial connection. If so then what you describe is normal. And it is called a bug, but one that is not likely to be fixed.

When you serially upload OTA code you need to do a power cycle after the load to get it to work. As far as I recall.

Re: OTA manual reset freezes the device

PostPosted: Fri Jun 29, 2018 2:42 pm
by picstart
Thanks for the response perhaps I didn't make it clear.
There is no serial usb connection after the initial install of the OTA bootloader. After restarting the IDE a new WiFi network connection is available ( see comm ports network) that has its endpoint as the device that just had the bootloader uploaded to it. Using this over the air (OTA) connection a new compiled version of code can be uploaded. The new code has the embedded stubs to switch between regular running or accept an upload of newly compiled code.
Helpful if the device is some distance away and inside a case ( no need to get up and open the case to upgrade the software).
After an upload the device will begin to execute the new code. Now if with the code uploaded and running a manual reset is made the code will hang. The code will work again if the device is unpowered and then repowered.
I'm asking is this just a feature or do I need to spend several hours looking into it.