[SOLVED] ESP8266 DNS Fail at AT+CIPSTART

Hi, I use a NanoESP-Board (Nano with integrated ESP8266).
My sketch is a modified “UbidotsSaveMultiValues”.
My Problem is that I get a DNS-Fail at AT+CIPSTART.

MY CODE:

#include <UbidotsESP8266.h>
#include <SoftwareSerial.h> 
#include <Wire.h>
#include <DHT.h>
#include <BH1750.h>
#include <Adafruit_BMP085.h>



#define SSID "Wi-Fi"
#define PASS "**********************************"


#define TOKEN "EqbWastAd0c8EJRnLCstAPJsXO7Poz"
#define ID "57f20cee76254274821fed89" // temp// Replace it with your Ubidots' variable ID
#define ID2 "57f20d8d762542788859e489" // hum
#define ID3 "57f20dbb7625427856a903a1" // light
#define ID4 "57f20dc7762542790956b381" // pres

Ubidots client(TOKEN);

//---------------------------------------------------------------------------------------

#define DHTPIN 2
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321
DHT dht(DHTPIN, DHTTYPE);
float hum;
float temp;

BH1750 lightMeter;
uint16_t light; //in lux

Adafruit_BMP085 bmp;
float pres;


void setup() {
  Serial.begin(19200);
  client.wifiConnection(SSID,PASS);

//--------------------------------------------------

  dht.begin();
  lightMeter.begin();
  if (!bmp.begin()) {
  Serial.println("Could not find a valid BMP085 sensor, check wiring!");
  while (1) {}
  }
  
}


void loop() {
  
  temp = dht.readTemperature();
  hum = dht.readHumidity();
  light = lightMeter.readLightLevel();
  pres = bmp.readPressure();
  
  client.add(ID,temp);
  client.add(ID2,hum);
  client.add(ID3,light);
  client.add(ID4,pres);
  client.sendAll();
}

ERROR LOG:

Response of ESP8266:
AT+CIPSTART="TCP","translate.ubidots.com",9010
DNS Fail

Hi, @Metavix can you please help me ?

@Scatman96 Yeah, i’m here. Could you post here al Serial terminal message?
Best regards,
Metavix

thanks for the help :smiley:

Response of ESP8266:

clearin data
Response of ESP8266:
AT+RST

OK

"qXÑzÂC!É
1±ÿ)ÓCCa*ò“I!a5	)‘I™Ca5	Jr0KN	�K!ÑCÊ!‘
÷þ•rô
ready

Response of ESP8266:
AT+GMR
AT version:0.22.0.0(Mar 20 2015 10:04:26)
SDK version:1.0.0
compile time:Mar 20 2015 11:00:32

OK

Response of ESP8266:
AT+CWMODE=3

OK

Response of ESP8266:
AT+CWJAP="Wi-Fi","12345678902206198809876543"

OK

Response of ESP8266:
AT+CIFSR
+CIFSR:APIP,"192.168.178.123"
+CIFSR:APMAC,"1a:fe:34:a4:5c:62"
+CIFSR:STAIP,"192.168.178.28"
+CIFSR:STAMAC,"18:fe:34:a4:5c:62"

OK

=>57f20cee76254274821fed89:22.30$,57f20d8d762542788859e489:61.50$,57f20dbb7625427856a903a1:39.00$,57f20dc7762542790956b381:101476.00$,
Response of ESP8266:
AT+CIPMUX=0

OK

Response of ESP8266:
AT+CIPSTART="TCP","translate.ubidots.com",9010
DNS Fail

ERROR

Response of ESP8266:
AT+CIPMODE=1

OK

Response of ESP8266:
AT+CIPSEND

ERROR

Error CIPSEND
=>57f20cee76254274821fed89:22.30,57f20d8d762542788859e489:61.50,57f20dbb7625427856a903a1:39.00,57f20dc7762542790956b381:101476.00,57f20cee76254274821fed89:22.30,
Response of ESP8266:
AT+CIPMUX=0

OK

Well, i found some things @Scatman96, this is not a problem in library is a problem of ESP, but don’t worry, it will have a solution and I will help you with that.
http://bbs.espressif.com/viewtopic.php?t=1400

First, try to upgrade the AT firmware version:
Here there are the steps to do that. When you do that try again with your code. If that doesn’t work, then i will build a special edition for you.

Best regards,
Metavix

i think that i bricked it :S
it is not answering on AT-Commands.

my problem is that its not like a normal ESP8266, its integrated on the board.

but its possible to change the memory-chip…

or is there a possibility to unbrick the esp8266?

Okay, its unbricked :wink: … wrong flash-addresses xD … :-/

AT


OK
AT+GMR

AT version:0.51.0.0(Nov 27 2015 13:37:21)
SDK version:1.5.0
compile time:Nov 27 2015 13:57:56
OK

I test my ubidots sketch… wish me good luck :smiley:

some wierd error-log

Response of ESP8266:

clearin data
Response of ESP8266:
"lk#ÂJH1ÄóÒQ!=ÑFä	ÐP!}ÌÑf	Ð!ärô
ready
WIFI CONNECTED

Reset of ESP8266
Response of ESP8266:

Error at GMR
Response of ESP8266:

Response of ESP8266:
"qXÑzÂC!É
1Âó	ÒQ!=ÑFä	ÒQ!}Ì	ÑfÒ!ärô
ready
WIFI CONNECTED
"qXÑzÂC!É1Âó	ÒQ!=ÑFäÐQ!}Ì	Ñf	Ð!ärô
ready
WIFI CONNECTED

Response of ESP8266:

=>57f20cee76254274821fed89:23.70,57f20d8d762542788859e489:56.90,57f20dbb7625427856a903a1:32.00,57f20dc7762542790956b381:101670.00,
Response of ESP8266:
"qXÑzÂC!É1ÂóÐQ!=ÑFä	ÒP!}ÌÑf	Ò!ärô
ready

@Scatman96 Nice. Now that error is a noise. When you get that noise?

This is the serial-log from my sketch.

@Scatman96 okay, Is strange but is an noise, it could be a problem of baud rate to ESP8266. I will change some thing in the lib to solve that.

what does it mean “noise” ?

@Scatman96 when in the serial terminal you get message with corrupted bytes.
For example:
I will send: “Hello world”

But in the serial terminal i get:
“Hello$##$olrd”

That extra characters that i didn’t send are noise.

Best regards,
Metavix

any suggestions which i can try now ?

  • another baud-rate ?
  • an older ESP-firmware ?
  • or a modified Library ?

@Scatman96

Yeah scartman, you could try with old version of ESP firmware, now im working with the new version of the firmware to find the problem of that noise and solve it.

Best regards,
Metavix

Hi @Scatman96

ESP8266’s firmware was recently updated by the library’s provider and AT command’s baud speed was upgraded and it is not working properly with the Arduino Software Serial Library, because Ubidot’s Library uses virtual ports and at high baud rates the new firmware produces noise and right now the communication cannot be set between the ESP and the Arduino using only a written code in an Arduino Sketch.

Because the third party ESP’s firmware library doesn’t rest on us, it is a bit difficult for us to solve easily the issue, we highly recommend to our users to use an arduino Board with two hardware serial ports and not to virtualizate the ports in order to set properly the baud rate without any kind of noise, you can use an Arduino Duemilanove or Mega for having more hardware serial ports Available.

We will be working for trying to solve the isue, but the solution is not trivial and it can take us some time so we gently recommend you to implement your code with a different board or trying a search for an older ESP library firmware.

Best regards,
Catalina M.