Can't connect to Unsecured Network

Hi there,
I got a Photon to do some prototyping at work. I have a secure and non-secure session at work and the secured one is WPA-enterprise so I assume I can not connect to it. The other is non-secure for company guest and it seem to connect to the device and grab device ID and key. So the configuration to the device seems fine. When I try to connect it to the network, it said “it doesn’t look like your Photon has made it to the cloud yet.” It stuck there so I don’t know what else to try. No security and password required for this WIFI. Any suggestions?

What color/pattern is the status LED (between the buttons) on the Photon showing? This guide has a description of the common patterns:
https://docs.particle.io/guide/getting-started/modes/photon/

It’s flashing green but I’m not sure why it can’t connect into this unsecure network.

On that network, is there a splash screen on which you have to click/accept something before being able to connect?

I guess this is a captive portal (as @Moors7 seems to suspect too) - these currently are a show stopper for the Photon too.
But blinking green indicates that you are not even getting there.
Can you try to clear the credentials (hold SETUP 10+ sec till rapid blue flashing) and then connect with a serial monitor like PuTTY?
If you are there enter w and supply the info you’ll be asked for.

This should at least get you to cyan blinking, but from there on the captive portal may get in your way and prevent you from entering breathing cyan state.

Hi @ScruffR, @Moors7
No, it’s not a splash page, it just unsecured network. I can connect with my laptop and desktop with any credentials and it connect just fine. I tried this with two different photons with both via iOS and USB Terminal without success. I really need this to work badly but too bad the Photon is not working out. Do you guys recommend any other WIFI microcontroller that I can try that is as easy to setup as the Photon?

Thanks!

You could try some simple SEMI_AUTOMATIC sketch that gives some more info about the actual step of the connection process that fails.
I had once posted such a test sketch here that would help narrowing down the cause for such behaviour - I’ll try to find or rewrite it - unless you are quicker on your side :wink:

Thank @ScruffR
I don’t even know what SEMI_AUTOMATIC Mode even do. I didn’t have a chance to play with the programming since I can’t even get the device to connect via WIFI. Any advices would be great appreciated!!!

Could you try flashing this code to your Photon and see how far you get

STARTUP(WiFi.selectAntenna(ANT_INTERNAL))
SYSTEM_MODE(MANUAL)


void setup() 
{
  uint32_t ms;
  WiFiAccessPoint ap[5];

  Serial.begin(115200);
  pinMode(D7, OUTPUT);
  // connect via serial terminal and press any key to send data
  while(Serial.read() < 0 && millis() < 20000) digitalWrite(D7, (millis() >> 2) % 0x88);

  digitalWrite(D7, HIGH);
  Serial.print("WiFi.on()");
  ms = millis();
  WiFi.on();
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);

  // make sure we use dynamic IP
  WiFi.useDynamicIP();
  Serial.print("Known WiFi networks");
  for (int i = WiFi.getCredentials(ap, 5)-1; i >= 0; i--) 
  {
    Serial.printlnf("  ssid: %s", ap[i].ssid);
  }

  digitalWrite(D7, HIGH);
  Serial.print("WiFi.connect()");
  ms = millis();
  WiFi.connect();
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);

  digitalWrite(D7, HIGH);
  Serial.print("waitUntil(WiFi.ready)");
  ms = millis();
  waitUntil(WiFi.ready);
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);
  
  Particle.process(); // allow for internal transfer of WiFi data
  Serial.print("localIP "); Serial.println(WiFi.localIP());
  Serial.print("gatewayIP "); Serial.println(WiFi.gatewayIP());

  digitalWrite(D7, HIGH);
  Serial.print("Particle.connect()");
  ms = millis();
  Particle.connect();
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);
  
  digitalWrite(D7, HIGH);
  Serial.print("waitUntil(Particle.connected)");
  ms = millis();
  waitUntil(Particle.connected);
  Serial.printlnf(" took %.1f sec", (millis()-ms)/1000.0);
  digitalWrite(D7, LOW);
  delay(100);

  Serial.println("Particle.connected");
}

void loop() 
{
  Particle.process();
}

You can use CLI to upload a binary via USB.

1 Like

hi @ScruffR
I copied the code and name it firmware.bin and flash it using

sudo particle flash --serial firmware.bin

It flashed successfully and then I try to run

particle setup 

It went through the process just fine but still not able to connect to the cloud, I attached the screenshot for reference. Any other ideas?

Thanks!

When you got that code running on your device you should open a serial terminal, send any byte and watch the output of the code in serial terminal (and maybe post it here)

BTW, just to make sure this is a 2.4GHz network - not 5GHz?

But @Moors7 has just pointed me to a fact that completely slipped my mind

This is not how things work.

You’d need to name the source file something.ino and do this

particle compile photon something.ino

After that you will get a .bin file which you can flash.
Or you use Build to compile and download the binary via the :cloud: symbol next to the project name.

I prefere particle flash --usb firmware.bin over --serial since it provides better feedback if the binary is invalid.

Hi @ScruffR
It is a 5GHz network. I tried to flash it again and it seemed to work with the D7 LED pin turns on and stays on. Ran the particle setup again and still no response. Is it because of the 5GHz network compatibility? I was able to connect with the Pi3 to this network but not the Particle.
My other alternative is to use the RedBearDuo with the Broadcom BCM43438, which is similar to the Pi3, so hopefully I can still use the Particle IDE for development. Do you think this works well?

Thanks!

Yup. The Photon can’t connect to 5GHz networks
https://docs.particle.io/guide/getting-started/start/photon/#prerequisites-for-setup

1 Like

Even though it’s backward compatible? Is it possible for the Photon to select a different frequency and channel? I know that our system is backward compatible.

Thank for the help @ScruffR !

I don’t think it works like that. A 2.4GHz device can not connect with a 5GHz network. I don’t think it’s a software thing, much less a channels issue.

2 Likes

Unless it’s dual-band or dual radio-selectable band AP, that’s pretty common in commercial/enterprise. My laptop will hit ours on 5GHz, but my Photon will hit it on the other side at 2.4Ghz.

Make and model on the AP would help further the debugging too. :wink: