Difference between revisions of "Wiimmfi"

From Custom Mario Kart
Jump to navigation Jump to search
(→‎Using old profiles: Final gamespy server shutdown)
m
 
(69 intermediate revisions by 14 users not shown)
Line 1: Line 1:
 
[[File:Wiimmfi-300.png|right]]
 
[[File:Wiimmfi-300.png|right]]
[[Nintendo]] has announced that the [[Nintendo Wi-Fi Connection]] service will be [http://www.nintendo.com/consumer/info/services-update.jsp discontinued on May 20, 2014.]  This will impact all DS and Wii games with online features, including Mario Kart Wii. [[Wiimm]] had been analysing the [[Mario Kart Wii]] network traffic since November 2012 and had already written an helper tool named [[mkw-ana]]. And so he decided together with other people to create the '''Wiimmfi Project''' (formerly '''Wii-Server Project''') to replace Nintendo's servers for [[Mario Kart Wii]] and perhaps for other games.
+
[[Nintendo]] announced that [[Nintendo Wi-Fi Connection]] would be [https://www.nintendo.com/consumer/info/services-update.jsp discontinued on May 20, 2014.]  This impacted all [[Nintendo DS]] and [[Wii]] games with online features that were directly using Nintendo WFC, which included [[Mario Kart Wii]]. [[Wiimm]] had been analyzing the [[Mario Kart Wii]] network traffic since November 2012, and had already written a helper tool named [[mkw-ana]]. And so he decided, together with other people, to create the '''Wiimmfi Project''' (formerly '''Wii-Server Project''') to replace Nintendo's servers for [[Mario Kart Wii]] and for other games, if possible.
  
  
Line 8: Line 8:
 
== wiimmfi.de ==
 
== wiimmfi.de ==
  
'''wiimmfi.de''' is the new domain that replaces '''nintendowifi.net'''. All games must be patched to use this new domain and to disable https requests (see below).
+
'''wiimmfi.de''' replaces '''nintendowifi.net''' in games. All games must use this new domain and change https to http (see below).
  
The domain '''wiimmfi.de''' was registered by [[Wiimm]] for this project. If [[Wiimm]] discontinue this service at any time in the future, he will give away the the domain, the software and the data base content.
+
The domain '''wiimmfi.de''' was registered by [[Wiimm]] for this project. If [[Wiimm]] discontinues this service at any time in the future, he will give away the domain, the software and the data base content.
  
 
== State of the Project ==
 
== State of the Project ==
  
At May 10 2014, 10 days before Nintendo shut down his servers, [[Wiimm]] released the [[Wiimmfi-Patcher]]s. Since that day, the Wiimmfi-Server are available for the public. At the first day, the server supported only [[Mario Kart Wii]] including the different [[Custom Track Distributions]]. And now many more games are available<ref>[http://wiimmfi.de/stat#game Wiimmfi: Supported games]</ref>.
+
On May 10 2014, 10 days before Nintendo shut down their NAS and disconnected themselves from [[GameSpy]], [[Wiimm]] released [[Wiimmfi Patcher]]s. Since that date, Wiimmfi was publically usuable. At first, the server only supported [[Mario Kart Wii]], including the different [[Custom Track Distribution]]s. However, more games have been enabled, tested, and are now fully supported.
  
=== Confirmed games ===
+
&rarr; [https://wiimmfi.de/stat?showall=1 List of all Wiimmfi games (supported, test and disabled)]
  
The following games can be played using the custom servers:
+
The game lists also contains information about issues.
* Animal Crossing: City Folk/Let's Go to the City!
 
* ExciteBots: Trick Racing
 
* Fortune Street Wii
 
* GTI Club Supermini Festa
 
* '''Mario Kart Wii''' (no competitions, mii exchange, ghosts and rankings in beta test)
 
* Mario Strikers Charged
 
* Pokemon Battle Revolution
 
* Pro Evolution Soccer 2008-2013
 
* Sonic & SEGA All-Stars Racing (only global races)
 
* Super Smash Bros. Brawl
 
* Tatsunoko VS. Capcom: Ultimate All Stars
 
* The Last Story (no online statistics)
 
* We Love Golf!
 
&rarr; [http://wiimmfi.de/stat#game A more detailed list of supported games]
 
  
Don't forget that the development is not finished yet.
+
== Connecting to Wiimmfi ==
  
=== Games ready to test ===
+
Wii games must be patched to access Wiimmfi, as Nintendo Wi-Fi Connection originally used SSL for login. However, a variety of patchers exist for Wii games:
 
+
* '''[https://chadsoft.co.uk CTGP-R]''' automatically includes Wiimmfi support in-app, with no setup required.
The following games are enabled and waiting for tests:
+
* '''[https://download.wiimmfi.de/patcher/autowiimmfipatcher-latest.zip Auto Wiimmfi Patcher]''' is a home-brew app that will automatically patch Wii discs when launched (however, it is required to launch the app every time) - this app can also be accessed by setting the Wii's DNS to '''95.217.77.151''' and launching the WC24/Wii Shop Channel license agreement.
* ExciteBots: Trick Racing
+
* '''[https://github.com/RiiConnect24/auto-wiiware-patcher/releases Auto WiiWare Patcher]''' can patch most WiiWare WADs to allow enable Wiimmfi access.
* Fortune Street Wii
+
* '''[https://download.wiimmfi.de/patcher/wiimmfi-patcher-latest.zip Wiimm's Disc Patcher]''' can permanently patch disc images.
* Mario Kart DS ([http://save-nintendo-wifi.com/mkds/MarioKartDS(USA)-NoSSL.xdelta NTSC-U-patch], [http://www62.zippyshare.com/v/89907886/file.html PAL-patch])
+
* Updated USB Loaders can also automatically patch USB images for Wiimmfi - ''recent'' versions of USB Loader GX and WiiFlow can automatically patch for Wiimmfi using a Private Server option.
* Pro Evolution Soccer 2009-2012 USA/JPN
 
* Tatsunoko VS. Capcom: Ultimate All Stars
 
* The Conduit 2
 
* Trackmania Wii
 
* We Love Golf!
 
 
 
It seems that DS games also need a patch to replace ''https'' requests by ''http''. [http://www.mediafire.com/download/s5ucc79m6xzrtis/SslPatcher_v1.4.zip Here] you can find a patcher that should work with all DS games.  
 
 
 
=== Known Mario Kart Issues ===
 
 
 
# After registering a new friend, the Miis are not exchanged with the result, that the players can't meet in a room. Workaround: Play one global race.
 
 
 
== Game Patcher ==
 
 
 
To play Wii games using the custom server, the games must be patched using the [[wiimmfi-Patcher]]. There are 2 patchers for USB-Loader, one for Mario Kart Wii and one for other games.  
 
For [[Riivolution]] users, [[MrBean35000vr]] is on the way to create a channel, that will patch the strings on the fly.
 
 
 
{{youtube-box|tutorial|RqFtklrXY9M|Bean's Wiimmfi Tutorial - Homebrew Channel}}
 
 
 
{{youtube-box|tutorial|IIDIHEdzle4|BeanJr's Wiimmfi Tutorial - Universal (ntscj not supported)}}
 
 
 
== Updates/Maintenance ==
 
 
 
The wiimmfi-server is running in test mode. There is a second server for the active development. And so major updates must be done frequently.
 
 
 
'''The maintenance time is set between 15:00 and 16:00 UTC (17–18h CET) at every day.''' In this time the server may be stopped for updates and other things without further announcement. Don't be surprised if you are kicked or if login is not possible during this period. This time will also used to insert new retrieved friend codes.
 
  
 
== Implementation ==
 
== Implementation ==
  
[[Wiimm]] decided to implement the code in PHP as a fast solution and to find out the protocol details. From the beginning it was clear that it must be rewritten in C or C++ for performance reasons. While developing, there were some other issues. And now 2 servers are already implemented in C.
+
[[Wiimm]] originally implemented the server in PHP, so that the servers were created quickly. From the beginning of development, it was known that the servers must be ported to C/C++ to improve performance. While developing, there were issues due to using PHP, and 2 servers have thus been ported to C.
 
 
=== [[Server NASWII]]/NAS ===
 
 
 
[[Server NASWII]] is the ''https'' based login server. NAS is an old NDS implementation for ''http''. Both can be interchanged. On Wiimmfi, the server is implemented using APACHE2 and PHP5.
 
  
At the moment, only logins are accepted with old and new profiles. Complete new savegames send a request to get their unique console nickname from the server. This is not implemented yet.
+
=== NAS ===
  
=== [[Server GPCM]] ===
+
[[NAS]] is the Nintendo Authentication Server. The Wii used naswii with HTTPS, and the DS used nas (which supported HTTP) with HTTPS. They are interchangeable. On Wiimmfi, the server is implemented using APACHE2 and PHP5. At the moment, logins are accepted with old and new profiles. New savegames send a request to get their unique console nickname from the server.
  
If entering the WFC, the Wii connects to the [[Server GPCM]] using TCP. The connection is closed, when leaving WFC. The server is used for general maintenance and for message exchange between the clients.
+
=== GPCM ===
  
It is implemented as PHP script. The interprocess communication (transferring messages) is implemented with UNIX sockets.
+
When entering the WFC, the Wii connects to [[GPCM]] using TCP. The connection is closed upon leaving WFC. The server is used for general maintenance and for message exchange between the clients.  
  
=== [[Server GPSP]] ===
+
It is currently implemented as PHP script. The interprocess communication (transferring messages) is implemented with UNIX sockets. To improve the performance and to allow a better interprocess communication, a C-server was written. It is still in development and supports a model with supervisors and workers. Since March 2016, the new server is in use at Wiimmfi's test server.
  
[[Server GPSP]] is used to retrieve information about friends. The Wii connects and disconnects frequently using TCP. We use Nintendos GPSP server to retrieve the profile_id and nick pairs.
+
=== GPSP ===
  
On Wiimmfi, [[Server GPSP]] is fully implemented as PHP script.
+
[[GPSP]] is used to retrieve information about friends. The Wii connects frequently using TCP. Nintendo's GPSP server was used to retrieve the profile_id and nick pairs before shutdown.
  
=== [[Server MASTER]] ===
+
On Wiimmfi, [[GPSP]] has been implemented as PHP script.
  
[[Server MASTER]] listens at UDP port 27900. The clients (games) send frequently status records to the master. The master server stores them into a game specific table, where other clients can retrieve the information using the [[Server MS]] (see next point).
+
=== MASTER ===
  
[[Server MASTER]] is now fully implemented in C for performance reasons.
+
[[MASTER]] listens on port 27900 via UDP. Games send status records to MASTER. MASTER stores them into a game specific table, where other clients can retrieve the information using [[MS]] (see next point).
  
=== [[Server MS]] ===
+
At the beginning, [[MASTER]] was implemented as PHP script. In September 2014 it was replaced by a giant server written in C to improve performance. The new MASTER reduces was optimized and reduces queries to the database by ~90%.
  
[[Server MS]] is connected by the clients to retrieve information about other online clients. The query looks like a SQL query with ''select'', ''where'' and ''limit'' clauses. The reply is encrypted by a game specific secret.
+
=== MS ===
  
[[Server MS]] is fully implemented as PHP script, but pipes the response through an encoder written in C.
+
[[MS]] is used by the clients to retrieve information about other online clients. The query is similar to an SQL query, with ''select'', ''where'' and ''limit'' clauses. The reply is encrypted by a game specific secret.
  
=== [[Server NATNEG]] ===
+
At the beginning, [[MS]] was implemented as PHP, but piped the response through an encoder written in C. In January 2016, it was integrated into the MASTER server (written in C).
  
[[Server NATNEG]] is used to establish a connection between two players both being behind NAT. The clients only communicate with this server when they try to connect to another player.
+
=== NATNEG ===
  
[[Server NATNEG]] is fully implemented in C. Because it was the first C tool, it has an open second port to send special UDP packets for [[Server MS]] with the faked sender address of [[Server MASTER]].
+
[[NATNEG]] is used to establish a connection between two players, both of whom are behind NAT. The clients only communicate with this server when they try to connect to another player.
  
=== [[Server SAKE]] ===
+
[[NATNEG]] has been implemented in C. As it was the first C tool, it has an open second port to send special UDP packets for [[MS]] with the faked sender address of [[MASTER]].
  
[[Server SAKE]] is used for data exchange — files or records can be uploaded to the sake server. This is used for friend Mii exchange in Mario Kart Wii.
+
=== SAKE ===
  
[[Server SAKE]] is being adapted by [[Leseratte]] from the »DWC Network Server Emulator« by Nagato and will probably be reimplemented later for performance reasons.  
+
[[SAKE]] is used for data exchange — files or records can be uploaded to the SAKE server. This is used for friend Mii exchange in Mario Kart Wii, along with ghosts.  
  
=== [[Server RACE]] ===
+
SAKE has been implemented in PHP, and can send/receive ghosts and Miis, along with other games' data.
  
[[Server RACE]] is used for downloading the rankings in Mario Kart Wii.
+
=== RACE ===
  
[[Server RACE]] is being implemented by [[Leseratte]] and will probably be reimplemented later for performance reasons.  
+
[[RACE]] is used for downloading competitions and rankings in Mario Kart Wii. RACE has been implemented in PHP, with competition support added by Leseratte (with help from Billy), which is now fully working.
  
=== [[Server GAMESTATS]] ===
+
=== GAMESTATS ===
  
[[Server GAMESTATS]] is for game statistics. Ciapa tries to implement rudimentary functions of the server.
+
GAMESTATS is for game rankings/leaderboards. There are two versions of it; HTTP and TCP. Sepalani has implemented both in Python, the former is a near-complete implementation. Games like Mario Strikers Charged and Dr. Mario Online Rx use GAMESTATS.
  
=== [[Server DLS1]] ===
+
=== DLS1 ===
  
[[Server DLS1]] is a server for game updates. It is implemented as APACHE2/PHP script. At the moment, it just returns that no update is available. The base system allows different DLS1 server for different games.
+
[[DLS1]] is a server for game file downloading. Wiimmfi runs a PHP version which has no files (due to copyright reasons), but a third-party DLS1 server is also ran for a lot of NDS/Wii games for their own files. This server is unused by Mario Kart Wii.
  
 
== Using old profiles ==
 
== Using old profiles ==
  
For each profile, there exists a '''[[friend code|profile id]] and [[nick|nick name]] pair'''. Only the Wii of the user and the server database knows both of them. At login the Wii sends the [[nick|nick name]] and the server answers with the related [[friend code|profile id]]. If the profile id is wrong, the game aborts the login.
+
For each profile, there exists a '''[[friend code|profile ID]] and [[nick|nickname]] pair'''. Only the Wii and the server they were created on knows both of them. At login the Wii sends the nickname and the server answers with the related [[friend code|profile ID]]. If the profile ID is wrong, the game will abort the login with error code 60000.
  
If you want to use your old profile with the new custom servers, you must use a special homebrew app:
+
There is only 1 way to use your old profiles with Wiimmfi: At the beginning of the project, when the old [[GameSpy]] servers were available (which shut down on July 25th, 2014), Wiimm retrieved 2.9 million pairs. If your profile was retrieved, it is possible to use your old license on Wiimmfi; otherwise, you will need to create a new friend code (Mario Kart Wii now automatically does this with the latest patch)
You can download the app [http://maschell.de/pidtool.zip here]. Simply start it and all profiles from supported games will get transmitted to our server. You can find a list of all supported games [http://forum.wii-homebrew.com/board42-kreativitaet/mkw-server-project-english/51831-wiipid-extractor/ here].
 
  
The servers for the data retrieving were shut down on July 25th, 2014. So the old friend code formula does not work any more and the only way to transmit your friend code is the homebrew app.
+
&rArr; [[Wiimmfi/Error 60000|Details and solutions]]
  
If you want to use one of your old profiles please use one of them during '''your first connection'''. It may lead to problems if your first connection is done with a new profile.
+
== Links ==
  
== Links ==
+
;More about Wiimmfi at this Wiki
 +
* [[MKWii Network Protocol/Server/gpcm.gs.nintendowifi.net/Wiimmfi|Wiimmfi extension of the GPCM server protocol]]
 +
* [[Wiimmfi/Connection Status|Connection Status]] (status summary)
 +
* [[Wiimmfi/Nice ID|Nice ID]] (concept)
 +
* [[Wiimmfi/Online Status|Online Status]] (status summary)
 +
* [[Wiimmfi/Error 60000|Error 60000]]
  
 
;Project forum at Wii-Homebrew.com
 
;Project forum at Wii-Homebrew.com
* [http://forum.wii-homebrew.com/index.php?page=Thread&postID=580703 MKW-Server-Project]
+
* [https://forum.wii-homebrew.com/index.php?page=Thread&postID=580703 Wiimmfi Project: Introduction]
* [http://forum.wii-homebrew.com/index.php?page=Thread&postID=588239 Web Formula to register your old friend code]
+
* [http://wiiki.wii-homebrew.com/Wiimmfi_(en) Wiimmfi-Page at WHB-Wiki] (english)
* [http://forum.wii-homebrew.com/index.php?page=Thread&postID=592245 Wiipid extractor to dump your old friend code from the savegames]
+
* [http://wiiki.wii-homebrew.com/Wiimmfi Wiimmfi-Seite im WHB-Wiki] (deutsch)
 
 
; Other forums
 
* [http://www.mariokartwii.com/threads/134892-MKWii-Server-Project Project thread at mariokartwii.com]
 
* [http://gbatemp.net/threads/save-nintendo-wifi-a-project-to-save-online-servers-for-wii-and-ds-games.362716/ Project thread at gbatemp.net]
 
  
; References
+
;Forums at GBATEMP.net
<references/>
+
* [https://gbatemp.net/threads/save-nintendo-wifi-a-project-to-save-online-servers-for-wii-and-ds-games.362716/ Save Nintendo WiFi]
 +
* [https://gbatemp.net/forums/wii-nintendo-wi-fi-connection.109/ Nintendo Wi-Fi & Wiimmfi]
  
[[category:General Information]]
+
[[category:Wiimmfi]]
 
[[category:Software]]
 
[[category:Software]]
 
[[category:Network Protocol]]
 
[[category:Network Protocol]]

Latest revision as of 11:33, 30 April 2023

Wiimmfi-300.png

Nintendo announced that Nintendo Wi-Fi Connection would be discontinued on May 20, 2014. This impacted all Nintendo DS and Wii games with online features that were directly using Nintendo WFC, which included Mario Kart Wii. Wiimm had been analyzing the Mario Kart Wii network traffic since November 2012, and had already written a helper tool named mkw-ana. And so he decided, together with other people, to create the Wiimmfi Project (formerly Wii-Server Project) to replace Nintendo's servers for Mario Kart Wii and for other games, if possible.



wiimmfi.de

wiimmfi.de replaces nintendowifi.net in games. All games must use this new domain and change https to http (see below).

The domain wiimmfi.de was registered by Wiimm for this project. If Wiimm discontinues this service at any time in the future, he will give away the domain, the software and the data base content.

State of the Project

On May 10 2014, 10 days before Nintendo shut down their NAS and disconnected themselves from GameSpy, Wiimm released Wiimmfi Patchers. Since that date, Wiimmfi was publically usuable. At first, the server only supported Mario Kart Wii, including the different Custom Track Distributions. However, more games have been enabled, tested, and are now fully supported.

List of all Wiimmfi games (supported, test and disabled)

The game lists also contains information about issues.

Connecting to Wiimmfi

Wii games must be patched to access Wiimmfi, as Nintendo Wi-Fi Connection originally used SSL for login. However, a variety of patchers exist for Wii games:

  • CTGP-R automatically includes Wiimmfi support in-app, with no setup required.
  • Auto Wiimmfi Patcher is a home-brew app that will automatically patch Wii discs when launched (however, it is required to launch the app every time) - this app can also be accessed by setting the Wii's DNS to 95.217.77.151 and launching the WC24/Wii Shop Channel license agreement.
  • Auto WiiWare Patcher can patch most WiiWare WADs to allow enable Wiimmfi access.
  • Wiimm's Disc Patcher can permanently patch disc images.
  • Updated USB Loaders can also automatically patch USB images for Wiimmfi - recent versions of USB Loader GX and WiiFlow can automatically patch for Wiimmfi using a Private Server option.

Implementation

Wiimm originally implemented the server in PHP, so that the servers were created quickly. From the beginning of development, it was known that the servers must be ported to C/C++ to improve performance. While developing, there were issues due to using PHP, and 2 servers have thus been ported to C.

NAS

NAS is the Nintendo Authentication Server. The Wii used naswii with HTTPS, and the DS used nas (which supported HTTP) with HTTPS. They are interchangeable. On Wiimmfi, the server is implemented using APACHE2 and PHP5. At the moment, logins are accepted with old and new profiles. New savegames send a request to get their unique console nickname from the server.

GPCM

When entering the WFC, the Wii connects to GPCM using TCP. The connection is closed upon leaving WFC. The server is used for general maintenance and for message exchange between the clients.

It is currently implemented as PHP script. The interprocess communication (transferring messages) is implemented with UNIX sockets. To improve the performance and to allow a better interprocess communication, a C-server was written. It is still in development and supports a model with supervisors and workers. Since March 2016, the new server is in use at Wiimmfi's test server.

GPSP

GPSP is used to retrieve information about friends. The Wii connects frequently using TCP. Nintendo's GPSP server was used to retrieve the profile_id and nick pairs before shutdown.

On Wiimmfi, GPSP has been implemented as PHP script.

MASTER

MASTER listens on port 27900 via UDP. Games send status records to MASTER. MASTER stores them into a game specific table, where other clients can retrieve the information using MS (see next point).

At the beginning, MASTER was implemented as PHP script. In September 2014 it was replaced by a giant server written in C to improve performance. The new MASTER reduces was optimized and reduces queries to the database by ~90%.

MS

MS is used by the clients to retrieve information about other online clients. The query is similar to an SQL query, with select, where and limit clauses. The reply is encrypted by a game specific secret.

At the beginning, MS was implemented as PHP, but piped the response through an encoder written in C. In January 2016, it was integrated into the MASTER server (written in C).

NATNEG

NATNEG is used to establish a connection between two players, both of whom are behind NAT. The clients only communicate with this server when they try to connect to another player.

NATNEG has been implemented in C. As it was the first C tool, it has an open second port to send special UDP packets for MS with the faked sender address of MASTER.

SAKE

SAKE is used for data exchange — files or records can be uploaded to the SAKE server. This is used for friend Mii exchange in Mario Kart Wii, along with ghosts.

SAKE has been implemented in PHP, and can send/receive ghosts and Miis, along with other games' data.

RACE

RACE is used for downloading competitions and rankings in Mario Kart Wii. RACE has been implemented in PHP, with competition support added by Leseratte (with help from Billy), which is now fully working.

GAMESTATS

GAMESTATS is for game rankings/leaderboards. There are two versions of it; HTTP and TCP. Sepalani has implemented both in Python, the former is a near-complete implementation. Games like Mario Strikers Charged and Dr. Mario Online Rx use GAMESTATS.

DLS1

DLS1 is a server for game file downloading. Wiimmfi runs a PHP version which has no files (due to copyright reasons), but a third-party DLS1 server is also ran for a lot of NDS/Wii games for their own files. This server is unused by Mario Kart Wii.

Using old profiles

For each profile, there exists a profile ID and nickname pair. Only the Wii and the server they were created on knows both of them. At login the Wii sends the nickname and the server answers with the related profile ID. If the profile ID is wrong, the game will abort the login with error code 60000.

There is only 1 way to use your old profiles with Wiimmfi: At the beginning of the project, when the old GameSpy servers were available (which shut down on July 25th, 2014), Wiimm retrieved 2.9 million pairs. If your profile was retrieved, it is possible to use your old license on Wiimmfi; otherwise, you will need to create a new friend code (Mario Kart Wii now automatically does this with the latest patch)

Details and solutions

Links

More about Wiimmfi at this Wiki
Project forum at Wii-Homebrew.com
Forums at GBATEMP.net