WiiConnect24

From WiiBrew
Jump to: navigation, search
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/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 (system updates?) 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
  • SMTP engine, for sending and receiving email
  • Real-time clock, with synchronization to a Nintendo-run server (over SSL)
  • 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
  • This feature isn't used currently: booting a title on NAND via sysmenu with the NANDBOOTINFO file attachment from certain mail, when in idle 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 using SMTP. 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 next time STM_Wakeup is called, the sysmenu is booted to boot the specified title. NANDBOOTINFO.titletype must be 8, and the argbuf is processed in some unclear way. Below are the headers needed to trigger writing the attachment to NANDBOOTINFO:

X-Wii-AppId: 0-00000001-0001
X-Wii-Cmd: 00020002

Mail headers

These Wii mail headers make the msg board or WC24 enable various GUI features and WC24 tasks. This headers can only be used with mail downloaded with WC24, not directly with E-Mail from a computer.

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 "Nintendo", 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-IconNew 524D4345 Enables the "Launch" msg board button, which launches the title specified by this header value.
X-Wii-AppID 3-48414541-3031 First field is parameter of some sort, middle field is titleid low, last field is title group id.
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 Probably some kind of CHANS parameter?

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 "private" mail: "private" mail is processed by the onrecvpm.kwb CHANS script in the title's wc24scr.vff. It's unknown what header value makes mail "private", and it's unknown if "private" mail appears on the msg board or not. Mail can probably only be processed with CHANS with mail downloaded via WC24 HTTP(S), not directly with the E-Mail engine from E-Mail from computers.

Game List

Wii games using WC24:

  1. Animal Crossing: City Folk
  2. Big Brain Academy: Wii Degree
  3. Blast Works: Build, Trade, Destroy
  4. Boom Blox
  5. Dewy's Adventure
  6. Elebits/Eledees
  7. Jissen Pachi-Slot Pachinko Hisshôhô! Hokuto no Ken Wii
  8. Mario Kart Wii
  9. Marble Saga: Kororinpa
  10. Metroid Prime 3: Corruption
  11. Metroid Prime Trilogy
  12. Pro Evolution Soccer 2008
  13. Super Smash Bros. Brawl
  14. SimCity Creator
  15. Wii Music

WiiWare games using WC24:

  1. Dr. Mario Online Rx
  2. MaBoShi: The Three Shape Arcade
  3. My Aquarium
  4. My Pokémon Ranch
  5. Strong Bad's Cool Game for Attractive People - Episode 1: Homestar Ruiner
  6. Strong Bad's Cool Game for Attractive People - Episode 2: Strong Badia the Free

Channel List

Channels using WC24:

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

WC24 Errors

These errors are stored in /shared2/wc24/nwc24dl.bin to record the errors of each download content. These errors are also displayed on-screen when software using WC24 to immediately download content fails with a WC24 error. Errors in the 117xxx range seem to be HTTP error/status codes. These errors can be general wifi errors, with the same codes as displayed in Wifi software.

Error code Notes
107243 Invalid wc24dl.vff
117404 HTTP 404 Not Found
117304 HTTP 304 Not Modified
51030 Access point not in range