WiiConnect24

From WiiBrew
Jump to navigation Jump to search
See also: WiiConnect24/WC24 Content
See also: Wii Mail

Introduction

Nintendo WiiConnect24 Logo

According to Nintendo,

"WiiConnect24 allows the console to receive downloads even when the
console isn't in active use, as long as it has a working connection
to the Internet."



However, this is an incomplete description, as it fails to explain why there exists a configuration option to enable WC24, but disable "Standby Connect".

WC24 is actually a codename for the /dev/net/kd driver in IOS that allows the Starlet core to perform network-related tasks when the main CPU (Broadway) is powered off. Only a small fractional of the full functionality of this software is being used -- generally to either download large chunks of data in the background or keep small amounts of data continuously updated (news, weather, friend data in games, etc.)

The kd driver is large -- about 360k -- and makes heavy use of the SSL, SO (socket) and WL / ETH (wireless / Ethernet) drivers; together, this functionality comprises about 75% of the firmware.

Static analysis reveals the following main categories of functionality:

  • Sophisticated task scheduler, including periodic wakeup of either processor for maintenance tasks, and tracking max duty cycle ("Too much wakeup executed recently. Need to wait."), probably used for thermal management
  • Mail engine, for sending and receiving email
  • Real-time clock, with synchronization to a Nintendo-run server (over SSL). When KD syncs time with this server, it converts the date header from the server and sets it to the current UTC time. Time is synced sometimes when KD_Download is executed, it is unknown what triggers time sync from KD_Download exactly. If connecting to the time server fails, KD_Download will abort, return and write a error every time until the connection succeeds.
  • Virtual Machine for running channel scripts ("CHANS"), which are apparently a variant of Javascript. This is used for handling mail meant for certain titles, like handling data sent from a game on a friend's Wii, or from announcement mail with certain headers.
  • This feature was never used by Nintendo: booting a title on NAND via sysmenu with the NANDBOOTINFO file attachment from certain mail, when in idle/"standby" mode.
  • Logging / debug capability, e.g.
13DFA93C                 DCB "This report was sent from Wii to debug your scripts.",0xD,0xA
13DFA93C                                         ; DATA XREF: NWC24WriteLogFile:off_13DB619C�o
13DFA93C                 DCB "The result summary is in the following:",0xD,0xA
13DFA93C                 DCB 0xD,0xA
13DFA93C                 DCB "- General information",0xD,0xA
13DFA93C                 DCB "    WiiConnect24 result code       : %d",0xD,0xA
13DFA93C                 DCB "    Number of committed mail       : %d",0xD,0xA
13DFA93C                 DCB "    VF archive                     : %s",0xD,0xA
13DFA93C                 DCB 0xD,0xA
13DFA93C                 DCB "- Trigger mail information",0xD,0xA
13DFA93C                 DCB "    Application ID                 : 0x%08x [%c%c%c%c]",0xD,0xA
13DFA93C                 DCB "    Group ID                       : 0x%04x [%c%c]",0xD,0xA
13DFA93C                 DCB "    Script parameter               : 0x%02x",0xD,0xA
13DFA93C                 DCB "    Time to live                   : %d",0xD,0xA
13DFA93C                 DCB "    Number of attached file        : %d",0xD,0xA
13DFA93C                 DCB 0xD,0xA
13DFA93C                 DCB "- Virtual machine specific information",0xD,0xA
13DFA93C                 DCB "    Result code of the VM          : %d [%s]",0xD,0xA
13DFA93C                 DCB "    Return value of the script     : 0x%016llx",0xD,0xA
13DFA93C                 DCB "    Last PC                        : 0x%08x",0xD,0xA
13DFA93C                 DCB "    Last line                      : %u",0xD,0xA
13DFA93C                 DCB "    Initial free work size         : %u",0xD,0xA
13DFA93C                 DCB "    Minimum free work size         : %u",0xD,0xA
13DFA93C                 DCB 0xD,0xA
13DFA93C                 DCB "For more information, please see the attached log file.",0xD,0xA
  • Friend list management

Message Board

The message board is a place where you can send and receive messages with other Wiis and email addresses. Games can also put messages here for accomplishments and the like. Channels can also send you updates and Nintendo can alert you when your firmware is ready to be updated. This is handled with the mail engine. Announcements from Nintendo and channels are downloaded with HTTP(S).

WC24 title booting

