Homebrew Save Nintendo WiFi - A project to save online servers for DS (and Wii) games

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
Hm, I still cannot join the room - I'll upload some logs again (10.0.1.226 is host of room). Also, I do not find any part where MKWii transmits maxplayers=0...
The connection seems to end at "Responding with own IP and port..." - maybe there is a wrong endianness again?

Also, the direct friend request sending didn't change anything at the time needed to see a friend online the first time. But this is not a problem, since everyone can wait a few minutes for this. And this problem also happens nearly every time with the official servers, so we should not care about it.
 

Attachments

  • dump.zip
    12 KB · Views: 89

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
Same error as before, logs and network dumps are here:

But I found something curious in gamespy_server_browser_server.py:

Code:
            elif (options & ALTERNATE_SOURCE_IP):
                source_ip = utils.get_int(data, idx)
            elif (options & ALTERNATE_SOURCE_IP):
                send_ip = True
If I understand that correctly, the "send_ip = true" is never set because it never jumps in that elif part. I tried changing that, but it didn't change anything.
 

Attachments

  • dump.zip
    11.3 KB · Views: 96

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
I tried, but had no success.

You can find the info if the server should return the game port in the natneg data, step 0x00, offset 0x0E. If it's 1, use game port. If it's 0, use client port (http://wiki.tockdom.com/wiki/MKWii_...ii.natneg.gs.nintendowifi.net#INIT_.280x00.29)

But I tried again and it did not work. Also, I never saw the Wii with the open room sending a "maxplayers=0". The Wii with the room always sent a maxplayers=11, only the other client sent a maxplayers=0 while being connected.

Do you need me to upload logs and dumps again?
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
10.0.1.30 is NOT my local IP - this IP does NOT exist in my network and gets send because of a programming mistake by Nintendo. If a client returns 10.0.1.30 as his localip0, you have to use its public IP as local IP, because Nintendo initializes this variable with "10.0.1.30" and forgot to delete it if there is no need for natneg. If you receive 10.0.1.30 as local IP, the public IP is the local IP and a real public IP is not needed because the server and the client(s) are behind the same NAT.

So, for a successful connection one of the following statements must be true:
- Every client is behind the same NAT than the server.
- No client is behind the same NAT than the server.

If one client would be behind the NAT, and another not, the natneg will only receive the local IP from client 1 and client 2 won't be able to connect to client 1.

I tried the new version and it did not work again.
Maybe you can start the server on your computer and I try connecting to your server so that clients and server aren't behind the same NAT? Here is my database:
 

Attachments

  • gpcm.db.zip
    893 bytes · Views: 78

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
Yes, I'm now in a friend room. A race works probably! :toot:

What did you change? What was the problem? Then I can try if it now works locally, too.
You did not find a dump with "10.0.1.30" somewhere else, since no one tried connecting to an own local natneg server, I think. But I can ask Wiimm to try that out later.
 

jerbear64

Well-Known Member
Member
Joined
Dec 10, 2011
Messages
304
Trophies
1
Age
24
XP
381
Country
United States
My brother decided to be a jerk and upgrade my DSi to 1.4.5, so I can't help patch games, sorry about that.
I'm going to dust off my old copy of Pokemon HeartGold and get those packets for ya.
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
Yes, 10.0.1.104 is Dolphin.

The 10.0.0.0/8 network is very common in companys - maybe Nintendo used this while testing?
Tomorrow I'll try setting my own network back to 192.168.0.0/16.

But, in fact, a wrong address gets returned that is unusable.

Have you stopped the server again? I wanted to try driving a full event with four races and also the other variants like team race or battle mode.
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
It does not work locally, probably because Nintendo hasn't implemented the detection if natneg is needed or not. But your remote server works well.
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,859
Country
Germany
This makes no difference, since publicport and localport are the same.

Maybe we should send a bug report to the dolphin programmers that Dolphin returns a wrong IP in some cases?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Is swallowing considered cannibalism? +1