So i brought a Photon 2 board expecting to be able to connect to 5Ghz wifi, as its stated in the product desciption :
Dual-band Wi-Fi (2.4Ghz and 5Ghz)
I manage to set up the board and connect to a 2.4Ghz network pretty easily , but when i tried to connect to 5Ghz, it couldnt connect, i also tried with particle serial wifi command in the CLI , but the 5Ghz networks just dont appear.
As of now still cant manage to, i checked a lot of post on this forum but most post about 5Ghz wifi seem to be about differentiating 2.4 from 5Ghz.
Is i even possible to connect to 5Ghz ? or am missing something obvious ?
What version of the Particle CLI are you using (particle --version)? Older versions of the CLI behave differently when scanning for networks.
Are you using a network where both share the same SSID, or do you have different SSIDs? Both should work.
What encryption is your 5 GHz network using? If it's using Enterprise Wi-Fi (WPA2 Enterprise or WPA3 Enterprise), then the Photon 2 will not be able to connect.
Does the network have a hidden SSID? If so, you won't be able to see it, but you can connect with new Device OS versions and an updated CLI.
for the particle CLI i have : 3.24.0
The network is a single SSID with multiple wifi repeaters, as for the encription it is WPA3 ( i dont think it is a WPA3 Entreprise but not 100% sure ).
The network should be strictly 5Ghz as friend with older phones cant connect to it.
I think the problem may be WPA3. There is partial support for it in Device OS 5.5.0 and later, but the other tools like the Particle CLI and setup.particle.io may not be able to see the networks yet.
@Firened Photon2/P2 definitely can return WAP scan and connect to 5GHz networks. I have tried a test rig on sites where we have had issues with the Photon and it can connect in those environments.
I assume you are using OS 5.8.0?
with the info from the pull request, and little help from chatgpt, i can now connect !
Thank you @rickkas7 for your precious help, i will mark this subject as close and leave the script that worked in case anyone has the same problem as me:
#include "Particle.h"
SYSTEM_THREAD(ENABLED); // Enable multi-threading for responsiveness
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
while (!Serial.isConnected()) {
// Wait for serial connection
}
Serial.println("Device Started!");
// Set the channel plan for 5 GHz networks
WiFi.selectAntenna(ANT_AUTO); // Selects the best available antenna
WiFi.useDynamicIP(); // Ensure using dynamic IP
// Create a WiFiCredentials object and set the credentials
WiFiCredentials cred;
cred.setSsid("SSID")
.setPassword("Password")
.setCipher(WLAN_CIPHER_AES)
.setSecurity(spark::SecurityType::WPA3)
.setHidden(true);
// Set Wi-Fi credentials
WiFi.setCredentials(cred);
Serial.println("Credentials set, attempting to connect to WiFi");
// Start the Wi-Fi connection
WiFi.on();
WiFi.connect();
Serial.println("WiFi connect called");
// Wait until the device is connected to Wi-Fi or timeout after 30 seconds
unsigned long startTime = millis();
while (!WiFi.ready() && (millis() - startTime) < 30000) {
Serial.print(".");
delay(500);
}
// Check if connected to Wi-Fi
if (WiFi.ready()) {
Serial.println("\nConnected to Wi-Fi!");
Serial.print("IP Address: ");
Serial.println(WiFi.localIP());
// Indicate successful connection using the onboard LED
RGB.control(true);
RGB.color(0, 255, 0); // Green color indicates successful connection
} else {
Serial.println("\nFailed to connect to Wi-Fi.");
RGB.control(true);
RGB.color(255, 0, 0); // Red color indicates failure to connect
}
}
void loop() {
// Main loop does nothing in this simplified test code
}