i try to build new Gateway for my Problem and Upload the same sketch, but the new Gateway do not connect to the router. I reminded the China NodeMCU have problems with Serial.begin and with WIFI.beginn. It need a delay after.
I found the WIFI.begin in the "MyGatewayTransportEthernet.cpp" file and see a wait(500). See my last post wait/delay, so I changed from wait to delay and the Gateway connect.
If you can try to change it too or change from 500 to 1000.
But i use the 2.2.0 dev.