guild icon
Toit
#Wifi Access Point - Auth Mode
Thread channel in help
crockedile
crockedile 03/10/2025 12:37 PM
Currently working on a project that involves using the the esp32 as a wifi access point with a captive portal. I have everything working at this point, but would like to be establishing an open network if possible, rather than one requiring a password:
"wifi.establish --name="espfi" --ssid="espfi" --password="password" --broadcast=true"
Per error codes, it seems the code above requires the "--password" argument. Is there a way around this? I tried --password=NULL, --password="" and even attempted --authmode="open" hoping it was undocumented. No luck.
(edited)
crockedileOPcrockedile
Currently working on a project that involves using the the esp32 as a wifi access point with a captive portal. I have everything working at this point, but would like to be establi...(edited)
floitsch
floitsch 03/10/2025 01:51 PM
Not on my computer right now, but in the meantime can you show the error you get?
crockedile
crockedile 03/10/2025 01:55 PM
this is when I try running the code without the password argument:

ap := wifi.establish --name="espfi" --ssid="espfi" --broadcast=true

PS C:\Users\rob\Documents\localToit\digitalTemp> jag run -D jag.disabled captive.toit
Running 'captive.toit' on 'rounded-sale' ...
captive.toit:160:14: error: Argument mismatch for 'establish'
Some overloads allow arguments named '--channel', '--password'
ap := wifi.establish --name="espfi" --ssid="espfi" --broadcast=true
^~~~~
Compilation failed
floitsch
floitsch 03/10/2025 02:06 PM
Ok. I will be back in a few minutes. Should be easy to fix
floitsch
floitsch 03/10/2025 02:20 PM
Ok. I can reproduce.
Without password I get an "ESP_ERR_WIFI_PASSWORD".
Looking at the deeper layers now.
floitsch
floitsch 03/10/2025 02:26 PM
@crockedile unfortunately looks like we currently hardcode WIFI_AUTH_WAP2_PSK.
I'm investigating how hard it would be to support a password less AP.
floitschfloitsch
@crockedile unfortunately looks like we currently hardcode WIFI_AUTH_WAP2_PSK. I'm investigating how hard it would be to support a password less AP.
crockedile
crockedile 03/10/2025 02:28 PM
thanks for taking a look and considering the change. Hopefully not a huge change needed.
floitsch
floitsch 03/10/2025 02:28 PM
From what I can see it looks pretty easy.
floitsch
floitsch 03/10/2025 02:28 PM
Hopefully it will be in the next release.
floitsch
floitsch 03/10/2025 02:52 PM
Got it working.
🙏1
floitsch
floitsch 03/10/2025 02:52 PM
Will add a test, and ship it for review.
crockedile
crockedile 03/10/2025 03:05 PM
amazing!
12 messages in total