# Set OTA on NINA W106 00B

**URL:** <https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467>\
**Category:** Espressif\
**Created:** [May 23, 2023, 9:05am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467 "2023-05-23T09:05:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zapsalis](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@Zapsalis](https://forums.freertos.org/u/Zapsalis)\
**Post date:** [May 23, 2023, 9:05am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/1 "2023-05-23T09:05:51Z")

</div>

Hi,

I am currently using an evalkit Nina W106-00B board that incorporates an ESP32.

I am desperately trying to implement OTA (Over-The-Air) updates.

I started by modifying my partitions.csv file, which looks like this (without OTA) and works well:

nvs, data, nvs, 0x9000, 0x6000,  
phy\_init, data, phy, 0xf000, 0x1000,  
factory, app, factory, 0x10000, 1M,  
storage, data, spiffs, , 0xF0000,

The “factory” partition corresponds to my .bin file containing the code.  
The “storage” partition corresponds to my .bin file containing the web pages and .js files.

I tried to modify it so that when I add a new .bin file containing the code, it goes into the “ota\_0” partition, for example, and then boots without using the “factory” partition.

This is what it looks like now:

nvs, data, nvs, 0x9000, 0x6000,  
otadata, data, ota, 0xf000, 0x2000,  
phy\_init, data, phy, 0x11000, 0x1000,  
factory, app, factory, 0x20000, 1M,  
storage, data, spiffs, 0x120000, 0xF0000,  
ota\_0, app, ota\_0, 0x210000, 1M,  
ota\_1, app, ota\_1, 0x310000, 1M,

I can compile and flash it, but when I start my board, an error message appears in the logs:

ELF file SHA256: 73241a5f6639ca7a

Rebooting…  
ets Jul 29 2019 12:21:46

rst:0xc (SW\_CPU\_RESET),boot:0x33 (SPI\_FAST\_FLASH\_BOOT)  
configsip: 0, SPIWP:0xee  
clk\_drv:0x00,q\_drv:0x00,d\_drv:0x00,cs0\_drv:0x00,hd\_drv:0x00,wp\_drv:0x00  
mode:DIO, clock div:2  
load:0x3fff0030,len:1256  
load:0x40078000,len:13276  
ho 0 tail 12 room 4  
load:0x40080400,len:3032  
entry 0x40080598

assert failed: do\_core\_init startup.c:339 (flash\_ret == ESP\_OK)

Backtrace: 0x40081ee2:0x3ffe3a90 0x4008a4bd:0x3ffe3ab0 0x40090fdd:0x3ffe3ad0 0x400d2a13:0x3ffe3bf0 0x400d2abe:0x3ffe3c10 0x4008165e:0x3ffe3c40 0x4007927e:0x3ffe3c90 |\<-CORRUPTED

This message keeps looping, and the board attempts to restart without success.

How should I modify my partitions.csv file for it to work correctly?

Thanks,  
Zapsalis

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [May 23, 2023, 10:58am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/2 "2023-05-23T10:58:32Z")

</div>

Can you refer this OTA example which works on esp - [esp-aws-iot/examples/ota/ota\_mqtt at master · espressif/esp-aws-iot · GitHub](https://github.com/espressif/esp-aws-iot/tree/master/examples/ota/ota_mqtt)

---

<div class="post-metadata">

**Author:** ![Zapsalis](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@Zapsalis](https://forums.freertos.org/u/Zapsalis)\
**Post date:** [May 23, 2023, 11:47am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/3 "2023-05-23T11:47:28Z")

</div>

Thanks, but the partition table is :

pre\_prov, 0x3F, , 0xD000, 0x6000, encrypted  
nvs, data, nvs, , 0x4000,  
otadata, data, ota, , 0x2000,  
phy\_init, data, phy, , 0x1000,  
ota\_0, app, ota\_0, , 1M,  
ota\_1, app, ota\_1, , 1M,  
storage, data, nvs, , 0x4000,

And i don’t know how to adapt it for mine, because it doesn’t have factory partition. And i need to have it because my source code is in, and i’m trying to set the OTA on it.

I try to modify it so that when I add a new .bin file containing the code (normaly in the factory partition), it goes into the “ota\_0” partition, for example, and then boots without using the “factory” partition but ota\_0 with the new code.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [May 24, 2023, 4:49am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/4 "2023-05-24T04:49:26Z")

</div>

> [@Zapsalis](#):
>
> I try to modify it so that when I add a new .bin file containing the code (normaly in the factory partition), it goes into the “ota\_0” partition, for example, and then boots without using the “factory” partition but ota\_0 with the new code.

Does using `ota_0` work for you or not?

---

<div class="post-metadata">

**Author:** ![Zapsalis](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@Zapsalis](https://forums.freertos.org/u/Zapsalis)\
**Post date:** [May 24, 2023, 7:21am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/5 "2023-05-24T07:21:03Z")

</div>

No, the partition table doesn’t work for me

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [May 24, 2023, 12:41pm UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/6 "2023-05-24T12:41:35Z")

</div>

This seems like a Espressif specific problem - you are likely to get better response on Espressif forums. While searching for it, I found [this issue](https://github.com/platformio/platform-espressif32/issues/837). In case you are facing the same issue, you can try to change the flash mode as described here - [SPI Flash Modes - ESP32 - — esptool.py latest documentation](https://docs.espressif.com/projects/esptool/en/latest/esp32/advanced-topics/spi-flash-modes.html).

---

<div class="post-metadata">

**Author:** ![Zapsalis](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@Zapsalis](https://forums.freertos.org/u/Zapsalis)\
**Post date:** [May 30, 2023, 10:11am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/7 "2023-05-30T10:11:48Z")

</div>

I tried to change the flash mode with all differents mode qio / qout / dio / dout but I have the same problem no matter the choice

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [May 31, 2023, 5:26am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/8 "2023-05-31T05:26:17Z")

</div>

Did you try contacting Espressif?

---

<div class="post-metadata">

**Author:** ![Dazza0](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/dazza0/32/3578_2.png) [@Dazza0](https://forums.freertos.org/u/Dazza0)\
**Post date:** [May 31, 2023, 6:13am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/9 "2023-05-31T06:13:11Z")

</div>

@Zapsalis

Looks like the `esp_flash_init_default_chip()` call in the second stage bootloader is returning an error thus triggering the assert. This could be due to multiple reasons.

Anyhow, it looks like an ESP-IDF specific issue. Could you open an issue in at the ESP-IDF Github repository and include details such as:

- ESP-IDF version
- `sdkconfig` of your build
- Hardware used (if possible, which ESP32 chip/module version is integrated into the Nina board).

Thanks!

---

<div class="post-metadata">

**Author:** ![Zapsalis](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@Zapsalis](https://forums.freertos.org/u/Zapsalis)\
**Post date:** [May 31, 2023, 6:39am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/10 "2023-05-31T06:39:37Z")

</div>

@aggarg

No I did not try, I kept this solution as a last resort

@Dazza0

Yes i will open an issue, but can you send me a link to know where put it, because i don’t masteries Github so i don’t know where open it ?

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Dazza0](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/dazza0/32/3578_2.png) [@Dazza0](https://forums.freertos.org/u/Dazza0)\
**Post date:** [May 31, 2023, 7:36am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/11 "2023-05-31T07:36:32Z")

</div>

@Zapsalis

ESP-IDF issues can be reported via [Issues · espressif/esp-idf · GitHub](https://github.com/espressif/esp-idf/issues)

---

<div class="post-metadata">

**Author:** ![Zapsalis](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@Zapsalis](https://forums.freertos.org/u/Zapsalis)\
**Post date:** [May 31, 2023, 7:55am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/12 "2023-05-31T07:55:34Z")

</div>

Thanks @Dazza0 ,

I’m writing the issue, but my sdkconfig do 1692 lines, it’s maybe to muche to add it in my issue ?

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [May 31, 2023, 8:16am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/13 "2023-05-31T08:16:52Z")

</div>

You can attach the sdkconfig file.

---

<div class="post-metadata">

**Author:** ![Zapsalis](https://avatars.discourse-cdn.com/v4/letter/z/da6949/32.png) [@Zapsalis](https://forums.freertos.org/u/Zapsalis)\
**Post date:** [May 31, 2023, 8:40am UTC](https://forums.freertos.org/t/set-ota-on-nina-w106-00b/17467/14 "2023-05-31T08:40:26Z")

</div>

Thanks !

I did the issue number 11553
