Search Unity

[Network Discovery] server not broadcasting / client not receiving broadcasts

Discussion in 'Multiplayer' started by quitebuttery, Jan 21, 2017.

  1. quitebuttery

    quitebuttery

    Joined:
    Mar 12, 2011
    Posts:
    329
    I'm trying to get Network Discovery to work and my client is not receiving the message, which leads me to believe the server is not broadcasting. I'm using the HoloLens UNET example, and discovery plain does not work.

    I have a feeling it might be my LAN configuration somehow--right now I can't get it to work from HoloLens to HoloLens or from HoloLens to Editor. Are there any LAN configuration options I should look at that might prevent Network Discovery to work? I've tried a few different ports to no avail.

    The app is clearly in broadcasting mode, as the network GUI confirms it.

    Does anyone have any clues on how to use Wireshark (like how to filter everything) to figure out if the broadcast is happening, but the client is just not getting it?
     
  2. quitebuttery

    quitebuttery

    Joined:
    Mar 12, 2011
    Posts:
    329
    As an update, I managed to check wireshark and it appears that when I start the server it does broadcast. But if I start it in client mode, I don't see any UDP activity on port 7777--so I guess the Client isn't looking for servers?

    The client seems to be running because I see these (hilariously misspelled) status messages in the console:

    NetwrokDiscovery set broadbast data to:NetworkManager:localhost:7777
    UnityEngine.Networking.NetworkDiscovery:Initialize()
    MyNetworkDiscoveryWithAnchors:Start() (at Assets/Scripts/Networking/MyNetworkDiscoveryWithAnchors.cs:61)

    StartAsClient Discovery listening
    UnityEngine.Networking.NetworkDiscovery:StartAsClient()
    MyNetworkDiscoveryWithAnchors:StartClientMode() (at Assets/Scripts/Networking/MyNetworkDiscoveryWithAnchors.cs:75)
    NetworkingGUI:OnClientTap() (at Assets/Scripts/Networking/NetworkingGUI.cs:48)
    UnityEngine.EventSystems.EventSystem:Update()

    Shouldn't I be seeing UDP activity on port 7777 when the client starts searching?
     
  3. sohailthebeast

    sohailthebeast

    Joined:
    Jan 11, 2017
    Posts:
    6
    Im using networkDiscovery on hololens as client and a android device as server which works without issues. One thing to make sure on hololens is to ensure the proper capabilities are selected under player settings [internetClient,internetClientServer, PrivateNetworkClientServer].
     

    Attached Files:

  4. quitebuttery

    quitebuttery

    Joined:
    Mar 12, 2011
    Posts:
    329
    Yeah I have those capabilities checked. Hmm.. I wonder what the issue is.
     
  5. quitebuttery

    quitebuttery

    Joined:
    Mar 12, 2011
    Posts:
    329
    Aha! If I use a mobile hotspot and connect to that, it works. There's something about my Router's LAN that is preventing Network Discovery from working. Are there any router settings I should be aware of that would prevent UDP Broadcast from working? I guess specifically, from clients receiving the UDP broadcasts.
     
  6. fraylopez

    fraylopez

    Joined:
    Nov 30, 2016
    Posts:
    1
    Hi, I can reproduce quitebuttery behaviour. It looks like there is some conflict with the combination of router/device.

    Test scenarios:

    Android(sever) - Win(client) - Router WAN --> No discovery
    Win (server) - Android (client) - Router WAN --> Discovery
    Android (server) - Win (client) - Android AP --> Discovery
     
  7. sebrk

    sebrk

    Joined:
    Mar 20, 2012
    Posts:
    13
    @quitebuttery @sohailthebeast I can't even compile to hololens. It says NetworkPlayer is missing assembly. Can you share your code or hint at what might be wrong?

    I can see messages on the network and it works fine in editor.

    I'm too looking to use an android as server and hololens as clients. Thanks.