Arduino Forum

Products => MKR Boards => MKR1000 => Topic started by: ela55 on Feb 11, 2019, 02:30 am

Title: MKR1000 - OTA flashing does not work
Post by: ela55 on Feb 11, 2019, 02:30 am
Hello,
I am having a difficult time getting the OTA flashing operation to work.
I followed the OTA example and it appears to connect via the Network port and accepts the command to load a new program.
However it fails the flash operation.

Is there a step I have missed - or how can I correct this failure to flash. 
Everything flashes fine over the USB port.
The code size is only 51K.
Keep in mind that the OTA example code does not flash over the air either.  But it loads and flashed over USB fine .
Title: Re: MKR1000 - OTA flashing does not work
Post by: marcomss on Feb 11, 2019, 01:13 pm
I had the same behavior and the problem was the incorrect password.
Checkthe password that you assigned to the ota function.
Check also that the code size is less than half of the flash space: I've read that this is a basic requirement for flashing the code on internal flash.
I hope that this can help.
Bye.
Title: Re: MKR1000 - OTA flashing does not work
Post by: ela55 on Feb 12, 2019, 03:01 am
Hello marcromss and thank you for your reply.

The password is correct.  A connection is made and the code is uploaded.  It is just the flash portion that fails.
My code size of 51K is only 1/4 of the available flash in the MKR1000 as best I know.

As I stated the example OTA code also fails to flash and it is very small.   It also accepts the default - "blank password" , uploads , but then fails the flash operation.

Please confirm that you are using the MKR1000 and that it is flashing OTA for you.
Title: Re: MKR1000 - OTA flashing does not work
Post by: ela55 on Feb 12, 2019, 04:18 am
Thanks again marcomss,
It was the password as you said.
I had tried for too long the other night and revisited after your reply.

Working now
Thanks
Title: Re: MKR1000 - OTA flashing does not work
Post by: ela55 on Feb 13, 2019, 03:49 am
A quick update in case it might help anyone else.
I ran into the same issue on another MKR1000 tonight. 
I could upload the OTA example and get it to flash ok OTA.  However when uploading my own project with OTA embedded it failed to flash OTA.

I was trying to use the password of the new sketch, and not the OTA examples password, ( new sketch was not the default "password")   When I used the default "password" then the new sketch flashed.  Only then could I use the new sketches own password for subsequent updates.
Title: Re: MKR1000 - OTA flashing does not work
Post by: marcomss on Feb 13, 2019, 09:57 am
Hello ela55,
the behavior you are experimenting is logic: the password is hardcoded inside the sketch, so it remains the old one till you download the sketch with the new password.

Glad to hear that all is ok now.
Bye.

Title: Re: MKR1000 - OTA flashing does not work
Post by: ela55 on Feb 14, 2019, 02:20 am
Yes, obvious once you recognize it.  :smiley-confuse: