Particle does not attempt to connect to wifi

Are you able to see the Photon listed as a COM port in the device manager when it is in listening mode?

I’m running on a mac. particle serial list does show the photon mounted on /dev

Additionally i set up an unsecured wifi point in case that was causing issues, but that does not solve my issue.

Why does particle serial wifi say? Make sure the Photon is in Listening mode.

Ares:~ Trinity$ particle serial wifi
? Should I scan for nearby Wi-Fi networks? Yes
? Select the Wi-Fi network with which you wish to connect your device:
? Should I try to auto-detect the wireless security type? Yes
? Wi-Fi Password:
Attempting to configure Wi-Fi on /dev/cu.usbmodem1411
I said: w
Serial said: SSID:
I said:

Serial said:
Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2:
I said: 3

Serial said: 3
I said:

Serial said:
Thanks! Wait while I save those credentials…

Done! Your device should now restart.

After this i just get blinking cyan, no breathing. I also tried this on an unsecured network with the same deal.

Are the SSID credentials correct when you checked?

@mdma should be able to guide you on this

I am 100% positive they were inputted correctly.

Blinking cyan means it has connected to WiFi, but cannot connect to the cloud.

Please check that your router has DNS correctly configured (so that can be resolved) and that port 5683 is open for outgoing traffic.

I did a nslookup and the address did resolve. I also messed around in my router and set the cube as the default DMZ device but that didn’t seem to help it get past blinking cyan. Is there any sort of logging to see what the issue is?

To get some logging, you’ll need to use the local build system and compile with debugging enabled. To be honest, I’m not sure that wil help much - there’s not a lot happening - it resolves the name, and then tries to connect with TCP/IP to the resolved IP address on port 5683 - once that happens the LED will start to blink cyan quickly.

Looks like there’s a build error in the latest version of /latest that prevents the debug mode from working:

In file included from ../services/inc/debug.h:1:0,
                 from ./inc/socket_hal.h:34,
                 from src/photon/socket_hal.cpp:26:
src/photon/socket_hal.cpp: In function 'int read_packet_and_dispose(tcp_packet_t&, void*, int, wiced_tcp_socket_t*, int)':
src/photon/socket_hal.cpp:643:53: error: 'sd' was not declared in this scope
             DEBUG("Socket %d receive fail %d", (int)sd, int(result));
../services/inc/service_debug.h:98:138: note: in definition of macro 'DEBUG'
 #define DEBUG(fmt, ...)  do { if ( __LOG_LEVEL_TEST(DEBUG_LEVEL))  {log_print_(DEBUG_LEVEL,__LINE__,__PRETTY_FUNCTION__,_FILE_PATH,fmt,##__VA_ARGS__);}}while(0)
src/photon/socket_hal.cpp:657:56: error: 'sd' was not declared in this scope
         DEBUG("Socket %d receive bytes %d of %d", (int)sd, int(bytes_read), int(available));
../services/inc/service_debug.h:98:138: note: in definition of macro 'DEBUG'
 #define DEBUG(fmt, ...)  do { if ( __LOG_LEVEL_TEST(DEBUG_LEVEL))  {log_print_(DEBUG_LEVEL,__LINE__,__PRETTY_FUNCTION__,_FILE_PATH,fmt,##__VA_ARGS__);}}while(0)
make[2]: *** [../build/target/hal/platform-6-m/./src/photon/socket_hal.o] Error 1
make[1]: *** [hal] Error 2
make: *** [/Users/Trinity/GitHub/firmware/modules/photon/system-part1/makefile] Error 2

Beyond that. I’m not sure what else to say- DMZ mode should allow full access to the internet bypassing any firewall. I did recently switch routers when while I was waiting for my photon upgrade so I’m unsure why it would suddenly start having issues now. One other thing I did notice, the photon doesn’t seem to respond well to static allocation requests from the router. I tried to assign it a fixed ip via the router but it would not respect it and kept getting a different ip.

The debug build was fixed after the 0.4.3 release and is in the develop branch. But I really don’t think it will help you, there isn’t much output that can help troubleshoot.

I don’t believe that’s technically possible that the photon can make up it’s own IP and ignore the one allocated - that sounds pretty unlikely. :smile: DHCP is used either way if the router allocates the same IP or a varying IP, so I’m inclined to believe there is some issue with your router setup if your seeing the photon get a different IP to what your expecting.

I’ll mess around more with the router to see if something funny is going on, but i doubt this since DMZ mode didn’t work on the cube.

On a possibly related note, does it mean anything when the cyan blinks rapidly followed by what i think is an orange led blink (it’s really quick) and does this a couple of times before it settles into blinking cyan?

When cyan blinks rapidly then it has a connection to the cloud. When it blinks orange, that means you may need to reflash keys to the device.


That was it!

I am now breathing cyan. Thanks for all the help and sorry for the back and forth.

1 Like

One note though, would it be possible to make the orange blink a bit more prominent? If I hadn’t been paying attention closely I may have missed it quite easily.

That’s a good point. I’ll add it to the backlog.

Thanks again for all the help!

My pleasure, so pleased it’s working for you now. :smile: