Arduino+esp8266

Hello, just connecting my arduino+esp8266 to blynk but i have some problem.

This is what I have in the serial monitor.
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.4.8 on Arduino Uno

[603] Connecting to bb
[3802] AT version:0.25.0.0(Jun 5 2015 16:27:16)
SDK version:1.1.1
Ai-Thinker Technology Co. Ltd.
Jun 5 2015 23:07:20
[11337] +CIFSR:STAIP,“192.168.1.104”
+CIFSR:STAMAC,“a0:20:a6:10:74:78”
[11346] Connected to WiFi

It seems it freeze…
I changed the baud rate of esp8266 at 9600.
I opened the port 8442 in my router but my device is OFFLINE (in my router I have different ip associated at the esp mac address: 192.168.1.144 instead of 192.168.1.104 that i can see in the serial monitor).
What could be the problem?

Please help me!! Thank you Fabio

Have you followed everything in this guideline?

http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/arduino/esp8266-with-at-firmware

Please post your FORMATTED code here using this method

Blynk - FTFC

#define BLYNK_PRINT Serial


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

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

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "bb";
char pass[] = "xxxx";

// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial1

// or Software Serial on Uno, Nano...
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  Serial.begin(9600);

  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);
}

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

This is my code on Arduino.
Yes I’ve followed the guideline.
Is this code correct?
Thanks

It seems OK… so are you saying your App still shows device as disconnected?

As long as your phone and MCU are both within the same network (your home WiFi) then ports are not an issue. And both have internet access to the Blynk Cloud Server, then IP addresses are probably assigned via DHCP in your router and also fine… unless you are forcing static IP somehow in the ESP or on the router?

Reconfirm the authcode is the same in both App and sketch… refresh & email it again in the App, and then reenter it in the sketch.

thank you very much.
I don’t know why, today it works perfectly.
I never changed sketch or authcode. I can only think that my device was far from access point and its signal was low: but I was able to see it in my router page.
Now in the serial monitor i can see the time of the ping and all is ok.
I hope to know the reason of this problem to help someone. I will write if it will happen again.

Thanks Fabio

hello,
again the same problem: unable to connect ESP8266 to wifi.
After some times, my esp doesn’t work under blynk.
AT commands are ok:

OK
WIFI DISCONNECT
WIFI CONNECTED
WIFI GOT IP

OK
+CIFSR:STAIP,"192.168.1.100"
+CIFSR:STAMAC,"a0:20:a6:10:7d:80"

OK

When I upload the blynk scketch it doesn’t work.
But it works fine with my hotspot on iphone.
What is the error?
This is what I have with my hotspot:

[603] Connecting to xxxxx
[3802] AT version:0.25.0.0(Jun  5 2015 16:27:16)
SDK version:1.1.1
Ai-Thinker Technology Co. Ltd.
Jun  5 2015 23:07:20
[13331] +CIFSR:STAIP,"xxx.xx.xx.x"
+CIFSR:STAMAC,"a0:10:a6:10:7d:80"
[13338] Connected to WiFi
[24052] Ready (ping: 39ms).

@Fabiosnow maybe time to abandon the Arduino and learn to live with the power and versatility of the ESP8266?

1 Like

What error?

If it works on one form of internet connection but not on another, then the issue is related to your method of internet connection, probably NOT Blynk related.

esp8266 -01 hasn’t pins I need!! Imust use arduino for my project.

A post was split to a new topic: I’m having the ESP-01 issue