0

I am trying to use a ESP8266 in an Arduino project, but I'm unable to get the basic Software serial interface working with it.

I have the ESP connected to a secondary 3.3v power supply. When connecting the RX and TX pins to the Uno's RX and TX, and uploading bare minimum code, I am able to interface with the module. Doing this I can connect to networks, send and receive packets, etc.

However, when connecting the ESP to any other pins and trying to implement a software serial interface, I am unable to get any response from the module. When sending it data I see the on board blue LED flash, so I think its receiving the data? I've found tons of example codes and Youtube videos that do what I'm trying to do. But following their steps I'm still not able to get any response.

I've tried using voltage divider circuits for the ESP's RX pin so its not getting 5v, but that hasn't seemed to change anything either. Any troubleshooting advice would be greatly appreciated.

One of the basic codes I've tried to get this to work:

#include <SoftwareSerial.h>

SoftwareSerial wifi(8,9);

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

  Serial.println("started!");

}

void loop(){
  if(Serial.available() > 0){
    byte b = Serial.read();
    Serial.write(b);
    wifi.write(b);
  }

  if(wifi.available() > 0){
    byte b = Serial.read();
    Serial.write(b);
  }
}
  • and with SoftwareSerial you wire TX to RX? and set the SoftwareSerial and the AT firmware to 9600 baud – Juraj Apr 30 at 12:32
  • Correct. And I've tried several different baud rates. The primary one I've been using is 115200 because that is what was working when directly interfacing with the ESP. – Samuel Norman Apr 30 at 12:53
  • 1
    set the default baud rate of the AT firmware to 9600 baud and use that in Serial Monitor and with Software Serial – Juraj Apr 30 at 13:36
  • I'm going to get an FTDI to interface with it more reliably. I bought a lot of 4 and bricked one trying to change the baud rate through AT commands. I'm going to try to flash a new firmware on the bricked one and see where that takes me. – Samuel Norman May 1 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.