ESP8266 Serial.swap() and no data

Hi! I have a problem with simple program:

void setup() {
  Serial.begin(115200);
  Serial.swap();
  Serial.print("\r\nHello 8\r\n");
}

int x;
void loop() {
  Serial.println(x++);
  delay(100);
}

I do not observe data on txd (GPIO15 / D8). I tried it on LoLin NodeMCU v3 board:

and on second ESP-12E module. On both of them there is no data on GPIO15 (D8) nor GPIO1 (TX). If I comment Serial.swap(); data is present on GPIO1. I check data with FT232R @3.3V.

Any ideas?

Are you sure the program was written to the flash of the 8266 by the Arduino IDE? I ask that first as I have never been able to get the Arduino IDE to write to one of the clone Nodemcu V1.0 modules with the CH340G USB chip as pictured.

The original design with the SiLabs CP2102 works fine but never have one of the clones ever flashed, I always get a failure to connect even though the devices connect fine and work with ESPlorer.

Have you tested the blink sketch to know it flashes okay?

I’m using Arduino IDE ver. 1.8.3. I’m sure flash is properly programmed. Sometimes i get synchronization error, but if IDE says 100% ok, ESP also works ok.
I have tried couple times with swap and without. Every time I got the same behavior.
Instead of swapping, when I do digitalWrite to pin TxD2 (GPIO15 / D8) from loop(): High 1s - Low 1s, LED blinks.

Oo! I have inserted pinMode(15, OUTPUT); just below Serial.begin, and it works! I have not found such a sequence anywhere. Receiving on pin 13 (remapped RxD) works fine. Is it correct procedure?

dxfm: Oo! I have inserted pinMode(15, OUTPUT); just below Serial.begin, and it works! ... Is it correct procedure?

I would say you should not have to change the pin mode. Congratulations finding this solution. I think you should raise it as an issue on the Arduino esp8266 github repository