Device not showing online

I have connected arduino uno with ESP8266- 01. I am trying the blink example https://examples.blynk.cc/?board=Arduino%20Uno&shield=ESP8266%20WiFi%20Shield&example=GettingStarted%2FBlynkBlink

On the serial monitor I get the message as wifi connected but it doesn’t shows on the app.

The message i get on serial monitor is

[598] Connecting to Ranjan
[3782] AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(656edbf)
compile time:Jul 19 2016 18:44:44
OK
[13049] +CIFSR:STAIP,“192.168.0.4”
+CIFSR:STAMAC,“a0:20:a6:05:68:c7”
[13057] Connected to WiFi

Here is my code:

#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

char auth[] = "xxxxxxxxxxxxxxxxxxxxxxx";

char ssid[] = "Ranjan";
char pass[] = "my wifi password";

#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);

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

  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass, "35,154,12,218");
}

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

I have set the baud rate of esp to 9600 by using command (AT+UART_DEF=9600,8,1,0,0), used external power source.
Connections are done as:-
VCC - 3.3V
CH_PD - 3.3V
TX - Pin 2
RX - Pin 3
GND - GND

When processing the IP this way, I believe those need to be periods, not commas. At least that’s how I do.

Use the Debug command and see what is happening in more detail.

Hey @Gunner, thanks for your reply. :smile:

I corrected those mistakes but still the problem persists. :disappointed_relieved:

Tried that, serial monitor just shows following
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.4 on Arduino Uno

[598] Connecting to Ranjan
[3783] AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(656edbf)
compile time:Jul 19 2016 18:44:44
OK
[9052] +CIFSR:STAIP,“192.168.0.5”
+CIFSR:STAMAC,“a0:20:a6:05:68:c7”
[9058] Connected to WiFi

The IP address of the Blynk server that you’re trying to connect to seems odd.
It’s clearly not a local server on the same network as your ESP, as that’s being allocated an IP address in the 192.168.0.xxx range.

If I ping 35.154.12.218 then I get:

Pinging 35.154.12.218 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 35.154.12.218:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

If you’re using the Blynk cloud servers then why not use:

Blynk.begin(auth, wifi, ssid, pass, "blynk-cloud.com", 80);

Pete.

Hey @PeteKnight, thanks for replying.
I am not using Blynk Cloud server. I have my own server on AWS EC2 that’s why ping shows request timed out as ping requests are blocked by amazon.

In that case, I think you probably need to specify the appropriate port in the Blynk.begin command.

Pete.

1 Like

Yes… I didn’t check the IP as I also thought it was intended for the Cloud Server. With Local Server you need port 8080, unless you purposely changed something with port forwarding.

1 Like

With Blynk’s cloud server it is working fine. But when I use my server and use Blynk.begin(auth, wifi, ssid, pass, IPAddress(35,154,12,218), 8080); i get error in compiling the code as ‘IPAddress’ was declared in this scope. :tired_face:

You do it this way…

Blynk.begin(auth, wifi, ssid, pass, "35.154.12.218", 8080);

Although I like this way…

char auth[] = "xxxxxxxxxx";
char ssid[] = "xxxxxxxxxx";
char pass[] = "xxxxxxxxxx";
char server[] = "xxx.xxx.xxx.xxx";  // IP for your Local Server
int port = 8080;

WiFi.begin(ssid, pass); 
Blynk.config(auth, server, port);
Blynk.connect();
1 Like

@Gunner @PeteKnight
Thank You very much for helping me. It is working now. :smile:

I think the Blynk Example Browser should be updated as it shows that code which is giving error.

I never used that way, but I suspect there was a reason.

And you can always report an error, there is a button for that in the Example Maker

image

1 Like