[SOLVED] Strange problem with ESP8266 Ethernet lib and SoftwareSerial lib

Hello everyone!
I have HUZZAH feather ESP8266 WiFi board. Of course I use additional boards managers in Arduino IDE for board specific libraries and my board selected correctly.
I read data from device (pms5003ST) connected at pin 13 (only receive data). Also I have been connected Ethernet POE (ks0148 aka w5100) using MISO(pin 12), MOSI(13), SCK(14) and SS(15).
So I read data and everything ok. But, when I only use Ethernet.begin(…) I receive serial data only one time (full packet, 42 bytes). After than SerialPM.available() returns 0 every time. I can`t use Hardware Serial instead because it’s using for device MH-Z19B.
Here is the code:

#include <Ethernet.h>
#include <SPI.h>
#include <SoftwareSerial.h>

SoftwareSerial SerialPM(13, SW_SERIAL_UNUSED_PIN);

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress myDns0(192, 168, 0, 1);
IPAddress ip0(192, 168, 0, 177);
unsigned char bufferPM[40] = {};
unsigned int PM01 = 0, PM25 = 0, PM10 = 0, FMDH = 0;
char TPSstr[20], HDSstr[20];
unsigned long delayPPM = 5000, lastPPM;
boolean newPMData = false;

void setup() {
  Serial.begin(9600);
  Ethernet.begin(mac, ip0, myDns0); //comment this line and working fine, data comes periodically
  SerialPM.begin(9600);
  SerialPM.setTimeout(1500);
}

void loop() {
  checkPMData();
  if (millis() - lastPPM >= delayPPM) {
    lastPPM = millis();
    if (newPMData) {
      readPM();
    }
  }

}

void checkPMData() {
  if (SerialPM.available() <= 0) {
    return;
  }
    for (int i = 0; i < 40; i++) {
      char col = SerialPM.read();
      bufferPM[i] = (char)col;
      delay(2);
    }
    SerialPM.flush();
    newPMData = true;
  }
}

void readPM() {
  unsigned int CR1 = 0, CR2 = 0, TPS = 0, HDS = 0;
  PM01 = 0;
  PM25 = 0;
  PM10 = 0;
  FMDH = 0;
  TPS = 0;
  HDS = 0;
  sprintf(TPSstr, "%d", 0);
  sprintf(HDSstr, "%d", 0);

  CR1 = (bufferPM[38] << 8) + bufferPM[39];
  CR2 = 0;
  for (int i = 0; i < 38; i++)
    CR2 += bufferPM[i];
  if (CR1 == CR2) {
    PM01 = (bufferPM[10] << 8) + bufferPM[11];   
    PM25 = (bufferPM[12] << 8) + bufferPM[13];   
    PM10 = (bufferPM[14] << 8) + bufferPM[15];   
    FMDH = (bufferPM[28] << 8) + bufferPM[29]; 
    TPS = (bufferPM[30] << 8) + bufferPM[31];   
    HDS = (bufferPM[32] << 8) + bufferPM[33];   
    sprintf(TPSstr, "%d%d.%d", TPS / 100, (TPS / 10) % 10, TPS % 10);
    sprintf(HDSstr, "%d%d.%d", HDS / 100, (HDS / 10) % 10, HDS % 10);
  }
  Serial.print("PM01 = ");
  Serial.print(PM01);
  Serial.print("/");
  Serial.print(PM25);
  Serial.print("/");
  Serial.print(PM10);
  Serial.print(" ");
  Serial.print(", FMDH = ");
  Serial.print(FMDH);
  Serial.print(", TPStr = ");
  Serial.print(TPSstr);
  Serial.print(", HDStr = ");
  Serial.println(HDSstr);
  newPMData = false;
}

Can someone explain my problem?

the unfortunate 13. why do you think it can be serial and SPI at the same time? How did you wire it?

Juraj:
the unfortunate 13. why do you think it can be serial and SPI at the same time? How did you wire it?

Oh, it's impossible to have SPI and Serial? I wire W5100 this method: MISO(pin 12), MOSI(13), SCK(14) and SS(15). Anyway if I disconnect Ethernet device - it's not work

fishMD:
Oh, it's impossible to have SPI and Serial? I wire W5100 this method: MISO(pin 12), MOSI(13), SCK(14) and SS(15)

only to a bus like SPI or I2C you can connect more devices and they all must communicate with the same bus protocol.

What version of ESP8266 Core are you using?

It seems that there is a problem with softwareserial in Core 2.4.0 and newer. See this github issues page.

You may have to roll back to 2.3.0

darrob:
What version of ESP8266 Core are you using?

It seems that there is a problem with softwareserial in Core 2.4.0 and newer. See this github issues page.

You may have to roll back to 2.3.0

After rollback (and downgrade ethernet lib) board not start - silence in Serial Monitor and after 2-3 seconds symbols "⸮! " appears.

Making some fixes my script start, but 2.3.0 version does not fix the issue

So finally problem SOLVED:

SoftwareSerial SerialPM(13, SW_SERIAL_UNUSED_PIN); => SoftwareSerial SerialPM(4,5);