Android multiplayer wlan: Android as host device problem

Did you use router ? or Wi-Fi Direct as i like ti know if Wi-Fi Direct and Bluetooth added to 4.12 .

I used router.

Man, this is really important. Now that 4.13 is out, when can iphone’s play with each other?

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.

So I started reading this today - NAT Punch-through for Multiplayer Games | Keith Johnston

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?

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 - GitHub - bitporters/RC_TRAINER: Unreal Sample Mashup with C++ Layer Multiplayer Elements (chat &am (http based game browser, +nat punch when I figure it out)

Any updates

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.

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.

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?

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

can someone please test it? :frowning: in 4.21 the phone ip is given wrong and it doesn’t join :frowning: please someone test it and tell us

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

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!

Hi,

Tried on 4.23 beta 6, still the same error 127.0.0.1
Anyone with a workaround ?

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?

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

i cant get to links of github , i have linked my account but its not working

any one solve hosting on android devices plz help

thx all

I just checked the git links are definitely still working fine. Epic hosts all of their source code there! Double you checked you linked the correct account as per the instructions here:

logout and log back into github?

PS: this workaround should in theory only be required for versions before 4.12…

Something for 4.24? 4.23 returns localhost during session connection