I solved that issue follow that:
Steps:
- Make sure that Aggressive Wi-Fi to Cellular handover under Networking section in the device's developer options is turned off.
- Ping continuously from your pc to the device to make sure it's not in network idle mode ping -t 194.68.0.100 (windows cmd), unlock the device and even try to surf to some website just to make it get out of the network idle.
- If ping doesn't work, turn off / on Android Wifi and go back to step 2.
When it replies to the ping, connect it via USB, and:
adb usb
adb tcpip 5555
adb connect 194.68.0.100:5555
In casr it's still not connected, try to switch the usb connection mode as MTP / PTP / Camera while the device is connected through usb and repeat these steps over again...