-->
Page 1 of 3

ESP8266 not responding correctly to long commands

PostPosted: Wed Feb 04, 2015 5:22 am
by sin
I have a ESP8266 wired correctly with external 3.3v supply and voltage divider (5v -> 3.3v).

Here is the code I'm trying to run:

Code: Select all#include <SoftwareSerial.h>

SoftwareSerial esp8266(10, 11); // RX, TX

void setup() 
{
  Serial.begin(9600);
  esp8266.begin(9600);
 
  esp8266.println("AT+CWJAP=\"myAPNAME\",\"myPASS\"");
}

void loop()
{
  if (esp8266.available())
    Serial.write(esp8266.read());
  if (Serial.available())
    esp8266.write(Serial.read());
}


I get strange output: Image

I can enter short commands manually and things work: Image

But longer commands do not work: Image

Why do long commands fail?

Re: ESP8266 not responding correctly to long commands

PostPosted: Wed Feb 04, 2015 5:52 am
by alonewolfx2
because arduinos default software serial buffer is small for esp8266. i had seen some modified software serial for arduino but i dont remember where. if you use hardware serial esp8266 commands working correctly

Re: ESP8266 not responding correctly to long commands

PostPosted: Wed Feb 04, 2015 9:44 am
by l0ur3nz0
alonewolfx2 wrote:because arduinos default software serial buffer is small for esp8266. i had seen some modified software serial for arduino but i dont remember where. if you use hardware serial esp8266 commands working correctly



this?
http://www.hobbytronics.co.uk/arduino-s ... uffer-size

Re: ESP8266 not responding correctly to long commands

PostPosted: Wed Feb 04, 2015 9:53 am
by Aonko
Edit: Whoops, didn't read correctly that you were using software serial.