Hi @noobmastha. Are you using Wi-Fi? If so, this is the SSID and password of your Wi-Fi router. Unless you happen to have disabled password protection on your router, you will always need to provide the password in your sketch if you want your Arduino board to be able to connect to Arduino IoT Cloud through your router's connection to the Internet.
And what board you are using?
At ESP8266 or ESP32 i simply call begin function with just ssid without password parameter, if WiFi is not password protected (WPA/WPA2-PSK).
So variants should be like...
WiFi.begin(ssid);
WiFi.begin(ssid, pass);
maybe third and fourth parameter is supported too at WEP WiFi networks, key and keyindex
I'm using esp8266.
Yes it's working with password, but to cut long story short, in my application, it's inconvenient to use a password, so I thought it could be done by code..?
Yeah, I see that the "Arduino_ConnectionHandler" library does require the passphrase argument:
However, that should not be a problem. The "ESP8266WiFi" library uses a default parameter value to make this argument optional:
then uses that default value in the determination of whether the network is secured:
So you only need to pass NULL as the passphrase argument.
If you are using Arduino Web Editor, that will not be possible to do in the "Secret" tab because its form based interface only allows setting secrets as string literals, but you can just add it directly to your thingProperties.h file:
Thanks a Lot, I'll try that tomorrow. Btw, something strange is happening, few days ago I connected with SECRET_PASS " ", but only once, then I couldn't connect again..