WC24 can boot titles specified in a NANDBOOTINFO E-Mail attachment. When a message is received with the correct headers, the NANDBOOTINFO attachment is written to NAND. The NANDBOOTINFO attachment is only written to NAND when the system is in idle/"standby" mode. This only works with WC24 HTTP(S) mail, not direct mail with the mail engine. WC24 title booting is normally disabled with the wakeup flag in /shared2/wc24/nwc24msg.cfg since that flag is normally zero. The next time STM_Wakeup is called, the sysmenu is booted to boot the specified title. When this is used with boot mail, STM_Wakeup is called immediately after KD_ProcessMail is executed when the boot mail was processed. Sysmenu doesn't create/init playrec.dat for title play stats with WC24 title booting. When in idle mode, KD deletes the mail from wc24recv.mbx before calling STM_Wakeup for boot mail. If the system is "on" when boot mail is processed, the NANDBOOTINFO won't be written to NAND but the mail won't be deleted. KD will keep trying to process the mail until in idle mode. Before sysmenu boots a title, it modifies NANDBOOTINFO so that it doesn't boot the same title again on next sysmenu boot. When sysmenu modifies NANDBOOTINFO before booting the tiles, it changes NANDBOOTINFO.apptype to 0x40, NANDBOOTINFO.titletype to 0x02, and the normally zero u32 between the argv offsets and the actual arguments is set to 0xFFFFFFFF. NANDBOOTINFO.titletype must be 8, and the argbuf is processed in some unclear way. The title to boot is specified the same way as regular sysmenu title booting, where argv[0] is the titleID in ASCII hex. If a title is specified that doesn't exist on NAND, sysmenu modifies NANDBOOTINFO as described above and shuts down. WC24 title booting can't be used to launch discs, only titles on NAND.

The next STM_Wakeup call timestamp is stored in /shared2/wc24/misc.bin. When boot mail is received, KD increases a timestamp stored in misc.bin by 24-hours in seconds. When KD_Download and KD_CheckMail are run in the background, this timestamp is compared the current UTC time. When boot mail was never used before this timestamp is zero. This seems to be reset to zero by sysmenu when title booting is used, however it's unknown what it checks for when clearing this. Wc24app from libwc24 SVN can install a boot mail entry, direct link here. That wc24testboot mail uses this NANDBOOTINFO attachment, this would boot HBC. The mail content for the entry that wc24app can install has the first field in the X-Wii-AppID header set to 1, so that sysmenu ignores the mail, so it doesn't break the boot mail by moving it to cdb.vff. The value of the X-Wii-Cmd must have bit 17(0x20000) set, and (value & 0x00ffffff) - 0x20001 must be <=1. Below is example headers needed to trigger writing the attachment to NANDBOOTINFO:

X-Wii-Cmd: 00020002
X-Wii-AppID: 1-AF1BF516-4842

Auto-update

Nintendo currently can't auto-update Wiis. They could auto-update with WC24 title booting if they would add code to sysmenu. WC24 title booting is normally disabled, if Nintendo would ever want to auto-update Wiis they would need to add code to sysmenu to enable WC24 title booting. This is normally disabled with sysmenu 4.1 and below, it's extremely unlikely that it was enabled in 4.2/4.3. Like direct sysmenu loading with this argument, when WC24 title booting is used with a NANDBOOTINFO with launchcode set to 1, argv[0] set to 1-2, argv[1] set to the page in this case "Update/Update_index.html", when sysmenu is booted via WC24 title booting sysmenu would boot itself, then sysmenu would load the system update confirmation screen.(Like accessing this normally, sysmenu will ask for the PIN if parental controls are enabled.) Currently sysmenu will display the screen asking to confirm if you want to update, before updating. This NANDBOOTINFO with WC24 title booting was only tested with sysmenu 3.4, but it's extremely unlikely that any of this WC24 and system update sysmenu code changed in 4.x sysmenus.

Mail headers

These Wii mail headers make the msg board or WC24 enable various GUI features and WC24 tasks. These headers can only be used with mail downloaded with WC24 via HTTP, not directly with E-Mail from a computer. X-Wii-MB headers for message board are disabled for mail received from computers via E-Mail. WC24 title booting mail can't be sent directly from an E-Mail address, KD ignores the X-Wii-Cmd and X-Wii-AppID headers.

