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

I found that hidden SSID did not work on Argon’s from OS 1.5 and up. I am using OS 1.4.1 on version where I need to use a hidden SSID. Not sure where to log a ticket on this.
@ScruffR - where would I log this issue on GitHub?

GitHub issues can be looged here

But these issues are mainly for documentational purposes, extra info and keeping track of the issue since there currently is no public issue tracking tool for support tickets.
The primary way to tick-in “but reports” would be such a support ticket at support.particle.io (with reference to any given GitHub issue and community post reference).

Hello All,

Sorry for somewhat reviving this post.

I’ve tried adding a hidden SSID through the particle serial wifi command (by avoiding scanning as suggested) as well as in the firmware via WiFi.setCredentials(). e.g.

                WiFiCredentials wifiConfig;
                wifiConfig.setSsid(ssid);
                wifiConfig.setSecurity((SecurityType)securityType);
                wifiConfig.setCipher((WLanSecurityCipher)securityCipher);
                wifiConfig.setPassword(password);
                wifiConfig.setChannel(channel);
                WiFi.setCredentials(wifiConfig);

but with no success. I have no problems connecting to regular networks and unhiding my SSID allows my Argon device to connect to it no problem, but once the network is hidden, the device does not connect.

I am on deviceOS 2.1.0.

Just wondering if I am doing something wrong and if anyone actually managed to get an Argon connected to a hidden network on this deviceOS.

Just an update, spoke to particle support. Argons can no longer connect to hidden networks as of deviceOS 1.5.

Unfortunately a change in DeviceOS 1.5 removed the ability to connect to hidden WiFi APs. This is the relevant PR: [Argon/Boron] NCP bugfixes by avtolstoy · Pull Request #1980 · particle-iot/device-os · GitHub

The change was made to prevent devices getting stuck thinking they are connected when they are not.
I've asked that a feature request be logged to (re)add this ability, but it will be a workaround as the ESP32 does not support 802.11v/k/r (allows a device to easily hop between APs).

We'll be updating documentation to reflect this revelation.