Difference between revisions of "Wiimmfi"

From Custom Mario Kart
Jump to navigation Jump to search
m
(17 intermediate revisions by 6 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]] will be [http://www.nintendo.com/consumer/info/services-update.jsp discontinued on May 20, 2014.]  This impacted all DS and Wii games with online features that were directly using Nintendo WFC, which included Mario Kart Wii. [[Wiimm]] had been analysing 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 domain, the software and the data base content.
 
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 domain, the software and the data base content.
Line 14: Line 14:
 
== 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 Distribution]]s. And now many more games are available.
+
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.
  
 
→ [http://wiimmfi.de/stat?showall=1 List of all Wiimmfi games (supported, test and disabled)]
 
→ [http://wiimmfi.de/stat?showall=1 List of all Wiimmfi games (supported, test and disabled)]
  
=== Known Game Issues ===
+
The game lists contain also information about issues.
 
 
==== Mario Kart ====
 
 
 
# After registering a new friend, you see a general ◇Wiimmfi◇ Mii instead of the player's. Connecting to the player (friend room, WW, etc..) will make the real mii appear.
 
# Competitions do not work yet.
 
# Ghost data Up/Download is in beta testing, so it may sometimes work.
 
<br/>
 
{{textbox|yellow|Competitions|
 
To be able to distribute competitions on Wiimmfi, we need to collect all the competition files. 
 
These are stored in the savegame, so we need as many savegames with competitions in it as possible!
 
See here: [http://forum.wii-homebrew.com/index.php/Thread/55629-MKWii-Collecting-competition-data/ Collecting competition data]
 
}}
 
 
 
==== SSBB ====
 
 
 
# The spectator mode does not work.
 
 
 
==== Pokemon Platinum/HeartGold/SoulSilver ====
 
 
 
# The WiFi Plaza does not work as of yet.
 
 
 
==== Sonic & SEGA All-Stars Racing ====
 
 
 
# Only global races work. Friend events do not work.
 
  
 
== Game Patcher ==
 
== Game Patcher ==
Line 48: Line 24:
 
To play Wii games using the custom server, the games must be patched using the [[wiimmfi-Patcher]]. There are 3 patchers for Wii images, one for Mario Kart Wii, one for Animal Crossing Wii, and one for other games.
 
To play Wii games using the custom server, the games must be patched using the [[wiimmfi-Patcher]]. There are 3 patchers for Wii images, one for Mario Kart Wii, one for Animal Crossing Wii, and one for other games.
 
{{youtube-box|tutorial|RqFtklrXY9M|Wiimmfi Tutorial - Homebrew Channel}}
 
{{youtube-box|tutorial|RqFtklrXY9M|Wiimmfi Tutorial - Homebrew Channel}}
 
== 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 16:30 and 17:30 UTC (17:30–18:30h 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]] originally implements the server in PHP, so that server creation is fast and works. From the beginning, it was understood 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 been ported to 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.
  
 
=== NAS ===
 
=== 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, only logins are accepted with old and new profiles. New savegames send a request to get their unique console nickname from the server. This is not implemented yet.
+
[[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 ===
 
=== GPCM ===
  
If entering the WFC, the Wii connects to [[GPCM]] using TCP. The connection is closed, when leaving WFC. The server is used for general maintenance and for message exchange between the clients.  
+
If entering the WFC, the Wii connects to [[GPCM]] using TCP. The connection is closed when leaving WFC. The server is used for general maintenance and for message exchange between the clients.  
  
It is implemented as PHP script. The interprocess communication (transferring messages) is implemented with UNIX sockets. To improve the performance and to allow a better a interprocess communication, a C server was written. It is still in development and support a supervisor and workers model. Since march 2016 the new server runs at Wiimmfi test server.
+
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 a 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 ===
  
[[GPSP]] is used to retrieve information about friends. The Wii connects frequently using TCP. We used Nintendo's GPSP server to retrieve the profile_id and nick pairs before shutdown.
+
[[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.
 
On Wiimmfi, [[GPSP]] has been implemented as PHP script.
Line 79: Line 49:
 
[[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).
 
[[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 repalces by a monolithic server written in C to improve performance. The new MASTER reduces was optimized and reduces database queries about 90%.  
+
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 ===
Line 85: Line 55:
 
[[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.
 
[[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]] has been implemented as PHP, but piped the response through an encoder written in C. Since January 2016 it was integrated into the MASTER server (written in C).
+
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 ===
  
[[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]] is used to establish a connection between two players whom are both 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]].
 
[[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]].
Line 101: Line 71:
 
=== RACE ===
 
=== 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 PokeAcer), and is in private beta.
+
[[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 PokeAcer), which is now fully working.
  
 
=== GAMESTATS ===
 
=== GAMESTATS ===
Line 109: Line 79:
 
=== DLS1 ===
 
=== DLS1 ===
  
[[DLS1]] is a server for game file downloading. 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. PokemonAcer runs both a Wii one (dls1.pokeacer.tk) and a NDS one (dls2.pokeacer.tk) - the NDS one returns Mystery Gifts for Pokemon, missions for Pokemon Ranger 2, songs for Jam With The Band, books for 100 Classic Book Collection, and other games, and the Wii returns PES updates, along with SSBB updates.
+
[[DLS1]] is a server for game file downloading. 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. [[PokeAcer]] runs both a Wii one (dls1.pokeacer.tk) and a NDS one (dls2.pokeacer.tk) - the NDS one returns Mystery Gifts for Pokemon, missions for Pokemon Ranger 2, songs for Jam With The Band, books for 100 Classic Book Collection, and other games, and the Wii returns PES updates, along with SSBB updates.
  
 
== Using old profiles ==
 
== Using old profiles ==
Line 116: Line 86:
  
 
There are 3 ways to use your old profiles with Wiimmfi:
 
There are 3 ways to use your old profiles with Wiimmfi:
* At the beginning of the project, when the old gamespy servers were available (shut down on July 25th, 2014), Wiimm retrieved 2.9 millions pairs. With a little bit of luck, your profile was also retrieved.
+
* 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. Perhaps your profile was also retrieved.
 
* If you have an [http://wiimmfi.de/login account at Wiimmfi] with assigned consoles, try to connect your profile with Wiimmfi. At the [http://wiimmfi.de/status status page] you will see a list with profiles and the unknown profile is marked as ''inactive''. Press the button [set FC] and follow the instructions.
 
* If you have an [http://wiimmfi.de/login account at Wiimmfi] with assigned consoles, try to connect your profile with Wiimmfi. At the [http://wiimmfi.de/status status page] you will see a list with profiles and the unknown profile is marked as ''inactive''. Press the button [set FC] and follow the instructions.
 
* 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].
 
* 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].
  
 
== 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)
  
 
;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]
+
* [http://forum.wii-homebrew.com/index.php?page=Thread&postID=580703 Wiimmfi Project: Introduction]
 
* [http://forum.wii-homebrew.com/index.php?page=Thread&postID=592245 Wiipid extractor to dump your old friend code from the savegames]
 
* [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_(en) Wiimmfi-Page at WHB-Wiki] (english)
 +
* [http://wiiki.wii-homebrew.com/Wiimmfi Wiimmfi-Seite im WHB-Wiki] (deutsch)
  
* [http://wiiki.wii-homebrew.com/Wiimmfi_(en) Wiimmfi-Page in the WHB-Wiki]
+
;Forums at GBATEMP.net
 
+
* [http://gbatemp.net/threads/save-nintendo-wifi-a-project-to-save-online-servers-for-wii-and-ds-games.362716/ Save Nintendo WiFi]
; Other forums
+
* [http://gbatemp.net/forums/wii-nintendo-wi-fi-connection.109/ Nintendo WiFi & Wiimmfi]
* [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
 
<references/>
 
  
[[category:General Information]]
+
[[category:Wiimmfi]]
 
[[category:Software]]
 
[[category:Software]]
 
[[category:Network Protocol]]
 
[[category:Network Protocol]]

Revision as of 13:27, 15 June 2017

Wiimmfi-300.png

Nintendo announced that Nintendo Wi-Fi Connection will be discontinued on May 20, 2014. This impacted all DS and Wii games with online features that were directly using Nintendo WFC, which included Mario Kart Wii. Wiimm had been analysing 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 discontinue 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 contain also information about issues.

Game Patcher

To play Wii games using the custom server, the games must be patched using the wiimmfi-Patcher. There are 3 patchers for Wii images, one for Mario Kart Wii, one for Animal Crossing Wii, and one for other games.

Wiimmfi Tutorial - Homebrew Channel

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

If entering the WFC, the Wii connects to GPCM using TCP. The connection is closed when 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 a 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 whom are both 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 PokeAcer), which is now fully working.

GAMESTATS

GAMESTATS is for game statistics. A basic GAMESTATS server exists for most games, with a special response for certain games to allow the game to work, and a working GTS for Pokemon generations 4 and 5, implemented by mm201 (the server is shared with AltWFC, as this is allowed by mm201).

DLS1

DLS1 is a server for game file downloading. 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. PokeAcer runs both a Wii one (dls1.pokeacer.tk) and a NDS one (dls2.pokeacer.tk) - the NDS one returns Mystery Gifts for Pokemon, missions for Pokemon Ranger 2, songs for Jam With The Band, books for 100 Classic Book Collection, and other games, and the Wii returns PES updates, along with SSBB updates.

Using old profiles

For each profile, there exists a profile id and nick name pair. Only the Wii of the user and the server database knows both of them. At login the Wii sends the nick name and the server answers with the related profile id. If the profile id is wrong, the game aborts the login.

There are 3 ways 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. Perhaps your profile was also retrieved.
  • If you have an account at Wiimmfi with assigned consoles, try to connect your profile with Wiimmfi. At the status page you will see a list with profiles and the unknown profile is marked as inactive. Press the button [set FC] and follow the instructions.
  • You can download the app 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 here.

Links

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