Headless SKR Pro Info

Isn’t that just for AVR though? I don’t see anything about esp or other 32bit mcu’s. Something like that would be perfect though.

1 Like

Yes, that one is specifically for AVR. I was just wondering if the concept would apply - use another MCU that can push the binary data over its own serial connection from its own on-board storage.

I think esptool can do the dump. That is what I was talking about. But I don’t know the details. I would have to do some googling.

Trust me- $10 is an amazing deal for plug and play wifi retrofit.

No need to go to any more lengths for cost reduction, IMO

4 Likes

Consider programming batches of devices at the same time. Hookup bunch of ESPs/programmers to a USB hub. Then script esptool (see docs/examples for read_flash, write_flash, read_mem, write_mem) to run concurrently with different COM: ports (via -port arg) .

If I can flash and load the files at the same time, That is about as fast as I can go. Since they will be powered and I can connect via WIFI to verify.

Trying it out right now.

I’m only vaguely understanding and following this thread, but a quick search yielded this link to a standalone ESP programmer.

Ohhhhh I like that. I might have to give that a try. The octopus esp32 could be much easier to deal with with that.

This is super odd, it doesn’t work. It seems like it is working. It says it is loading the files, doesn’t error out at all, completes, resets and the files are not there. Checking the available space doesn’t change so it is not loading them at all.

|-- ESP8266-Arduino-Lua @ 0.0.30
|-- ESP8266mDNS @ 1.2
|   |-- ESP8266WiFi @ 1.0
|-- ArduinoOTA @ 1.0
|   |-- ESP8266WiFi @ 1.0
|   |-- ESP8266mDNS @ 1.2
|   |   |-- ESP8266WiFi @ 1.0
|-- DNSServer @ 1.1.1
|   |-- ESP8266WiFi @ 1.0
|-- ESP8266HTTPClient @ 1.2
|   |-- ESP8266WiFi @ 1.0
|-- BMx280MI @ 1.2.0
|   |-- Wire @ 1.0
|   |-- SPI @ 1.0
|-- DHT sensor library for ESPx @ 1.0.6
|-- WebSockets @ 2.3.6
|   |-- Hash @ 1.0
|   |-- ESP8266WiFi @ 1.0
|   |-- Ethernet @ 2.0.0
|   |   |-- SPI @ 1.0
|   |-- SPI @ 1.0
Building in release mode
Building file system image from 'esp3d\data' directory to .pioenvs\esp8266_1MB_wifi\spiffs.bin
/esp32cam.html
/export.json
/favicon.ico
/index.html.gz
/preferences.json
/tool.html
Looking for upload port...
Auto-detected: COM4
Uploading .pioenvs\esp8266_1MB_wifi\spiffs.bin
esptool.py v3.0
Serial port COM4
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: e8:68:e7:cb:d7:b0
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Compressed 262144 bytes to 114016...
Writing at 0x000bb000... (14 %)
Writing at 0x000bf000... (28 %)
Writing at 0x000c3000... (42 %)
Writing at 0x000c7000... (57 %)
Writing at 0x000cb000... (71 %)
Writing at 0x000cf000... (85 %)
Writing at 0x000d3000... (100 %)
Wrote 262144 bytes (114016 compressed) at 0x000bb000 in 10.0 seconds (effective 208.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
=================================================================================== [SUCCESS] Took 15.20 seconds =================================================================================== *  Terminal will be reused by tasks, press any key to close it.

The ESP micros have partitioned flash space. In each “board” has a different partition layout dependent the available space. Default layout is fine 90% of the time. Based on your output, it uploaded fine. The question is, is ESP3D using a certain substructure (folders) in the SPIFFS? Does it overwrite the SPIFFS on init? I’ll load ESP3D v3 on an ESP when I have time and will take a look.

1 Like

Thanks!

1 Like

I poked through the code (I’m far from a C expert) and think I found that the begin() function does some type of validation, checking for something in the EEPROM, if not found it triggers reset() that clears all settings and initializes default values.

It also looks like ESP3D is moving from SPIFFS to LittleFS, but the platformIO interaction remains the same. It also seems like it defaults to using EEPROM to store settings on the ESP8266 and “preferences.json” on the ESP32. It doesn’t help that 3.0 is still in alpha, things may change quite a bit before it’s officially released.

If you do come up with a “golden image”, you should be able to use esptool.py to dump everything, including the EEPROM, and use those images to program new units in one fell swoop. I’m going to play around a bit more, but only have some OG ESP-01 boards laying around. All of my big boys are at work. :slight_smile:

2 Likes

Edited after reading the above post fully… Fluidnc recently did a bunch of things to enable littlefs, citing it is more modern and less limited. Not sure if coding for littlefs would eventually be required, but if it is may as well deal with it now if there’s time.

1 Like

Cool thank you for digging into it. You know a lot more than me. The whole filesystem thing is new to me. Most my learnin comes from breaking Marlin.

2 Likes

The methods used for simple reads and rights just change from SPIFFS.read() to LittleFS.read() ect. Most of the magic happens in the library. Outside of that you need to make considerations for 4K blocks instead of 512b and the introduction of a legitimate directory structure. It looks like it aims to be like a “real” file system.

NP, I’m happy to contribute to this awesome project wherever I can. Unless there is a super compelling reason to use 3.0alpha, I would stick with the 2.1x code line. I’m going to load a spare SKR 1.4 with marlin and test 2.1x on an ESP-01. If it works I’ll see if I can use esptool.py to dump the image then reprogram another board and see if it all comes up clean.

1 Like

The biggest reason to go to v3 is longer filenames. The short ones are a bummer

I think long file names require both a change in marlin and the Web-UI component of ESP3D (ESP3D-WEBUI/files.js at 2.1 · luc-github/ESP3D-WEBUI · GitHub). It’s just a matter of passing an “L” with the M20 command and parsing accordingly. Maybe a pull request is in order for the 2.1 repo?

Here is a nice article that may help with the imaging.

1 Like

You could also ask at the esp3d webui devs. They probably would know right away what the challenge are, and it would remind them to keep that in mind when developing new features to consider a single command to flash it with settings.

3 Likes