Header Example value Notes
X-Wii-AltName AE4AaQBuAHQAZQBuAGQAbw== When used, the decoded Base64 UTF-16 is used for the sender name on the msg board.(The example value decodes to UTF-16 "Nintendo"(with zeroes from English UTF-16 removed), without the quotes.)
X-Wii-MB-NoReply 1 Hides the reply button on the msg board.
X-Wii-MB-UpdateSW 1 Enables the "Update" msg board button, which launches the system update from the sysmenu options.
X-Wii-MB-OptOut 1 Enables the "Opt Out" msg board button, which probably deletes all nwc24dl.bin entries and records for the title specified by X-Wii-AppID with type WC24_TYPE_MSGBOARD.
X-Wii-MB-RegDate ?, format "%04X" (2000/01/01 to 2035/12/31) The date this message should appear at
X-Wii-MB-Delay 1-140 When the Wii receives a message with this header, it'll delay the message for the set amount of hours.
X-Wii-IconNew 524D4345 Enables the "Start" msg board button, which boots the title specified by this header value?
X-WiiFace This is a base64 encoded Mii. After the 56th base64 ASCII character, the rest of the data is split off into a newline with a space before the data.
X-Wii-AppID 3-48414541-3031 First field is parameter of some sort, middle field is titleid low, last field is title group id. Sysmenu ignores the mail when the first field is 1. Normally type 1(first field) is used for games mail sent between Wiis so that the games can manually process the mail directly without CHANS. This type is also used with the boot mail content entry installable by wc24app, so that sysmenu doesn't interfere and break WC24 title booting by moving the mail to cdb.vff.
X-Wii-Cmd 00048001 Some cmd header that basically determines what to do this this mail. This can be 00048001 for msg board mail. Other values like 00042019 mean this mail can be processed by CHANS, the title script to use is specified by X-Wii-AppId.
X-Wii-Tag 00001000 Overwrite tag. If "From", "AppID" and this tag match, overwrite. Otherwise, it's a new message.
X-Wii-Download-Interval ? Sets the mail entry dl_freq_perday field to the value of this header, see this for the range in the section for the entry flags: /shared2/wc24/nwc24dl.bin It's unknown if this value must be hex or decimal.
X-Wii-DWCId ?, format "%08X" Profile ID (part of friend code) of the sender - used for things such as Mario Kart Wii's automatic ghost sending, etc.

CHANS Usage

The CHANS onrecv.kwb script stored in the title's wc24scr.vff under the data directory is used for processing certain mail, which have the X-Wii-Cmd header value set to 00042019. There can also be "public" mail: "public" mail is processed by the onrecvpm.kwb CHANS script in the title's wc24scr.vff. It's unknown what header value makes mail "public". "Normal" mail appears on the msg board, "public" mail doesn't appear on the msg board. For a list of functions used by CHANS, see the CHANS_Reference page. The file storage.bin in wc24scr.vff contains the mail attachment, but CHANS scripts can write to storage.bin as well as read it. The banner scripts used by sysmenu are stored under the same U8 as the other banner files, with filenames banner.cs and icon.cs.

Game List

Wii games using WC24:

  1. Band Hero
  2. Big Brain Academy: Wii Degree
  3. Blast Works: Build, Trade, Destroy
  4. Boom Blox
  5. Bonsai Barber
  6. Cake Mania: In the Mix!
  7. Calling
  8. Chess Challenge!
  9. Conduit 2
  10. Crazy Machines
  11. Dewy's Adventure
  12. Dr. Mario Online Rx/Germ Buster
  13. Elebits
  14. Excitebike: World Rally
  15. Guitar Hero 5
  16. Happy Holidays: Christmas
  17. Happy Holidays: Halloween
  18. Horse Life Adventures/2
  19. Internet Channel
  20. Kirby's Epic Yarn
  21. Liight
  22. MaBoShi's Arcade/The Three Shape Arcade
  23. Marble Saga: Kororinpa/Marbles! Balance Challenge
  24. Mario & Sonic at the Olympic Winter Games
  25. Mario Kart Wii
  26. Metroid Prime 3: Corruption
  27. Metroid Prime Trilogy
  28. Mix Superstar
  29. My Aquarium
  30. My Aquarium 2
  31. My Pokémon Ranch
  32. Our House Party!
  33. Pro Evolution Soccer 2008
  34. Pro Evolution Soccer 2009
  35. Rabbids Go Home
  36. Rock Revolution
  37. Strong Bad Episode 1: Homestar Ruiner
  38. Strong Bad Episode 2: Strong Badia - The Free
  39. Strong Bad Episode 3: Baddest of the Bands
  40. Strong Bad Episode 4: Dangeresque 3
  41. Strong Bad Episode 5: 8-bit is Enough
  42. Super Smash Bros. Brawl
  43. The Conduit
  44. UFC Personal Trainer: The Ultimate Fitness System
  45. WarioWare: D.I.Y. Showcase
  46. Wii Music

