Project stays offline on ALL mobile devices

I’m a noob to Blynk. I created several small projects just to get familiar. The first, and simplest was working all the way up to last night. Now it shows as offline on all of my mobile devices. I’ve tried resetting the hardware (ESP8266), rebuilding the code, logging out/then in to the mobile Blynk app to no avail.

I have not changed the code since it was working. I confirmed my local WiFi connection from the ESP board is working fine. I turned on BLYNK_DEBUG but can’t tell if I’m successfully connecting to the Blynk server. I can ping blynk-cloud.com and telnet to blynk-cloud.com:8442. My other two sample projects are online on all of my mobile devices, although they frequently go offline momentarily.

I read the troubleshooting doc at http://docs.blynk.cc/#troubleshooting but nothing there seems to apply to my situation.

Here’s the output from the serial monitor:

 1384, room 16 
tail 8
chksum Entering Setup...
Connecting to office
.
WiFi connected: IP address=192.168.0.94
[21159] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.4.7 on Arduino

[21164] Free RAM: 43856
[21166] Connecting to blynk-cloud.com:8442
[27476] Cmd skipped:20
LED on V1: on
[27477] Cmd skipped:20
[27477] Connecting to blynk-cloud.com:8442
[34476] Cmd skipped:20
LED on V1: off
[34476] Cmd skipped:20
[34476] Connecting to blynk-cloud.com:8442

Here’s the code:


    #define BLYNK_DEBUG
    #define BLYNK_PRINT Serial
    #define LED_PIN D4

    #include <ESP8266WiFi.h>
    #include <WiFiClient.h>
    #include <BlynkSimpleEsp8266.h>

    // You should get Auth Token in the Blynk App.
    // Go to the Project Settings (nut icon).
    char auth[] = "8befd3a1d4254b7588c1b1cdd13f7ddb";

    // WiFi configuration
    char ssid[] = "office";
    char password[] = "****";
    IPAddress staticIP(192,168,0,94);
    IPAddress gateway(192,168,0,1);
    IPAddress subnet(255,255,255,0);
    IPAddress dns1(8,8,8,8);
    WiFiClient client;
    const int httpPort = 80;

    // define some Blynk objects
    WidgetLED led1(V1);
    WidgetLED led2(2);
    BlynkTimer timer;

    static int i = 0;

    //==========================
    void setupWifi() {
      
      Serial.print("Connecting to ");
      Serial.println(ssid);
      
      WiFi.begin(ssid, password);
      WiFi.config(staticIP, gateway, subnet, dns1);
      
      while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
      }

      Serial.println("");
      Serial.print("WiFi connected: ");  
      Serial.print("IP address=");
      Serial.println(WiFi.localIP()); 
    }


    //--------------------
    void blinkLedWidget()     // method called by the timer object
    {
      if (led1.getValue()) {
        led1.off();
        Serial.println("LED on V1: off");
      } else {
        led1.on();
        Serial.println("LED on V1: on");
      }
    }

    //--------------------
    BLYNK_WRITE(0) {
      //simple test of BLYNK_WRITE api.
      String value;
      BLYNK_LOG("Got a value: %s", param.asStr());
      value = param.asInt();
      Serial.print("value=");  Serial.println(value);
    }

    //-------------------
    void setup()
    {
      pinMode(LED_PIN, OUTPUT);
      digitalWrite(LED_PIN, HIGH);
      
      // Debug console
      Serial.begin(115200);
      Serial.println("Entering Setup...");

      setupWifi();

      // Blynk.begin(auth, ssid, pass);  // no need for ssid, pass since Wifi already established.
      Blynk.config(auth);
      
      timer.setInterval(1000L, blinkLedWidget);
    }


    void loop()
    {
      
      Blynk.run();
      timer.run();

      // gradually illuminate a Blynk LED
      i = i + 4;
      if (i > 255) {
        i = 0;
      }
      led2.setValue(i);
    }

Any ideas why I suddenly cannot get this project back online on my serial monitor. Thanks!

2 posts were split to a new topic: Add, new project all stop working. Device is offline since

Looks like bad coding and has probably since been resolved… closing topic.