Skip to content

Can not get Android local connection #256

@derekdominoes

Description

@derekdominoes

I can not get an Android client to connect to a Host on a local network. I've been trying many permutations to get this to work.

  • The Host's IP address is fixed at 192.168.0.20 and this is set as the "Connect Address" in the Unet Transport.
  • I turned off the local net's firewall in case it is blocking something
  • The client Android is a Motorola X4 which I already have communicated with over UDP to a different Unity application using Sockets. The two Android Unity App have the same build settings. So I know the PC and phone can talk with each other at least with UDP Sockets.
  • I've tried with and without WebSockets on
  • I've tried LiteNetLibTransport but this didn't even work for host and clients on the same PC. Perhaps some advice on Transport selection / purposes / configuration could be added to the documentation.

image
You can see in the Console log from Android it giving up after 10 tries.

Screenshot_20190610-170753
Android network setup

Screenshot_20190610-170904
Android permissions for the App

Environment (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2019.1.1.3f1
  • MLAPI Version: v10.11.0

I am not a Network guru. But I found your library very easy to understand. I got a simple network 2D multi-player space invaders-like example ported over to it after a few hours. It's using messaging, network variables, client authorization, etc.... I was very excited running multiple copies on the PC. I'd like to share this project as example code for you to use on your site for others to learn with if you want it?
My next goal is to build my first networked multiplayer game.
But first I need to know what I'm doing wrong to prevent communicating between the PC and phone. Likely the network configuration, likely something obvious and dumb.
Any suggestions would be appreciated because I've exhausted everything I could think of before bothering you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions