-
-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wifi.connect() fails after reset() #2295
Comments
Ouch - is this new in 3.3.6? |
No, just tested a 2v09 version ____ _
| __|___ ___ ___ _ _|_|___ ___
| __|_ -| . | _| | | | | . |
|____|___| _|_| |___|_|_|_|___|
|_| espruino.com
2v09.11 (c) 2021 G.Williams
Espruino is Open Source. Our work is supported
only by sales of official boards and donations:
http://espruino.com/Donate
Execution Interrupted
New interpreter error: LOW_MEMORY,MEMORY
> |
Not sure what causes this?! ESP32 is calling many times
ESP8266 is just calling it in The ESP32 is calling it additionally in |
I think there is a way of turning on some extra debug logging for ESP32? Memory errors are frustrating to debug because as there's no memory left a stack trace can't be stored. Is it reproducible every time with that code you added? |
Just build new app and esp-ifd files and the error disappeared ....... will run some more tests |
Ok, it still happens .... >
Execution Interrupted
New interpreter error: LOW_MEMORY,MEMORY
{ "free": 4036, "usage": 59, "total": 4095, "history": 0,
"gc": 0, "gctime": 16.768, "blocksize": 13 }
{
"sdkVersion": "v3.3.6",
"freeHeap": 2876068, "BLE": true, "Wifi": true, "minHeap": 2874536 }
>
>
>
>console.log(wifi.getIP());
{
"ip": "192.168.101.103",
"netmask": "255.255.255.0",
"gw": "192.168.101.1",
"mac": "34:94:54:c0:bd:f0"
}
=undefined |
Was'nt this changed to use jsWarn, jsError etc. long time ago ?
Am Fr., 9. Dez. 2022 um 09:26 Uhr schrieb Gordon Williams <
***@***.***>:
… I think there is a way of turning on some extra debug logging for ESP32?
Memory errors are frustrating to debug because as there's no memory left a
stack trace can't be stored.
Is it reproducible every time with that code you added?
—
Reply to this email directly, view it on GitHub
<#2295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPYNHVLYY7AUAASSDDIUA3WMLULDANCNFSM6AAAAAASLH6HRI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Edit: Do not connect if already connected var ssid="SSID";
var password="password";
var wifi=require("Wifi");
wifi.stopAP(()=> {
print(wifi.getStatus());
var status = wifi.getStatus();
if (status.ssid == ssid && status.station == "connected"){
print(wifi.getIP());
} else {
wifi.connect(ssid, {password: password}, function() {
print(wifi.getIP());
});
}
}); |
@gfwilliams: Should this be handle internaly by the wifi.connect() function? Or is handling it in JS good enough? |
The wifi.connect function should really handle this, yes. I think if it's already connected it should probably attempt to stop the connection first, as in some cases a user might want to force a reconnect to an existing AP. You mentioned in https://forum.espruino.com/conversations/395499/?offset=125#17501763 that it might be 'broken again' so do you still think this is the issue? When I tested here I enabled all the wifi debug messages and I didn't see any sign that the C3 had even managed to get a wifi connection before |
fixed in the latest build. |
We can use disconnect or connect with different setting. |
Running test wifiEvents.js
The text was updated successfully, but these errors were encountered: