ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternative

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ntableman
 
Posts: 34
Joined: Wed Jun 06, 2018 12:34 am

ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternative

Post by ntableman »

Dearest reader, I hope this focus post find you well :)

I have dozens and dozens of IoT thingies in my home - ranging from aquarium instrumentation to sensors to know if my dog went outside through her dog door. Just because I like tinkering with these sorts of things.

I have been looking to convert / rework some of thee devices to use ESPAsync_WiFiManager and have been working on my own version where I can config many of the needed parameters to make sensor deployment more turnkey - not only the wifi connection, but MQTT paths, and sensor name/location, etc... this makes it so I have one method to do the "work" I can drop into a big "shell" for my sensors.

This works great on ESP32 and ESP8266 - I have not been able to find a solution to M0's and other devices I have in my toolbox but that is ok for now - but then I got a few of the newish ESP32-S2's. The one with the TFT is super cook, except it would have been great to move the battery plug out of the way, it will be a pain to put that in an enclosure.

But! No matter what I do I cannot get ESPAsync_WiFiManager to work on these ESP32-S2. In classic style the author was kind of snarky and unhelpful on GitHub, I assume he is a lovely person, but you might not know it from his GitHub comments HAHAHA

I get : SPIFFS failed!. Please use LittleFS or EEPROM. Stay forever from his code which from tracing it through looks like it has tried to use just about EVERY filesystem type and failed.

I have 2+1 questions:

1 - anyone know how to debug these file type issues so I can keep digging into why this might be happening?
2 - anyone been able to get ESPAsync_WiFiManager working?

And a +1: anyone seen a CircuitPython alternative to ESPAsync_WiFiManager? With the growing support for sensors and other devices it would be kind of cool to give that a go.

Oh if you are not familiar ESPAsync_WiFiManager basically allows you to configure wifi and other parameters on a device without having to change the code. CircuitPython would, in theory, be easier, but as far as I know you still have to get access to the filesystem on the device (usb normally) and that isnt always practical, say, if you have some sensors on your roof or in an attic or inside something that is assembled.

User avatar
mikeysklar
 
Posts: 13945
Joined: Mon Aug 01, 2016 8:10 pm

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by mikeysklar »

Have you seen this related issue on the ESPAsync_WifiManager repo? For all I know it is your thread.

https://github.com/khoih-prog/ESPAsync_ ... /issues/74

No CircuitPython support at this time. I've not seen any guide or mention of it coming.

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by hathach »

hi, I will try to look into this, could you provide a bit more details of your setup for reproducing
1. Which board you are using
2. Your arduino IDE version
3. Esp32 core version
4. Which sketch you are running, best to be stock example
5. your compile log attached as txt for analysis

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by hathach »

hi, the issue can be caused by lack of spiffs partition, by default Adafruit EPS32s2 board use the partition scheme with tinyuf2 and fatfs only. We just made an PR to allow changing the scheme e.g with spiffs. https://github.com/espressif/arduino-esp32/pull/6770 . It may take awhile for espressif to release new verion. But if you could setup latest version from github, maybe giving it a try.

User avatar
ntableman
 
Posts: 34
Joined: Wed Jun 06, 2018 12:34 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by ntableman »

I apologize I moved along to another project - a large RGB Matrix Ambient Info Panel and a series of small clocks - my goal being a unified alerting system centered around grafana and influx - with data moving across these info panels. ANYWAY!!!
hathach wrote:hi, I will try to look into this, could you provide a bit more details of your setup for reproducing
1. Which board you are using
QT PY ESP32-S2 and Feather TFT ESP32-S2
2. Your arduino IDE version
2.0.0-rc7 or 1.8.19
3. Esp32 core version
2.0.3
4. Which sketch you are running, best to be stock example
I have tried all of the available ones in this lib, all fail with filesystem errors
5. your compile log attached as txt for analysis
there is nothing remarkable in the compile, the issue appears at runtime

User avatar
ntableman
 
Posts: 34
Joined: Wed Jun 06, 2018 12:34 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by ntableman »

hathach wrote:hi, the issue can be caused by lack of spiffs partition, by default Adafruit EPS32s2 board use the partition scheme with tinyuf2 and fatfs only. We just made an PR to allow changing the scheme e.g with spiffs. https://github.com/espressif/arduino-esp32/pull/6770 . It may take awhile for espressif to release new verion. But if you could setup latest version from github, maybe giving it a try.
I followed the instructions and setup the latest from GitHub https://docs.espressif.com/projects/ard ... html#macos

I see there is a new partition choice, TinyUF2, I picked that one and had the same result - the code barfed

Code: Select all

0:14:28.168 -> ESPAsync_WiFiManager v1.12.2
0:14:28.168 -> SPIFFS/LittleFS failed! Already tried formatting.
0:14:28.266 -> LittleFS failed!. Please use SPIFFS or EEPROM. Stay forever
Anything else specific I can try? I am certain it is using the GitHub pulled code because I removed the board manager installed version and the IDE says it is in the Sketch Folder.

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by hathach »

> I see there is a new partition choice, TinyUF2, I picked that one and had the same result - the code barfed

Sorry for not making it clear enough, No don't select TinyUF2 since it only has FATFS partition. You should select from one of the other layout that says SPIFFS. You will loose the tinyuf2 unfortunately (no uf2 upload), though you could just select back TinyUF2 to flash it whenever you like. In the future we might/could add an spiffs/littlefs layout support.

FYI, Since S2/S3 has native USB, fatfs is favored since it can also be mounted as MSC device and edited from an PC.

User avatar
ntableman
 
Posts: 34
Joined: Wed Jun 06, 2018 12:34 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by ntableman »

Code: Select all

rm -r ~/Documents/Arduino/hardware/espressif && \
                                 mkdir -p ~/Documents/Arduino/hardware/espressif && \
                                 cd ~/Documents/Arduino/hardware/espressif && \
                                 git clone https://github.com/espressif/arduino-esp32.git esp32 && \
                                 cd esp32/tools && \
                                 python3 get.py
picked the right board in the sketchbook folder: ADAFRUIT_QTPY_ESP32S2 with FATFS partition.

I do not have the board manager version of ESP32 installed, so I know I am using the cloned version.

I am still seeing the same issue. Any ideas on what I might be doing wrong? It looks like the needed changes for these boards have been merged.

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by hathach »

you should pick the partition with SPIFFS and NOT fatfs, since SPIFFS is what the library ESPAsync_WiFiManager want to use
Screenshot from 2022-06-21 15-43-53.png
Screenshot from 2022-06-21 15-43-53.png (58.39 KiB) Viewed 170 times

User avatar
ntableman
 
Posts: 34
Joined: Wed Jun 06, 2018 12:34 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by ntableman »

Same result... :(

I appreciate the help, but I think I'll let others bang up against this one before I try again.

While it is less appealing from a longer term maintenance POV, I wrote everything I needed in CP and only put my wifi in secrets, using requests to get the rest of the device config from a central server in JSON. If I could push code to CP for OTA, I'd not look back, TBH, for my sensors it is more than adequate - even able to adjust for different board types / displays easily.

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: ESP32-S2 ESPAsync_WiFiManager & CircuitPython Alternativ

Post by hathach »

thanks for trying it out. It probably requires more porting than just having spiffs partition. I am not familiar with ESPASYNC_WIFIMANAGER. If you are good with circuitpython, we can leave it as it is for now. We could come back to address this later on. Thank you for following up with the issue so far.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”