For WiFi connection:
1. Make sure your mobile device and computer must be connected to the same WiFi network. It's OK if your computer has wired internet as long as they are connected to the same box.
2. Check your firewall or antivirus, make sure they do not block the connection. For quick check, turn all of them off and connect again.