Coder Social home page Coder Social logo

Flashing Willow with esptool about willow HOT 3 CLOSED

RazZziel avatar RazZziel commented on May 24, 2024
Flashing Willow with esptool

from willow.

Comments (3)

RazZziel avatar RazZziel commented on May 24, 2024 1

I did it!

touch nvs.bin
docker run -v$PWD/nvs.csv:/nvs.csv -v$PWD/nvs.bin:/nvs.bin espressif/idf /opt/esp/idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate --version 2 nvs.csv nvs.bin 0x24000
python3 -m esptool --port /dev/ttyACM0 write_flash 0x9000 nvs.bin

I had previously generated the nvs.csv using a template I got from utils.sh, because the one in NOTES.md is wrong (lacks the WAS URL):

key,type,encoding,value
WAS,namespace,,
URL,data,string,$WAS_URL
WIFI,namespace,,
PSK,data,string,$PASSWORD
SSID,data,string,$SSID

from willow.

stintel avatar stintel commented on May 24, 2024

Welcome to Willow. I'm in Sunday mode, so this answer might be incomplete. If this is not enough, I'll try to provide more help tomorrow.

There's a function in utils.sh that generates the NVS partition, and there's a hint in the commit message of 36ee1f7 that tells you how to flash that partition.

from willow.

RazZziel avatar RazZziel commented on May 24, 2024

Thanks!

I tried generating a NVS partition with https://www.linux-ipv6.be/esp-nvs/, and flashing it along Willow with these commands:

python3 -m esptool --port /dev/ttyACM0 write_flash 0x0 ~/Downloads/willow-dist-ESP32-S3-BOX.bin
python3 -m esptool --port /dev/ttyACM0 write_flash 0x9000 ~/Downloads/nvs.bin

I think https://www.linux-ipv6.be/esp-nvs/ doesn't work right, because if I run strings on the generated nvs.bin, my SSID is nowhere to be found, and Willow boot gets stuck trying to connect to the wifi:

I (15:12:46.139) WILLOW/NETWORK: disconnected from AP, retrying
I (15:12:48.543) WILLOW/NETWORK: disconnected from AP, retrying
I (15:12:50.947) WILLOW/NETWORK: disconnected from AP, retrying
I (15:12:53.350) WILLOW/NETWORK: disconnected from AP, retrying
I (15:12:55.754) WILLOW/NETWORK: disconnected from AP, retrying

I tried running https://www.linux-ipv6.be/esp-nvs/ again but switching the "SSID" and the "WAS URL" fields. Oddly, that seems to work better, now Willow connects to the network, but not to my WAS, and the ESP-S3-BOX screen shows "Fatal error! Failed to read NVS partition", and the boot log shows this:

I (15:15:08.239) WILLOW/NETWORK: disconnected from AP, retrying
I (15:15:08.280) WILLOW/NETWORK: unhandled network event ev_id='4'
I (15:15:09.780) WILLOW/NETWORK: received IP: 192.168.1.224
I (15:15:09.780) WILLOW/NETWORK: Using configured SNTP server 'pool.ntp.org'
E (15:15:09.783) WILLOW/MAIN: failed to open NVS namespace WAS: ESP_ERR_NVS_NOT_FOUND
I (15:15:15.013) WILLOW/NETWORK: SNTP client synchronized time to 1705266915 from server pool.ntp.org

In the commit message you linked they mention an alternative to https://www.linux-ipv6.be/esp-nvs/ in NOTES.md, and there's indeed a "Generate NVS partition" section, but it uses /opt/esp/idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py and I don't know yet where to find that tool, I guess it's from ESPs toolkit?

from willow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.