Difference between revisions of "Network Protocol/Server"

From Custom Mario Kart
Jump to navigation Jump to search
(Moved to the particular server pages.)
Line 1: Line 1:
 
Details about the communication with the N-servers:
 
Details about the communication with the N-servers:
 
{| class="textbox alt headline grid"
 
|+ List of Records
 
! Name !! Record ID !! Length !! n-server !! Description
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/ERROR|ERROR]] < || \error\ || ? || ?
 
| Error record sent if there was any error.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/CONNECT|CONNECT]] > || 0x0900 || 18 || 248
 
| Requesting a login challenge (while connecting to WFC).
 
|-
 
| > [[MKWii_Network_Protocol/Nintendo_servers/LOGIN_CHALLENGE|LOGIN_CHALLENGE]] || \lc\1\ || 38 || 242
 
| N-server answers with challenge.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/LOGIN|LOGIN]] > || \login\ || 365 || 242
 
| Wii solves the challenge and logs in at the WFC.
 
|-
 
| > [[MKWii_Network_Protocol/Nintendo_servers/LOGGED_IN|LOGGED_IN]] || \lc\2\ || ? || 242
 
| Server accepted solved Challenge and returns Sessionkey and User-IDs.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/LOGOUT|LOGOUT]] > || \logout\ || 32 || 242
 
| Logout from WFC.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/OTHERSLIST|OTHERSLIST]] || \otherslist\ || ? || 241
 
| Sending current friend list to N-servers and receiving an list with nicknames.
 
|-
 
| > [[MKWii_Network_Protocol/Nintendo_servers/PROFILEID|PROFILEID]] > || \pi\ || 252 || 242
 
| Sent by Nintendo if this is the first time connecting to WFC. Returns PID, UID and an signature. This is also sent after adding a new friend; then it contains user info.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/RACESTATUS|RACESTATUS]] > || localip0 || ? || 242
 
| Status packet, send each minute during connection to WFC and during online races. Contains information about number of players, own IPs and own Ports
 
|-
 
| > [[MKWii_Network_Protocol/Nintendo_servers/FRIEND|FRIEND]] || \bm\100\ || 39 + status || 242
 
| N-Server returns information about friends. One to ten friends per packet. Is also sent if friend comes online and contains his IP and (later) his Port.
 
|-
 
| > [[MKWii_Network_Protocol/Nintendo_servers/FRIENDREQUEST|FRIENDREQUEST]] || \bm\2\ || 73+ || 242
 
| N-Server sends information about a user that has added the current user's friend code.
 
|-
 
| > [[MKWii_Network_Protocol/Nintendo_servers/FRIENDREGISTER|FRIENDREGISTER]] || \bm\4\ || 73+ || 242
 
| Tell the N-Server that you registered a friend code.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/GETPROFILE|GETPROFILE]] > || \getprofile\ || 62 || 242
 
| Wii asks for the profile of a friend.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/UPDATEPRO|UPDATEPRO]] > || \updatepro\ || 85 || 242
 
| This is prefixed by [[MKWii_Network_Protocol/Nintendo_servers/GETPROFILE|GETPROFILE]].
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/AUTHADD|AUTHADD]] > || \authadd\ || 95 || 242
 
| This is a prefix record for [[MKWii_Network_Protocol/Nintendo_servers/ADDBUDDY|ADDBUDDY]]
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/ADDBUDDY|ADDBUDDY]] > || \addbuddy\ || x * 65 || 242
 
| ?
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/DELBUDDY|DELBUDDY]] > || \delbuddy\ || 58+ || 242
 
| Remove someone from friend list.
 
|-
 
| KEEPALIVE > || \ka\ || 11 || 242
 
| Status packet send each 2 minutes
 
|-
 
| ? > || mariokartwii || 159 || 247
 
| Unknown Record containing PID (profile id) and a few keywords.
 
|-
 
| > ? || \bm\1\ || ? || 242
 
| Friend-Record with crypted message.
 
|-
 
| [[MKWii_Network_Protocol/Nintendo_servers/STATUS|STATUS]] > || \status\ || ? || 242
 
| ?
 
|-
 
| > LOGINTICKET || \lt\ || 35 || 242
 
| Sent each 4 minutes. ?
 
|}
 
  
 
This protocol is also used by the other Wii games and DS/DSi Games, only the gamename in some records changes.
 
This protocol is also used by the other Wii games and DS/DSi Games, only the gamename in some records changes.

Revision as of 14:50, 10 March 2014

Details about the communication with the N-servers:

This protocol is also used by the other Wii games and DS/DSi Games, only the gamename in some records changes.

While logging in, there is an SSL communication with naswii.nintendowifi.net.

There is base64 encoded information:

LOGIN (Wii to Nintendo):

action=login
gsbrcd=RMCJ2leohni	Any nickname?
userid=1786673827498	Any ID, but not the friend code or profile / user id
ingamesn= n o   n a m e	Any nickname / Mii name?
sdkver=001000		Always binary "8" for MKWii
gamecd=RMCE		ID4 of Game
makercd=01		last two digits of ID6
unitcd=1		?
macadr=0017ab2923be	The MAC-Adress of the Wii
lang=01			Maybe a language code ?
devtime=140228160425	Unix timestamp of wii time
csnum=LU519608598	Wii S/N
cfc=7615213554627182	Any code, maybe wii friend code
region=01		Any region identifier

ACCTCREATE (Wii to Nintendo)

action=acctcreate
sdkver=001000		Always binary "8" for MKWii
gamecd=RMCP		ID4 of Game
makercd=01		last two digits of ID6
unitcd=1		?
macadr=0017ab2923be	The Wiis MAC-Adress
lang=02			Maybe a language code ?
devtime=140304203139	Unix timestamp of wii time
csnum=LE632014481	Wii S/N
cfc=7615213554627182	Any code, maybe wii friend code
region=02		Any region identifier

Nintendo to Wii:

challenge=687TF0EG	Any challenge
locator=gamespy.com	?
retry=0			count of retries
returncd=00		?
token=...		Same token as during LOGIN
datetime=20140228210452	Server date/time in format YYYYMMDDhhmmss

The values "macadr" and "cfc" are the same in both dumps, but maybe this is a fault of dolphin.