Photon: green, cyan, red

The device does not show up in my AP’s logs so I too doubt it hits the cloud. I will test the server key asap. https://youtu.be/o7IqIUB5QFM

Video attached.

This looks like 2 “normal” orange not 1 quick red
https://docs.particle.io/support/troubleshooting/troubleshooting-support/photon/#error-codes

I would try the Photon Cloud Debug firmware. That will log all sorts of information about your access points and the cloud connection, especially if you use the combined.bin method of flashing it. In particular, the details of the DNS resolution of the cloud server.

1 Like

Nice tool Rick. Output below. I stopped it when it appeared to start repeating so I am only including data from the 1st loop.

C:\Users\Ed.THREEDOG>particle serial monitor
Opening serial monitor for com port: "COM11"
Serial monitor opened successfully:
failed to get device.spark.io from DNS, try 1
failed to get device.spark.io from DNS, try 2
failed to get device.spark.io from DNS, try 3
device.spark.io=0.0.0.0
connecting to cloud
0000038115:INFO : void establish_cloud_connection() (214):Cloud: connecting
0000038115:DEBUG: int spark_cloud_socket_connect() (834):sparkSocket Now =-1
0000038116:DEBUG: int spark_cloud_socket_connect() (853):HAL_FLASH_Read_ServerAd
dress() = type:1,domain:device.spark.io,ip: 105.118.101.100, port: 65535
0000053120:ERROR: int determine_connection_address(IPAddress&, uint16_t&, Server
Address&, bool) (800):Cloud: unable to resolve IP for device.spark.io
0000053121:DEBUG: int spark_cloud_socket_connect() (864):socketed udp=0, sparkSo
cket=536895952, 1
0000053121:DEBUG: int spark_cloud_socket_connect() (874):connection attempt to 5
4.208.229.4:5683
0000058122:ERROR: int spark_cloud_socket_connect() (889):connection failed to 54
.208.229.4:5683, code=-2
0000058122:DEBUG: int spark_cloud_socket_disconnect() (912):Close Attempt
0000058123:DEBUG: sock_result_t socket_close(sock_handle_t) (939):socket closed
200061d0
0000058123:DEBUG: int spark_cloud_socket_disconnect() (914):socket_close()=succe
ss
0000058124:WARN : void establish_cloud_connection() (225):Cloud socket connectio
n failed: -2
0000058124:DEBUG: int Internet_Test() (661):Internet test socket
0000058124:DEBUG: int Internet_Test() (663):socketed testSocket=536895952
0000058125:DEBUG: int Internet_Test() (685):Connect Attempt
0000063125:DEBUG: int Internet_Test() (687):socket_connect()=fail
0000063125:DEBUG: int Internet_Test() (696):Close
0000063125:DEBUG: sock_result_t socket_close(sock_handle_t) (939):socket closed
200061d0
0000063125:ERROR: void handle_cfod() (181):Resetting CC3000 due to 2 failed conn
ect attempts
0000063126:WARN : void manage_network_connection() (100):!! Resetting WLAN due t
o SPARK_WLAN_RESET
0000063129:INFO : void manage_network_connection() (116):Network Connect: !SPARK
_WLAN_STARTED
0000063129:INFO : virtual void ManagedNetworkInterface::connect(bool) (282):read
y():false,connecting():false,listening():false

Like I said cool tool - I modified my AP and now its making sense. The IP/gateway below is from my other location current should be 192.168.5.xxx This device has had its wifi table cleared at least 5 times why would this data be sticky?

C:\Users\Ed.THREEDOG>particle serial monitor
Opening serial monitor for com port: "COM11"
Serial monitor opened successfully:
connected to WiFi!
localIP=192.168.1.20
subnetMask=255.255.255.0
gatewayIP=192.168.1.1
dnsServerIP=0.0.0.0 (often 0.0.0.0)
dhcpServerIP=0.0.0.0 (often 0.0.0.0)
ping gateway=0
ping addr 8.8.8.8=0
failed to get device.spark.io from DNS, try 1
failed to get device.spark.io from DNS, try 2
failed to get device.spark.io from DNS, try 3
device.spark.io=0.0.0.0
connecting to cloud
0000038090:INFO : void establish_cloud_connection() (214):Cloud: connecting
0000038090:DEBUG: int spark_cloud_socket_connect() (834):sparkSocket Now =-1
0000038091:DEBUG: int spark_cloud_socket_connect() (853):HAL_FLASH_Read_ServerAd
dress() = type:1,domain:device.spark.io,ip: 105.118.101.100, port: 65535
0000053095:ERROR: int determine_connection_address(IPAddress&, uint16_t&, Server
Address&, bool) (800):Cloud: unable to resolve IP for device.spark.io
0000053095:DEBUG: int spark_cloud_socket_connect() (864):socketed udp=0, sparkSo
cket=536895952, 1
0000053096:DEBUG: int spark_cloud_socket_connect() (874):connection attempt to 5
4.208.229.4:5683
Caught Interrupt.  Cleaning up.
Serial connection closed.

Ah ha! Did you use a static IP address? That’s not cleared when you clear Wi-Fi credentials.

3 Likes

Or did you reserve and IP on the DHCP settings of the AP?

Rick & Paul, yes I used static IP but no I did not reserve DHCP.

Device is back online with Tinker and new static settings. Working fine - particle docs did hint to this “The addresses are stored persistently so that they are available in all subsequent application and also in safe mode.” shame on me for missing.

Thanks to all of you for helping resolve.

4 Likes

how did you clear the credentials? I also used a static IP.

I use this program to turn off static addressing:

#include "Particle.h"

SYSTEM_THREAD(ENABLED);

void setup() {
	Serial.begin(9600);

    // To switch back to dynamic IP, use:
    WiFi.useDynamicIP();

    // Turn on the D7 LED so we know the operation completed
    pinMode(D7, OUTPUT);
    digitalWrite(D7, HIGH);
}

void loop() {
}

To clear Wi-Fi credentials you hold down SETUP until the status LED blinks blue, and continue to hold down SETUP until it blinks blue rapidly, about 10 more seconds.

1 Like

So I had to reconnect to the device to my network via the app. It worked! Strange that it didn’t recognize it from my stored devices.