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,861
Country
Germany
It still works.

But I don't think a simple "brute force" about which answer the client wants to receive is not a good solution. Maybe you can simply check if there is a "ds" in the name string (then it's a DS game), if there is a "wii" in the name string (then it's a Wii game), and if you can't find one of those strings, then you can do it like now.

Almost every DS game name ends with "ds" or "dsam" (DS automatch) and almost every Wii game ends with "wii".

But we can leave this as it is for now until the server is complete.

At the moment, I'm able to add friends (but the "success"-message from the server takes a long time...), but I don't get a status message when one of my friends comes online.
 

leseratte

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

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,861
Country
Germany
You have a little typo in gamespy_player_search_server.py on line 50 - you wrote "self,address" instead of "self.address".

I also get an exception at line 60, 71, 74 and 88 - you wrote "self.log" instead of "logger.log".

Now i've tested it with the gpsp from your script - it works, but I have a little hint: If you don't find the pid in the database, you can simply return an empty string as "uniquenick". This also works.

Also, there is a little bug in line 86: When your friendlist is empty, the Wii transmits numopids=0 and opids=0. So there comes an error message "Got 1, expected 0". If you got a "0" as opid, you have to ignore it. "0" is no valid profile ID.

Here is a patch for all those things:
 

Attachments

  • patch.diff.txt
    2.4 KB · Views: 265

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,861
Country
Germany
Again, I'm unable to drive a race. The first console gets a "matched 1 servers", the other "matched 0 servers". There is some natneg but it seems to fail.

That might be because the server is behind the same NAT as Dolphin and the Wii. I'll try setting up a second NAT with an old Router.
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,861
Country
Germany
Well, I tried again with network dumping and it works now. I've made a mistake with my network configuration.

Global and continental races now work perfectly, the only non-working thing are friend matches.
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,861
Country
Germany
The network error was a simple configuration mistake in my router. Had nothing to do with your scripts / the server.

If it helps, I could upload a network dump with video recording. Then you can see what happens in which point. Upload is running and should be finished in ~ 1 Minute. Upload is finished.

(Unfortunately, video and network aren't syncron. For syncronization: network timestamp 8:29:24.469 pm is at 06:18 in the video. )

http://wfc-share.com/mkw-log-2014-03-13-ct1401.tar.gz

I can't give you a dump while trying to connect to a friend race, because this does not work. The server sends a message "Friend XY has opened a room", and then you see a purple button flashing (you can see this at 04:09 in the video), and then you can click this button to connect to the friend. If the server doesn't send "room is open", you can't connect.

EDIT: You will probably have to implement all the "bm"-messages, but you should begin with the "bm=100"-message.
 

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,861
Country
Germany
For the bm=100 message, you simply have to send the Offline-String when a friend goes offline, and the combined string out of status, statstring, locstring and IP to the Wii. Exact protocol here: http://wiki.tockdom.com/wiki/MKWii_Network_Protocol/Server/gpcm.gs.nintendowifi.net#bm.3D100

The bm=1, bm=5, bm=102, bm=103 messages come from the client, containing the sesskey, the value "t" and the value "msg". You then need to find out the profile ID relating to that sesskey, and then send a message containing bm=??? (value from query), f (from) = profile ID from sesskey and the msg sent by the client. Protocol here: http://wiki.tockdom.com/wiki/MKWii_Network_Protocol/Server/gpcm.gs.nintendowifi.net#bm.3D1
You also have to check if the pid coming from the sesskey has the profile "t" as a buddy. If not, send error message 2305 (http://wiki.tockdom.com/wiki/MKWii_Network_Protocol/Server/gpcm.gs.nintendowifi.net#error)
 

leseratte

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

leseratte

Wiimmfi Team
Member
Joined
Jun 2, 2012
Messages
453
Trophies
1
XP
1,861
Country
Germany
OK, I was too impatient. Lets try if a friend race works...

EDIT:
It does not. I see that the other player is hosting a game, but I'm unable to join. The player search of the guest wii doesn't find the server, so the opened friend game is not correctly put into the database. I'll upload logs and a network dump in a few minutes.

EDIT 2: Here are the logs and a network dump:
 

Attachments

  • friendrace.zip
    11.2 KB · Views: 134

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    T @ Texasauras: SOLILOQUY