OnionUI / Onion

OS overhaul for Miyoo Mini and Mini+
https://onionui.github.io
GNU General Public License v3.0
3.17k stars 190 forks source link

Pokemon hotspot - Client 'disconnects' but then syncs saves #1190

Open kjm1988 opened 8 months ago

kjm1988 commented 8 months ago

Checklist

Onions OS Version

v4.2.0-rc-snapshop-a5064207

Miyoo Firmware Version

202306282128

Provide a clear and concise description of the issue

Easy Pokémon Netplay (local hotspot) disconnects a client after 1-2mins of playing Pokémon TCG but then successfully syncs saves on closing RetroArch.

This issue doesn't occur when using our home WiFi network and manually connecting to each other but the client's save game isn't synced as it is when using the Easy Pokémon Netplay option via Hotspot.

Same model, same onion, same firmware, same ROM and we're sat next to each other.

Any suggestions please?

Steps to Reproduce

  1. Boot both Miyoo's and press Y on Pokemon Card Game (USA) on both.
  2. Select 'Pokemon Trade/Battle: Host Hotspot' on Miyoo 1 wait 5 seconds and then select 'Pokemon Trade/Battle: Join Hotspot' on Miyoo 2.
  3. Play for a couple of minutes and then the client disconnects (sat next to each other). Game desyncs.
  4. Close RetroArch on Miyoo 1, it waits then on the client to close RetroArch before attempting to sync the save game.
  5. Close RetroArch on Miyoo 2, save games successfully sync, implying both devices are still connected.

Provide any additional context or information that may help us investigate your issue

I'm happy to run through any tests and/or provide logs if someone could point me in the right direction. I will test on other GBC Pokemon ROMs over the coming days.

I'm happy to use my local WiFi as a work around rather than the hotspot Pokemon script if someone could tell me where to manually put the client saves on the host Miyoo/what the easy Pokemon script does as Netplay via my router has been absolutely solid in my testing.

XK9274 commented 8 months ago

There's some changes coming to this feature in 4.2 release - we can have a look into it then if the problem still exists 👍.

Generally though it's a connection issue, RetroArch can be quite weird with netplay if there's a bad connection.

Funnily enough aswell, when I was testing some Netplay features the closer my MMP were together the worse latency was. Other users also had this behaviour.

kjm1988 commented 8 months ago

@XK9274 We're still encountering the same issue in 4.2.2. The problem is only with 'Easy Netplay - Pokemon Trade/Battle', all other forms of netplay work well across 8 & 16bit emulators for us.

When hosting with hotspotting from Miyoo 1 the client disconnects after 1-2 minutes gameplay but then the saves sync successfully and the script ends gracefully, when hosting from Miyoo 2 the host fails to receive any save games, while Miyoo 1 (now the client) hangs on 'Syncing our save files with the host'.

Is it possible to have a Pokemon Trade/battle script that copies the Gambatte saves to TBG Dual and then from the client to the host but using normal WiFi instead of hotspotting? It's the hotspotting that seems to be the issue.

Gameplay works well when manually hosting and joining Pokemon games via RetroArch in TGB Dual (aka using local WiFi instead of hotspotting) but player 2 is missing all their Pokemon as their save isn't copied across.

I can't really code but please let me know if there's anything I can do to help troubleshoot.

kjm1988 commented 8 months ago

I've tested this in 4.2.3 and everything seems to be working perfectly now. Thank you!

I've opened another ticket as a few Netplay options are essentially duplicated but only one of them works but I'm closing this ticket.

Thank you for your work on OnionOs, it's amazing!

kjm1988 commented 8 months ago

After working flawlessly for one time only play Pokémon TCG after upgrading I'm seeing the same issue. Client 2 disconnects after 1-2 minutes playing via Hotspot, playing using normal WiFi is fine but obviously missing saves. Hosting on the other Miyoo now works but also disconnects. I have 2 more mini's on the way so hopefully I can rule out a hardware issue.

kjm1988 commented 7 months ago

@XK9274 I have tried 'Easy Netplay Pokemon' on 4 different MM+'s with Pokemon TCG (GBC) and 'Easy Netplay' with Mega Bomberman (Genesis) and all devices disconnected after a minute or two. I concluded from this that it isn't core dependent nor a hardware issue. Syncing two MM+'s during Easy Netplay also seems unnecessarily time sensitive at points during the Pokemon syncing script. I will test in a different location to rule out any potential WiFi interference issues at my home.

Playing Genesis games using normal WiFi without Hot Spotting is much more reliable, it occasionally drops the clients connection after an hour or play but not always.

Admittedly I used the same 2 SD cards across 4 devices, so in addition to trying in a different location I will try fresh installs as after repeated OTA's I have spotted other issues relating to clean up scripts not running correctly.

techfooninja commented 1 month ago

I'm seeing this as well. I'm on Onion OS 4.3.0 with firmware 202306282128. I've found that shutting down both devices through the Settings menu (not just pressing and holding the power button) and turning the devices back on gets us to where we can have a stable connection. But it seems that the next connection is in a weird state, and we have to power down and restart again.