Hi,
I’m able to upload to the wemos d1 pro (v2.0.0), but after uploading I don’t get the expected behavior. I’m loading the module 2.1 webserver. The only changes that I’ve made to the code are to specify the d1_mini_pro in the platformio.ini and to set my wifi access point and password in the main.cpp.
The code is uploaded and in the serial monitor I see:
Connecting to WiFi ……..192.168.0.23
LitleFS mounted successfully
When I go to the ip address I do not see the expected web page. I just get an error that the page con’t be found.
Also, during the compilation I do see a warning. I am wondering if this is related to my problem. The warning:
In file included from .pio/libdeps/d1_mini_pro/ESP Async WebServer/src/SPIFFSEditor.cpp:1:
.pio/libdeps/d1_mini_pro/ESP Async WebServer/src/SPIFFSEditor.h:16:101: warning: ‘SPIFFS’ is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
16 | SPIFFSEditor(const String& username=String(), const String& password=String(), const fs::FS& fs=SPIFFS);
| ^~~~~~
In file included from .pio/libdeps/d1_mini_pro/ESP Async WebServer/src/ESPAsyncWebServer.h:27,
from .pio/libdeps/d1_mini_pro/ESP Async WebServer/src/SPIFFSEditor.h:3,
from .pio/libdeps/d1_mini_pro/ESP Async WebServer/src/SPIFFSEditor.cpp:1:
/home/jesse/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/FS.h:275:15: note: declared here
275 | extern fs::FS SPIFFS __attribute__((deprecated(“SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.”)));
Thanks!
Hi again.
Are you sure your board is a D1 mini pro?
Can you try with a different board selection, like the Generic ESP8266 board?
Regards,
Sara
The project that I’m trying to run is module 2.1: Webserver with control outputs, from the “Build Webservers with ESP32 and ESP8266” book.
Also, I can ping the ip address of the esp8266 successfully, so its seems to be something with the web server functioning.
Thanks again.
Hi.
Our code already uses LittleFS for the ESP8266. That message is just a warning.
Open the JavaScript console on your web browser and check if you get any messages.
You probably didn’t upload the HTML and CSS files to the board. Are they inside a folder called data under the project folder? Did you upload the filesystem image to the board as shown on page 221?
Regards,
Sara
That is the solution… however since I’ve tried to upload the (repeatedly) I cannot successfully do so.
It just hangs when trying to connect:
Writing at 0x00204000… (0 %)
A fatal error occurred: Failed to write compressed data to flash after seq 1 (result was C400)
I’ve got visual studio installed on a laptop running ubuntu. I do wonder if I have simply missed a step, if something in my environment is not set up, et cetera. Also, I have tried two different boards, and I get the same results.
Thanks again,
Jesse
Hi.
That seems an issue with the USB port …
Try to upload a simple code using Arduino IDE and see if you’re lucky.
Then, get back to VS Code and see if you succeed.
Regards,
Sara
hello again,
I am able to get the webserver data files loaded using the arduino ide. I actually loaded the module 3, section 2.1 webserver which just turns one led on or off. The project runs as it should.
I had already loaded the project via vscode and was simply able to load the data folder with the arduino “esp8266 littlefs data upload” tool.
I tried again to load the data with vscode and it did not work. i tried just uploading the data (upload filesystem image) and going through the whole process again. whether or not I upload with arduino ide first makes no difference. I can consistently upload the sketch but not the data folder.
Both of my computers are running ubuntu 22.04.
As you might guess I am totally new to using visual studio. There were a few configuration issues that had to be sorted to get the sketch to upload. First there is setting up udev, then I had to remove brltty (both are common ubuntu issues)… Anyway I think that my issue now is with my visual studio install… or setup… or something. Anyway the problem is consistent between two different workstations.
Thank you for your help, I greatly appreciate it.
Hi again.
Can you show me a printscreen of what you see on VS Code when you try to load the filesystem image?
To share a printscreen you need to upload a picture to google drive, dropbox or imgur and then, share a link to the file.
Regards,
Sara
https://drive.google.com/file/d/1DsDwc-Ug4nXoniDkSmgZ1vye7GTMLain/view?usp=sharing
https://drive.google.com/file/d/1XO742WluPljMl7WCiZllfTFoIHGz6ePM/view?usp=sharing
Thanks again,
Jesse
I also recommend erasing the flash of the board before starting a new upload.
You can take a look at the following discussion to see how to erase flash: https://www.esp8266.com/viewtopic.php?f=6&t=3955
You can also see Rui’s response here: https://rntlab.com/question/how-perform-reset-factory-esp32/
Regards,
Sara
Hello,
First I tried to clear the flash memory. I can clear the flash memory using the python tool but that did not solve the problem.
I can upload the filesystem image when I change my board to esp12e, I tried a couple of the other variants that did not work.
Thanks for your help.
Hi again.
So, is everything working as expected with that board selection?
Regards,
Sara
Yes, everything works as expected.
I went back to the original sketch I was trying to load and (with the 4 LEDs and the BME280) and everything works as expected with the upload and the functionality of the webserver. With platformio I just need to specify “esp12e” not “wemos pro mini”. Where I didn’t have any issue with using the “wemos pro mini” board in the Arduino IDE.
Thanks again