Announcement

Collapse
No announcement yet.

Android multiplayer wlan: Android as host device problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Android multiplayer wlan: Android as host device problem

    I'm having big troubles getting android as the host working.

    I'm testing with the Multiplayer Shootout to ensure it's easy to reproduce with 4.10. The only thing I changed in that project was changing the OnlineSubSystem in the DefaultEngine.ini like so:

    Code:
    [OnlineSubsystem]
    DefaultPlatformService=Null
    What works:
    • Windows as host android as client


    What doesn't work:
    • Android as host windows as client
    • Android as host different android device as client


    Log on android device as I start it as the host ("Create Session"):
    Code:
    11-30 19:59:30.256: D/UE4(24913): [2015.11.30-18.59.30:263][64000]LogInit: BSD: I am localhost (127.0.0.1:0)
    11-30 19:59:30.391: D/UE4(24913): [2015.11.30-18.59.30:398][64000]LogPackageName: SearchForPackageOnDisk took   0.129s to resolve Level_01.umap.
    11-30 19:59:30.491: D/UE4(24913): [2015.11.30-18.59.30:498][64000]LogPackageName: SearchForPackageOnDisk took   0.087s to resolve Level_01.umap.
    11-30 19:59:30.491: D/UE4(24913): [2015.11.30-18.59.30:499][64000]LogNet: Browse: /Game/Maps/Level_01?listen
    11-30 19:59:30.496: D/UE4(24913): [2015.11.30-18.59.30:499][64000]LogLoad: LoadMap: /Game/Maps/Level_01?listen
    11-30 19:59:30.541: D/UE4(24913): [2015.11.30-18.59.30:546][64000]LogParticles: Destroying 0 GPU particle simulations for FXSystem 0x0x96a62390
    11-30 19:59:31.041: D/UE4(24913): [2015.11.30-18.59.31:047][64000]LogAIModule: Creating AISystem for world Level_01
    11-30 19:59:31.046: D/UE4(24913): [2015.11.30-18.59.31:050][64000]LogWorld: Game class is 'MyGameMode_C'
    11-30 19:59:31.051: D/UE4(24913): [2015.11.30-18.59.31:056][64000]LogInit: BSD: Socket queue 262144 / 262144
    11-30 19:59:31.051: D/UE4(24913): [2015.11.30-18.59.31:058][64000]LogNet: GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7777
    11-30 19:59:31.086: D/UE4(24913): [2015.11.30-18.59.31:092][64000]LogWorld: Bringing World /Game/Maps/Level_01.Level_01 up for play (max tick rate 0) at 2015.11.30-19.59.31
    11-30 19:59:31.091: D/UE4(24913): [2015.11.30-18.59.31:095][64000]LogWorld: Bringing up level for play took: 0.019772
    11-30 19:59:31.126: D/UE4(24913): [2015.11.30-18.59.31:132][64000]LogScript:Warning: Accessed None 'CallFunc_K2_GetPawn_ReturnValue'
    11-30 19:59:31.126: D/UE4(24913): 	MyGameMode_C /Game/Maps/Level_01.Level_01:PersistentLevel.MyGameMode_C_0
    11-30 19:59:31.126: D/UE4(24913): 	Function /Game/Blueprints/MyGameMode.MyGameMode_C:ExecuteUbergraph_MyGameMode:045F
    11-30 19:59:31.151: D/UE4(24913): [2015.11.30-18.59.31:158][64000]LogOnline:Warning: NULL: Can't start an online session (Game) in state InProgress
    11-30 19:59:31.161: D/UE4(24913): [2015.11.30-18.59.31:167][64000]LogScript:Warning: Accessed None 'Widget'
    11-30 19:59:31.161: D/UE4(24913): 	MyGameInstance_C /Engine/Transient.GameEngine_0:MyGameInstance_C_0
    11-30 19:59:31.161: D/UE4(24913): 	Function /Game/Blueprints/MyGameInstance.MyGameInstance_C:Hide Widget:000A
    Similar to the problem mentioned here without resolve: https://forums.unrealengine.com/show...ng-Google-Play
    and here also without resolve: https://answers.unrealengine.com/que...roid-host.html

    I have not been able to find anywhere how to get android as the host working. The end result I'm trying to achieve is android to android connection for a mutliplayer game over a local wifi both devices are connected to.

    Also created an Answerhub ticket: https://answers.unrealengine.com/que...t-working.html

    Any help appreciated!

  • replied
    4.23. When Host game on S8, can join from PC. If host game on PC, cannot join from S8.

    Leave a comment:


  • replied
    It still creates the host with the local IP adress on my S8. I'm using 4.23. Is this bug still around or am I doing something wrong?

    Leave a comment:


  • replied
    Hi,

    Tried on 4.23 beta 6, still the same error 127.0.0.1
    Anyone with a workaround ?
    Last edited by LaurentLKO; 08-16-2019, 08:27 AM.

    Leave a comment:


  • replied
    Originally posted by anton.katkov View Post
    4.22.1 is out now. Has anyone tested this yet?
    I still have trouble My device hosted localhost session with ip is 127.0.0.1
    Hey all ran across this thread digging for days while facing the exact same issue in 4.21.

    So as we were testing multi-platform capabilities we kept getting 127.0.0.1 issues on the android devices. I saw this thread and then tested in 4.22.1.

    So some things broke for us in the update but I can confirm that it seems to at least connect android to android in this version. The 127.0.0.1 issue seems resolved but it does leave us with some tough decisions dealing with a full conversion as it creates unknowns late in our cycle.

    Wanted to let you all know- Good luck!

    Leave a comment:


  • replied
    Working on that as well. Trying to run either two Android phones MP, or one Android client with Win server.

    Leave a comment:


  • replied
    can someone please test it? in 4.21 the phone ip is given wrong and it doesn't join please someone test it and tell us

    Leave a comment:


  • replied
    4.22.1 is out now. Has anyone tested this yet?
    I still have trouble My device hosted localhost session with ip is 127.0.0.1

    Leave a comment:


  • replied
    So for android multiplayer working it need just to rebuild windows, android development/shipping from the source code? Is anyone know for a ue4.21 it still need rebuild? And if so what branch I need to use? Same branch as a version of unreal engine that I use?
    And what about IOS? Same steps needed?
    Last edited by PiterMyasnikov; 02-11-2019, 04:23 AM.

    Leave a comment:


  • replied
    Originally posted by BPANDREW View Post
    I've put a fair amount of time into this but I'm not successful yet

    what I've got done so far

    1) my http master server now collects ips of players wishing to join sessions being hosted on phones, it then sends that ip list to the phone
    2) the phone then starts sending tcp and udp messages to the other phones IP

    however I'm seeing its more complicated than that as that alone isnt working. I read somewhere that in the old days of star craft, players would punch open the ports by connecting from computer A to B then B to A and it would work - with Unreal Engine that alone dosn't work

    So what I got was wireshark, I need to see what exactly happens a successful connection happens.

    A problem I have yet still, is when I create tcp and udp sockets, if I'm trying to punch 7777, what do I have to do exactly to open the port.. and can I create that socket if its already being used by the engine.

    This really isnt my strong suit, I'd love for someone to help the community out and share a working NAT punch example, if I eventually figure this out I will update my current github demo to a more generic and easily learnable solution - https://github.com/bitporters/RC_TRAINER (http based game browser, +nat punch when I figure it out)
    I think when we connect one android(client - wifi on) to another android(host - hotspot on), the host expects client coming from cellular network but client is sending request from wifi network.
    If you see there is no error in creating server on android, the only broken link is searching and joining session.
    This is my theory.
    Last edited by ANURAGX; 04-01-2017, 02:54 PM.

    Leave a comment:


  • replied
    Any updates

    Originally posted by BPANDREW View Post
    I've put a fair amount of time into this but I'm not successful yet

    what I've got done so far

    1) my http master server now collects ips of players wishing to join sessions being hosted on phones, it then sends that ip list to the phone
    2) the phone then starts sending tcp and udp messages to the other phones IP

    however I'm seeing its more complicated than that as that alone isnt working. I read somewhere that in the old days of star craft, players would punch open the ports by connecting from computer A to B then B to A and it would work - with Unreal Engine that alone dosn't work

    So what I got was wireshark, I need to see what exactly happens a successful connection happens.

    A problem I have yet still, is when I create tcp and udp sockets, if I'm trying to punch 7777, what do I have to do exactly to open the port.. and can I create that socket if its already being used by the engine.

    This really isnt my strong suit, I'd love for someone to help the community out and share a working NAT punch example, if I eventually figure this out I will update my current github demo to a more generic and easily learnable solution - https://github.com/bitporters/RC_TRAINER (http based game browser, +nat punch when I figure it out)
    I am working on the same and if I figure out anything will post here.

    Even I am in need of such functionality and I really hate UE4 community or especially EPIC GAMES, they only help other developers who are quite popular on the forum or whose problem is the exact problem which epic games are facing.
    Epic games won't show any helpful attitude to those threads which are not related to them. For instance consider this thread which happens to be around 1.5 years old and none of the epic staff have shared any info on this topic.

    Leave a comment:


  • replied
    I've put a fair amount of time into this but I'm not successful yet

    what I've got done so far

    1) my http master server now collects ips of players wishing to join sessions being hosted on phones, it then sends that ip list to the phone
    2) the phone then starts sending tcp and udp messages to the other phones IP

    however I'm seeing its more complicated than that as that alone isnt working. I read somewhere that in the old days of star craft, players would punch open the ports by connecting from computer A to B then B to A and it would work - with Unreal Engine that alone dosn't work

    So what I got was wireshark, I need to see what exactly happens a successful connection happens.

    A problem I have yet still, is when I create tcp and udp sockets, if I'm trying to punch 7777, what do I have to do exactly to open the port.. and can I create that socket if its already being used by the engine.

    This really isnt my strong suit, I'd love for someone to help the community out and share a working NAT punch example, if I eventually figure this out I will update my current github demo to a more generic and easily learnable solution - https://github.com/bitporters/RC_TRAINER (http based game browser, +nat punch when I figure it out)

    Leave a comment:


  • replied
    Originally posted by BPANDREW View Post
    So I started reading this today - https://keithjohnston.wordpress.com/...iplayer-games/

    I'm going to try and modify my setup now.. unless I'm reading this wrong, all I need to do is make my master server give my game host a list of ip addresses of people who want to connect to my game, then on my phone server, send outbound packets to those client ips on those ports, therefore opening the nat

    this should be pretty easy seeing as my client server already has a heart beat report to my master server as it is anyway
    Did this end up working for you?

    Leave a comment:


  • replied
    So I started reading this today - https://keithjohnston.wordpress.com/...iplayer-games/

    I'm going to try and modify my setup now.. unless I'm reading this wrong, all I need to do is make my master server give my game host a list of ip addresses of people who want to connect to my game, then on my phone server, send outbound packets to those client ips on those ports, therefore opening the nat

    this should be pretty easy seeing as my client server already has a heart beat report to my master server as it is anyway
    Last edited by BPANDREW; 11-15-2016, 02:23 PM.

    Leave a comment:


  • replied
    Well I seem to be having the exact opposite problem.

    I can host on phone and have other phones and/or PC's connect. But for the project I'm working on I want to connect to a pc host via my phone over local wifi lan.
    Is anyone having the same problem where this no longer works now? Or am I missing something that would allow my phone to find/connect to the pc listen host?
    I'm running on 4.13.2.

    Leave a comment:

Working...
X