user31831: I have a problem when I try to use SoftwareSerial in a class.. 
Here my detail My class 
class MyEsp8266
{
 protected: 
     SoftwareSerial *esp8266;
 public: 
     MyEsp8266(SoftwareSerial *_esp8266){
           esp8266 = _esp8266;
     }
     void begin(int baud){
        esp8266->begin(baud);
     }
     String testAT(){
          esp8266->println("AT");
          return esp8266->readString();
     }
}

My Arduino code
#include <SoftwareSerial.h>
#include "MyEsp8266.h"
// the setup function runs once when you press reset or power the board

SoftwareSerial _esp(10, 11);
MyEsp8266 wifi(&_esp);

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

It doesn't log anything But when I have used all code in Arduino code it worked. 
#include <SoftwareSerial.h>
// the setup function runs once when you press reset or power the board

SoftwareSerial _esp(10, 11);

void setup() {
    Serial.begin(9600);
    _esp.begin(115200);
    _esp.println("AT");
    Serial.println(_esp.readString());
}

Thank any tips. 
Regards.

user31838: This is more of a work-around than a solution, but the code you're trying to get to work, worked for me once I changed
wifi.begin(115200);

to
wifi.begin(9600);

(sorry I don't have enough karma to just comment)

31831: <p>I have a problem when I try to use SoftwareSerial in a class.. </p>

<p><strong>Here my detail</strong> My class </p>

<pre><code>class MyEsp8266
{
 protected: 
     SoftwareSerial *esp8266;
 public: 
     MyEsp8266(SoftwareSerial *_esp8266){
           esp8266 = _esp8266;
     }
     void begin(int baud){
        esp8266-&gt;begin(baud);
     }
     String testAT(){
          esp8266-&gt;println("AT");
          return esp8266-&gt;readString();
     }
}
</code></pre>

<p><strong>My Arduino code</strong></p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
#include "MyEsp8266.h"
// the setup function runs once when you press reset or power the board

SoftwareSerial _esp(10, 11);
MyEsp8266 wifi(&amp;_esp);

void setup() {
    Serial.begin(9600);
    wifi.begin(115200);
    Serial.println(wifi.testAT());
}
</code></pre>

<p>It doesn't log anything <strong>But</strong> when I have used all code in Arduino code it worked. </p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
// the setup function runs once when you press reset or power the board

SoftwareSerial _esp(10, 11);

void setup() {
    Serial.begin(9600);
    _esp.begin(115200);
    _esp.println("AT");
    Serial.println(_esp.readString());
}
</code></pre>

<p>Thank any tips. 
Regards.</p>
 31838: <p>This is more of a work-around than a solution, but the code you're trying to get to work, worked for me once I changed</p>

<pre><code>wifi.begin(115200);
</code></pre>

<p>to</p>

<pre><code>wifi.begin(9600);
</code></pre>

<p>(sorry I don't have enough karma to just comment)</p>
