I had a similar problem at the beginning, with Pi and Desktop PC both being in the same network, but I was unable to connect to my Pi. I solved this by setting up a static ping script on the Pi which continuously performs a ping to the Desktop ping 192.168.xxx.yyy -t Since then it is working flawles...