import urequests
response = urequests.get('https://raw.githubusercontent.com/pfalc ... _init__.py')
with open('picoweb/__init__.py', mode='wb') as localfile:
localfile.write(response.content)
response = urequests.get('https://raw.githubusercontent.com/pfalc ... b/utils.py')
with open('picoweb/utils.py', mode='wb') as localfile:
localfile.write(response.content)
how install picoweb on ESP32?
Re: how install picoweb on ESP32?
Hello,
Yes the web server is running now.
So here are all the steps.
I use a esp32 wroom 32D.
I flash the firmware 3d V1.11. I don't understand why the last firware doesn't worsk?
I create the folder picoweb manually on ESP32
import uos
uos.mkdir('picoweb')
I upload on the github the last vserion of the files in picoweb folder
I use thonny to copy paste the files into the picoweb folder in the esp32
import upip
upip.install('micropython-pkg_resources')
upip.install('micropython-ulogging')
upip.install('micropython-uasyncio')
Reset your esp32 ON/OFF
And start your program with picoweb, all is running
Is anyboddy can explain why the last version of the firmware doesn't works and we have to use an old firmware?
Very thanks for all your helps
Jl
Yes the web server is running now.
So here are all the steps.
I use a esp32 wroom 32D.
I flash the firmware 3d V1.11. I don't understand why the last firware doesn't worsk?
I create the folder picoweb manually on ESP32
import uos
uos.mkdir('picoweb')
I upload on the github the last vserion of the files in picoweb folder
I use thonny to copy paste the files into the picoweb folder in the esp32
import upip
upip.install('micropython-pkg_resources')
upip.install('micropython-ulogging')
upip.install('micropython-uasyncio')
Reset your esp32 ON/OFF
And start your program with picoweb, all is running
Is anyboddy can explain why the last version of the firmware doesn't works and we have to use an old firmware?
Very thanks for all your helps
Jl
Re: how install picoweb on ESP32?
After a lot of troubleshooting my conclusion is that it's a memory fragmentation issue. The latest version probably has less memory available and in the end it runs out causing weird issues. I have the same symptoms using api.telegram.org and sometimes I manage to get:
api.telegram.org mbedtls -0x4290: RSA - The public key operation failed : BIGNUM - Memory allocation failed
but other times just weird stuff happens producing connection aborts where the underlying cause is that the wifi STA interface got shut down and I'm surmising due to memory allocation problems.
The MP heap uses the biggest chunk of memory (about 100KB) and leaves the smaller ones to esp-idf for communication and with TLS their usage gets stressed.
api.telegram.org mbedtls -0x4290: RSA - The public key operation failed : BIGNUM - Memory allocation failed
but other times just weird stuff happens producing connection aborts where the underlying cause is that the wifi STA interface got shut down and I'm surmising due to memory allocation problems.
The MP heap uses the biggest chunk of memory (about 100KB) and leaves the smaller ones to esp-idf for communication and with TLS their usage gets stressed.
Re: how install picoweb on ESP32?
I understand that it _is_ possible to make it work with regular MicroPtyhon, but the hassle probably isn't worth it.
I'd suggest trying any of the other HTTP server libraries. microdot (https://github.com/miguelgrinberg/microdot) is my personal recommendation but there's also TinyWeb, MicroWebSrv2, featherweb, etc.
-
- Posts: 9
- Joined: Sat Mar 28, 2020 4:56 pm
Re: how install picoweb on ESP32?
Yes I agree, memory fragmentation is an issue as the 8266 runs low on memory..
The biggest problem I saw with pico was memory usage. Using a browser like Chrome, it will create "speculative" connections to the device that it doesn't use - and won't let go of them. Those connections are expensive. featherweb times those connections out. The downside is you will sometimes see a "server unavailable" error. But thats better than crashing the esp...
The biggest problem I saw with pico was memory usage. Using a browser like Chrome, it will create "speculative" connections to the device that it doesn't use - and won't let go of them. Those connections are expensive. featherweb times those connections out. The downside is you will sometimes see a "server unavailable" error. But thats better than crashing the esp...
Re: how install picoweb on ESP32?
Hello, On esp32 it works very fine, no problem. I find using picoweb much easier to use than the other frameworks offered. Congratulations again to the author of Picoweb.
julien
julien
Re: how install picoweb on ESP32?
Any idea why downloading picoweb init.py from github causes my wifi connection to turn off? I get a "wifi: STA_DISCONNECTED: reason 200 beacon timeout" message, followed by nonstop "wifi: STA_DISCONNECTED: reason 201 no AP found" messages. Is is that my flash has too much stuff on it already, preventing the picoweb file from being downloaded in entirety? Very confused why this happens.
-
- Posts: 30
- Joined: Thu Jun 30, 2022 3:21 am
Re: how install picoweb on ESP32?
Thank you for the suggestion! Google brought me here. 5 minutes later I am using microdot. Tremendous.jimmo wrote: ↑Tue Apr 14, 2020 5:59 amI understand that it _is_ possible to make it work with regular MicroPtyhon, but the hassle probably isn't worth it.
I'd suggest trying any of the other HTTP server libraries. microdot (https://github.com/miguelgrinberg/microdot) is my personal recommendation but there's also TinyWeb, MicroWebSrv2, featherweb, etc.