This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Read AT commands response string from ESP8266 using Energia and Tiva?



Hi!


I'm trying to receive AT command response string from the Olimex wifi ESP8266 modules (https://www.olimex.com/Products/IoT/MOD-WIFI-ESP8266-DEV/open-source-hardware). The module works well with FTDI and ESPlorer and with linux screen-command. Basically i send an AT command, for example, with "AT" the module should repond with "OK", with "AT+GMR" and the module should give info on the firmware with "OK" at the end. Now, I'm trying to do that with the microcontroller board Tiva C. I wired the pins the following way:

Tiva's PC4 -> ESP8266's RX

Tiva's PC5 -> ESP8266's TX

The GND is the same for all units. I also use an external power supply for the ESP8266 (3.3V).

I uploaded to the Tiva C the following code:

String command = "";
String response = "";
int counter = 0;
int i = 0;
void setup()
{
  Serial.begin(9600);  // USB
  Serial4.begin(9600);  // ESP8266 serial port
  
}

void loop()
{
  
  while(Serial4.available())
  {
     response = Serial4.readString();
     Serial.println(response);
  }
  while(Serial.available())
  {
     command = Serial.readString();
     Serial4.flush();
     Serial4.println(command);
  }
}

I also tried the function Serial4.read() and the results are the same. The LED on the ESP8266-module blinks when I send the command but the response I read are something like:

€þüÿùÿ~ï 

¡ÿüÿøÿï

_Ußôëÿ


I  also replace Serial.readString() by Serial.flush(), added delay(), change the BAUD-rate, send directly the command "AT" with Serial4.println("AT\r\n") (\r\n are needed at the end of the each sent AT-command) But it just doesn't work. Has anyone any idea? Thank you for your time!