server starts but #368
Replies: 1 comment 1 reply
|
I'm not sure if MicroPython has logic to respond to pings, to be honest, I don't think I have ever tried. I wouldn't be surprised if pings don't work, that just means that your device is running the app, so it is not paying attention to ICMP echo packets. So let's ignore that for now. In the example session you shared above you've got the following info printed: Question 1: what URL did you type on your browser to connect to this server? The correct answer is http://192.168.0.182:5000. Let me know if you used any other URL. Question 2: what is the IP address of the Windows computer from which you are connecting to this device? Which exact IP address isn't really important, what I want to confirm is that your PC is in the same subnet as your device. Question 3: what do you have running on IP address 192.168.0.100? Is it something like a Raspberry PI or similar? Probably not important, but this is what your device is going to use for DNS queries, so you seem to be running your own DNS server.
Unfortunately the ESP32 seems to be using non-standard error codes. This discussion forum has many questions about these strange negative error codes. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
im working on an update to this project: https://github.com/2003emachinesDesktop/ESP32_netwatch
im using microdot on an esp32 wroom board, so 520 kb memory.
basically i want to build a web control panel for the project.
code i am using to test is here: https://pastebin.com/hSHRtjaW
basically what happens is that when i was running an earlier this code, i can ping my esp32 from windows and it responds with replies, as soon as i connect to the board via the ip address and port in the browser, its as if the board freezes/crashes.
i thought it must be a ram issue but its not.
so i restructured the code to what is in the pastebin currently, and i got a exception -203 error once.
i really cant find anything about a exception -203 online, at all.
but otherwise, the server says its starting and i can ping it from windows and get replies. but then i try to connect and regardless of device, no browser can connect, and:
@app.route('/')
async def index(request):
with open('/html/index.html', 'r') as f:
content = f.read()
print("Free memory (after file load):", gc.mem_free())
return content, 200, {'Content-Type': 'text/html'}
never executes.
all i see in the REPL i get:
MPY: soft reboot
Free memory: 140896
trying to connect to wifi
Connection successful
('192.168.0.182', '255.255.255.0', '192.168.0.1', '192.168.0.100')
time synced
Free memory(start): 112784
started
Free memory(main): 112352
Starting async server on 0.0.0.0:5000...
and nothing else. nothing happens. i ping it and no replies and get either "request times out" or "destination host unreachable"
so i tried to just run:
@app.route('/')
async def index(request):
print("Free memory (hello world):", gc.mem_free())
return 'Hello, world!'
and the same issue happens. nothing from the browser.
occasionally if i let the script sit for too long, i will get an exception: [Errno 5] EIO which seems to be related to the I2C LCD and seems unrelated?
now i did get it working by just running
app.run()without any of the async functionality. but i need async fuctionality for the rest of my project.really not sure what else to try. thanks in advance for any help
All reactions