Channel List

Channels using WC24:

  1. Check Mii Out Channel
  2. Everybody Votes Channel
  3. Forecast Channel
  4. Kirby TV Channel
  5. Mario Kart Wii Channel
  6. Mii Channel
  7. News Channel
  8. Nintendo Channel
  9. Wii Room
  10. Wii Speak Channel
  11. Wii Shop Channel



WC24 Errors

Errors are displayed when content downloads from channels using WiiConnect24 fail.

TODO : complete table using list found here. (Click "List of Error Codes")

Errors while attempting to the internet
Error code Description Solution
32002 The Nintendo Wi-Fi Connection servers could be experiencing a high amount of traffic. Server is overloaded. Try again later.
32004 An error occurred during the network update-related processing. TBD
32030 The Nintendo Wi-Fi Connection servers are down for maintenance. You'll need to try your connection again later. Server is down or could not be reached. Check the internet connection or try again later
503xx Illegal internet settings Verify that the internet settings you've input are valid.
504xx You have not installed the Wii LAN Adapter properly Make sure that you have the Wii LAN Adapter setup correctly, or that you connected it with the console powered off. Make sure you are using an official Wii LAN Adapter
510xx The access point/WiFi USB Connector was not found Make sure that the WiFi USB Connector is plugged in properly or that the access point you entered in exists.
51130 Too much noise on your WLAN channel.
512xx Maximum simultanerous connections to the access point has been reached Try disconnecting a device to the access point.
513xx WLAN connection to access point failed. Check your WLAN settings on your console and your router
520xx DHCP Failed TBD. If needed, manually set your settings (static)
521xx DNS failed Check your DNS settings.
522xx The connection test failed. Check your WiFi settings and verify they are correct
524xx The Wii was unable to connect to the proxy Check your proxy settings.
525xx You entered the wrong proxy credentials.
527xx Another device is connected to the LAN with the same IP Address Check IP address of Wii and of other devices in your local area network (LAN).
540xx LAN-Adapter broken or not connected, or quality of connection is extremely poor. Check your LAN adapter or WiFi Settings. Try moving closer to your access point.
220602 There is an issue with the DNS server your Wii is receiving. Check WLAN settings and change channel.
Errors while attemping to connect to WiiConnect24
Error code Description Solution
102xx Super Smash Bros Brawl Specific error codes TBD
10300-10369 There was an error in the ghost data. TBD
20102 You were banned from WFC. TBD
20103 Your Console Identifier is broken (User ID and MAC don't match) You will have to initialize your console to regenerate a new Console Identifier.
20104 Your Console Identifier is already being used by another Wii console.
20105 Your console identifier does not exist on the console or is invalid.
20106 Your MAC Address has been used to create too many user IDs. Not much can be done unless you can spoof your MAC Address (Not guaranteed to work)
20107 The Game ID you're attempting to connect with is not supported. TBD
20108 Your Console Identifier or user account was deleted on the server. You will have to initialize your console to regenerate a new Console Identifier.
20109 Your console attempted to send an invalid Game ID. TBD
20110 Nintendo Wi-Fi Connection service for this software has been discontinued. Visit support.nintendo.com for a list of current Nintendo Wi-Fi Connection-compatible software. You'll have to connect to the services using Wiimmfi or WiiLink.
20115 Your Console Identifier is being abused. TBD
29000 Your console was unable to save your WiFi ID to the NAND because it's full. Free up storage on your console.
29001 Your console was unable to save your WiFi ID to the NAND because it's damaged. TBD
107310 Wi-Fi Error while attempting to download something TBD
109107 WiiConnect24 is being blocked by the Parental Controls that are set up on your console Make sure that your parental controls are either disabled or allow online play
109139 You have the WiiConnect24 setting turned off in the Wii Settings Go to the Wii Settings and turn on WiiConnect24

Alternatives

Since the discontinuation of the WiiConnect24 services, there have been a couple of homebrew projects that have a goal to keep WiiConnect24 alive. these services are