Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCUS98632 - Gran Turismo® - Adhoc Problem #19297

Open
5 tasks done
KuRuMaA opened this issue Jun 23, 2024 · 6 comments
Open
5 tasks done

UCUS98632 - Gran Turismo® - Adhoc Problem #19297

KuRuMaA opened this issue Jun 23, 2024 · 6 comments

Comments

@KuRuMaA
Copy link

KuRuMaA commented Jun 23, 2024

Game or games this happens in

UCUS98632 - Gran Turismo®

What area of the game / PPSSPP

A friend of mine from the opposite side of the Earth wanted to race against me in Gran Turismo®
We decided to follow the official PPSSPP Guide to play using public servers (socom.cc)
We successfully set it up and we were able to see each other active on the pit/rooms. However, when my friend
decided to join the said room, it keeps telling us connection failed.

What should happen

It should've let my friend, join the room so we could start the race.

Logs

message (1).txt

Platform

Windows

Mobile device model or graphics card (GPU)

AMD Radeon 530

PPSSPP version affected

v1.17.1

Last working version

No response

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@anr2me
Copy link
Collaborator

anr2me commented Jun 23, 2024

First of all, we need logs from both sides so we can see whether data sent from one player at certain time was able to be received successfully on the other player.

And also, please select "Debug" channel on SCENET (not on all channel! otherwise there will be too much noises) to get more detailed multiplayer-related logs, as currently i don't see any player trying to communicate with you through AdhocMatching, so may be you have blocked port? (being able to chat over public adhoc server doesn't mean anything because public adhoc server always have a working port forwarding)

Try using a built-in adhoc server and try connecting to each other built-in adhoc server to see whether any of you have blocked port, as mentioned at https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP#how-to-find-out-if-a-player-have-blocked-ports-or-not
Since most adhoc games need all players to have open ports, if one of the player have blocked port it can partially working or not working at all.

Also, if any of you saw orange message like "Data from Unknown Port" on screen, it also mean one of you have port-remapping issue (which might be related to router or ISP), in this case try changing the Port Offset value.

And also, may i know the ping between you and your friend? as some games can be sensitive to latency and can't handle too large latency. (well adhoc games were designed to work on low latency in the first place)

@KuRuMaA
Copy link
Author

KuRuMaA commented Jun 25, 2024

First of all, we need logs from both sides so we can see whether data sent from one player at certain time was able to be received successfully on the other player.
here's the log from my friend when he tried to join my garage
image

As for the blocked ports, it doesn't seem like any of us have blocked ports

We saw "Data from Unknown Port" and changed ports but still, "can't connect" appears.

As for the ping between me and my friend, I don't really know how to measure it but when we played a multiplayer game our pings were nearly identical

@anr2me
Copy link
Collaborator

anr2me commented Jun 25, 2024

If any of you saw "Data from Unknown Port" there will be a problem with communication, since the public port is being changed to a random port not known by the game.

Keep changing the Port Offset until all players no longer seeing "Data from Unknown Port" anymore.
Alternatively, use VPN and play with built-in adhoc server.

To check the ping, just run ping x.x.x.x from a terminal/cmd prompt where x.x.x.x is your friend IP.

PS: Your only gives one logs again, as we need both logs from the same game play in order to match the timestamp between data send and receive, and you didn't enable the Debug channel either, so i can't see any details there.

@KuRuMaA
Copy link
Author

KuRuMaA commented Jun 26, 2024

We got to connect to our lobbies somehow (I assume it's because my friend is playing on pc now) but when we started the game we both got disconnected. Here are the logs:
host.txt
friend.txt

As for the VPN and play with built-in adhoc server, we both tried zerotier, got it to network initialize but we couldn't see each other's lobby

As for the ping, I still can't figure it out because I can't really see my friends IP (I apologize I'm stupid at these things please bare with me)

@anr2me
Copy link
Collaborator

anr2me commented Jun 26, 2024

We got to connect to our lobbies somehow (I assume it's because my friend is playing on pc now) but when we started the game we both got disconnected. Here are the logs: host.txt friend.txt

Based on your host.txt (i assume this logs is from your side), i saw sceNetAdhocPdpRecv[1:27313]: Received 1 bytes from 77.238.xx.92:27313 which is AdhocMatching communication (i assume you're using 27312 as Port Offset, because the original AdocMatching port on this game is 1).
Which mean your friend (the sender) is sending from the correct port (27313) on his public IP.

Meanwhile, based on your friend.txt logs, i saw sceNetAdhocPdpRecv[1:27313]: Received 1 bytes from 136.158.xx.228:46295, which mean the sender (you) is sending it from the wrong port, so the one having port remapping issue is on your side, while your friend is the one who saw/detects the "Data from Unknown port" message on his screen.

I can also see your friend keeps failing to connect to you and finally gives up, sceNetAdhocPtpConnect[4]: Socket Error (10037) to 136.158.xx.228:20000, the port your friend tried to connect to probably being remapped too but we don't know which port it got changed to.
These attempts to connect most likely occurred when you try to start the multiplayer game, thus getting an error, since it failed to connect to the port known by the game (but the game didn't know it got changed).

The reason why AdhocMatching works (where you can see other players in lobby) is because we have a workaround to detects the new port that got changed to, because AdhocMatching always use the same port for sending and receiving.
However, after it passed the lobby (ie. when multiplayer game started), the game usually create their own socket with custom port, and we don't know whether the port they use supposed to be the same or not between the sender and receiver, as it's customized by the game developers and varies on different games.

"Data from Unknown port" issue in an external issue related to router/ISP where they remapped the port to a different port, and the solution we can offer are: either change the Port Offset value that your router/ISP can forward properly (ie. using the same port on public IP), or switches side on who host and who joined (may not always works).
Alternatively, use VPN with built-in adhoc server, which should have minimal issue just like on LAN but with additional latency.

As for the VPN and play with built-in adhoc server, we both tried zerotier, got it to network initialize but we couldn't see each other's lobby

Most VPN doesn't have blocked port issue, so may be you or your friend use the wrong IP to connect to adhoc server? both of your should be using the VPN IP (don't use public IP, LAN IP, or localhost)
You should follow the guide at https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP#multiplayer-with-multiple-devices-on-lanvpn

As for the ping, I still can't figure it out because I can't really see my friends IP (I apologize I'm stupid at these things please bare with me)

You can ask your friend to open https://www.myipaddress.com/ and give you the IP it shown, which is his public IP.

PS: since your friend doesn't have port remapping issue and can forward the port correctly, he is more suitable to host anything.

@anr2me
Copy link
Collaborator

anr2me commented Jun 28, 2024

btw @KuRuMaA I made some changes in attempt to prevent (or at least reduce the chance) getting port remapping issue.

Could you and your friend try this Windows x64 build: https://github.com/ANR2MERefork/ppsspp/actions/runs/9716774594/artifacts/1649656177
Edit: the latest dev build at https://www.ppsspp.org/devbuilds/ also have this changes now.
And see whether any of you still seeing the "Data from Unknown Port" message on screen.

All players need to use this same PPSSPP build, and hopefully it can solve the long standing "Data from Unknown Port" issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants