Posts: 149
Threads: 0
Joined: Jul 2014
Reputation:
4
08-13-2021, 01:45 PM
(This post was last modified: 08-13-2021, 01:48 PM by Zinx777.)
Well looks like it also happens on WIndows 10 now.
So I dont think its an OS thing anymore but a router thing that somehow gets resolved by either using a VPN or using a non-adhocmatching game (for real like 90% chance it will work there).
I tried to play with someone and he tried both Android and Win10 and he still got me to get the incorrect source port issue on both platforms lol with a adhocmatching game (but not non-adhocmatching).
Posts: 418
Threads: 0
Joined: Jun 2014
Reputation:
35
08-14-2021, 10:01 PM
(This post was last modified: 08-14-2021, 10:08 PM by AdamN.)
There are Win10 updates recently while adhoc haven't been updated for... months may be (i don't even remembered when was the last PR), so if newer OS updates is starting to get this issue.. may be it's the correct socket's binding behavior that got fixed recently by OS devs, but i haven't found any documentation how to trigger this (may be PPSSPP's netcode accidentally triggering this for a long time but because not many OS fixed it it somehow worked fine in the past)
Also, the only reason you won't be seeing this "incorrect port" message on non-adhocmatching games, is because it's only shown on adhocmatchng games, it won't be shown on non-adhocmatchin games even when they had this issue too.
It's not like i didn't want to show it, it's because non-adhocmatching games are using custom port, so i don't know what are the correct port suppose to be (without customizing it for each games), thus unable to report it as "incorrect" without knowing the correct one.
PPSSPP Multiplayer Guide: https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP
Posts: 149
Threads: 0
Joined: Jul 2014
Reputation:
4
08-15-2021, 04:14 AM
(This post was last modified: 08-15-2021, 05:19 AM by Zinx777.)
Yeah you say the message does not appear but every time I play a non adhocmatching game and host it it works while other games do not.
So if it does work there consistently almost it might be good to look at it maybe.
This is not including GameMode games though as it could also happen there.
In conclusion:
Not working with Adhocmatching
Not working with GameMode
Working with other games as long as the player that does not have the issue hosts.
Posts: 418
Threads: 0
Joined: Jun 2014
Reputation:
35
Both AdhocMatching and GameMode are using PDP/UDP socket under-the-hood where the lobbying/matchmaking are managed by AdhocMatching/GameMode library provided by Sony, while non-adhocmatching/non-gamemode can using PDP/UDP/PTP/TCP socket directly and have their own matchmaking/lobbying (custom-made by the game developer or using a third-party matchmaking library)
Current AdhocMatching implementation is unreliable, and GameMode implementation is still lacking.
PPSSPP Multiplayer Guide: https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP
Posts: 149
Threads: 0
Joined: Jul 2014
Reputation:
4
Your implementations are still impressive.
I can't get most of the games on xlink to even work lol while they work on PPSSPP.
I think that with a bit more work it could be great.
I wish I got a PS3 but meh not worth it and even some games work on PPSSPP still lol.
Posts: 418
Threads: 0
Joined: Jun 2014
Reputation:
35
08-18-2021, 04:02 PM
(This post was last modified: 08-18-2021, 04:09 PM by AdamN.)
Hmm.. after reading this
https://stackoverflow.com/questions/3177...erver-recv
It seems there are cases where received source port to be different than the sender port, and it was something todo with port re-mapping done by router or ISP.
Quote:Some further information. Your approach is logical, RTSP is indeed doing similar things. However, that also caused trouble when ISP and your router start doing port re-mapping, for RTSP they have special port arrangement and RTSP-aware NAT is actually watching the TCP communication and special handle those port. But for custom protocol you should do the complicated way.
In this case, i should probably remove the code that checked the source port and always assume it as valid port.
However, if there are games that checked the port too, those games may consider it as invalid port, hopefully there are no games that does this, at most probably only 3rd-party library used by the game who have a possibility to check the port.
PPSSPP Multiplayer Guide: https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP
Posts: 418
Threads: 0
Joined: Jun 2014
Reputation:
35
08-19-2021, 03:13 PM
(This post was last modified: 08-19-2021, 03:46 PM by AdamN.)
Ugh.. on a second thought, always assuming the source port to be valid won't fix this issue entirely...
because the way AdhocMatching worked is, when someone created a room they will broadcasts that room data to all members in the same group, and when that member received this room data they will show it on screen.
However, this broadcast is using a predefined port (initialized by the game when creating AdhocMatching) and all players supposed to use the same port, but due to this "incorrect port" issue some players might not be able to received this room data, because it will be getting a random port and other players won't know the port (not even the player that had this issue know which port they're actually using, because trying to retrieved the binded port will show the predefined port, which normally to be correct but may no longer correct due to this issue)
So, basically, always assuming the source port to be valid will only increase the possibility for AdhocMatching to work, but not entirely fix this issue, because the issue is on the router side, and we don't know what's triggering this behavior on LAN... may be enabling UPnP when playing on LAN causing some router to get confused.
But even if we can fix this on LAN (ie. by disabling UPnP options, that is if UPnP causes some router to get confused), people who use UPnP over the internet will also have a possibility to get the same issue due to port re-mapping done by the router or ISP (which is normal over public IP, but not supposed to happen on LAN IP)
PS: GameMode is also using a single predefined port to be used for sending & receiving data (as i remembered), thus will have similar issue to AdhocMatching.
PPSSPP Multiplayer Guide: https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP
Posts: 418
Threads: 0
Joined: Jun 2014
Reputation:
35
09-17-2021, 04:25 AM
(This post was last modified: 09-17-2021, 05:41 AM by AdamN.)
I've updated my test builds on my signature to handle "incorrect port" (now written as "unknown port") issue better by keeping track the new port for further communication.
However, keeping track of the port will only work if the player were able to receive a data on the "correct" port in order to get the sender port (which might be re-mapped), which mean the player who supposed to receive the data for the first time must not have their port being re-mapped.
Edit: You can also get the artifacts from this PR
https://github.com/hrydgard/ppsspp/pull/14870
Please this those test builds to see whether they're better or not, because i'm having difficulty trying to reproduce the "incorrect port" issue on my end.
Please also test the "UseOriginalPort" thing with this, in case the issue why it didn't work before was because the port were different and being ignored by AdhocMatching.
I'm planning to do the same for GameMode (ie. keeping track the port) which potentially have similar issue to AdhocMatching, but i never tried to show a warning on screen, thus we never saw reports about it on GameMode.
PS: Players who had the warning shown on their screen are not the one who had their port being re-mapped, since they're able to receive data on the "correct" port.
PPSSPP Multiplayer Guide: https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP
Posts: 149
Threads: 0
Joined: Jul 2014
Reputation:
4
Just saying but I got the message on a GameMode befoe this so..
You will get this there because the game uses AdhocMatching in the lobby anyway.
Posts: 418
Threads: 0
Joined: Jun 2014
Reputation:
35
I've updated the test builds on my signature with this PR for GameMode
https://github.com/hrydgard/ppsspp/pull/14880
PPSSPP Multiplayer Guide: https://github.com/hrydgard/ppsspp/wiki/How-to-play-multiplayer-games-with-PPSSPP