Connect Argon to hidden wifi network without CLI

I have a device I built with an Argon for use at my office. I never even considered there would be no 2.4ghz wifi, but come to find out that there is only a legacy network that is a hidden network. The main networks are all 5ghz.
I’ve found options for setting up a hidden network (though it’s all for older devices) using the CLI, but… I no longer have easy access to the USB port :frowning: I’d have to rip some things apart and would really rather not.
But the Android app does not give an option to manually enter the SSID. Is there any way I can do this??

I think this is an oversight in the Andoid app.
Can you file an issue report about that please?

@ScruffR Are you saying this would work on iOS?? I could probably find an iPhone.

I don’t know since I have no iOS device to test but I have tested on Android and can confirm the feature missing

@ScruffR ah, ok. No worries. Can you confirm if it’s even possible to connect to a hidden WPA2 network from the cli? If that’s an option I’m willing to try.
I also added a WiFi.setCredentials() call in setup() with what should be the correct config. My understanding was that it would add it to the credentials list and use that if the last one isn’t available. But when I turn off the AP (hotspot on my laptop) I’ve been testing with it doesn’t connect to the one I configured with setCredentials() even if I power cycle it.
Is there a better way to do that.

Have you used the four-parameter overload of WiFi.setCredentials()?
And yes, I can confirm that CLI can set the credentials for a hidden SSID too - you just need to avoid automatic scanning and provide the encryption and WLAN cipher manually.

@ScruffR Yes, in setup() I added:

WiFi.setCredentials("ssid", "pass", WPA2, WLAN_CIPHER_AES);

Just that one line. I did that from the other network obviously, but when I disabled that network it didn’t fall over to the new one I set above. Note, it’s still in AUTOMATIC mode.

Not sure exactly what you mean "you just need to avoid automatic scanning and provide the encryption and WLAN cipher manually."

My main concern there is if I do that can I keep it so that it’ll work on either wifi network?

In that case your code including the setting of credentials will only run after your device has actually connected to the cloud - when you set the credentials while you are connected to another network, you should power down the WiFi module, then power it up again and check via WiFi.getCredentials() whether your new creds have actually been stored.

I was talking about CLI which will ask you

? Should I scan for nearby Wi-Fi networks? (Y/n)

to which you have to answer n

@ScruffR So there’s no way to have hard coded optional wifi credentials AND still use the mobile app or cli tool provisioning of credentials? I need it to connect to this hidden network if available but otherwise fall back to one of the networks configured with the mobile app (non-hidden).

Have you seen my update above?

It should be possible, the Argon should be able to store up to 10 sets of WiFi credentials.

Ok… but if it fails to connect after manually disconnecting, how do I get it back on another Wifi network? I’m a bit afraid I’ll loose OTA access to it. Can you point me to a complete example of the process somewhere? I’ve looked but no luck.

I opened the GitHub issue for you

Thank you. Sorry for delay on that… was going to do it once I was got through the connection issues I had.
Which… never really got resolved. I think the hidden network in question is configured weird… I configured it from the CLI and it still didn’t work. Tried a variety of permutations. So I’m pretty sure it’s just the network, not the Argon.

1 Like