https://toitlang.org/ logo
Wifi Access Point - Auth Mode
# help
c
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.
f
Not on my computer right now, but in the meantime can you show the error you get?
c
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
f
Ok. I will be back in a few minutes. Should be easy to fix
Ok. I can reproduce. Without password I get an "ESP_ERR_WIFI_PASSWORD". Looking at the deeper layers now.
@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.
c
thanks for taking a look and considering the change. Hopefully not a huge change needed.
f
From what I can see it looks pretty easy.
Hopefully it will be in the next release.
Got it working.
Will add a test, and ship it for review.
c
amazing!
did this get pushed to a production version of Toit? could you share the argument to trigger it if so?
f
I'm pretty sure it was pushed.
If you don't provide a password (out maybe an empty one) it should now be an open network
c
I will be trying that soon. Thanks again for bringing this functionality to Toit.