- Home /
Connection failed - android to editor/standalone
I was doing some simple networking tests, and I found that for some reason I can't connect my android phone to my pc. I get the "The connection request to 192.168.1.4:22040 failed. Are you sure the server can be connected to?" error on my phone.
I can start a server with my phone and join it with the pc, but not the other way around.
I tried using different ports already. I also tried hosting with both editor and a standalone build.
What am I missing here? :S
I used the code below:
public void HostAny ()
{
Network.InitializeServer (2, 22040, false);
}
public void ConnectAsPhone ()
{
Network.Connect ("192.168.1.4", 22040);
}
public void ConnectAsPC ()
{
Network.Connect ("192.168.1.2", 22040);
}
Answer by Rocketballs · Mar 23, 2015 at 11:16 AM
I found the problem and managed to solve it.
I couldn't ping my pc from my phone because windows 8.1 doesn't allow it by default, so I followed the instructions in the link below, and everything works now.
Your answer
Follow this Question
Related Questions
Android game crashes when attempting to start wifi hotspots 0 Answers
[UNET] Handle Client Disconnection 1 Answer
Android network view 0 Answers
SQL Connection doesn't work in standalone/build 1 Answer
Get a list of Wi-Fi networks (SSID), 0 Answers