<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sorunome</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sorunome"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/Sorunome"/>
	<updated>2026-04-14T12:25:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=StreetPass&amp;diff=23386</id>
		<title>StreetPass</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=StreetPass&amp;diff=23386"/>
		<updated>2025-03-17T11:39:13Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* StreetPass Services */ fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;StreetPass&#039;&#039;&#039; is a feature that allows your 3DS to connect with other 3DS consoles using WiFi in standby mode.&lt;br /&gt;
It can be used to share Mii(s) on Mii Plaza for example. Applications&#039; StreetPass data are stored in the CECD module&#039;s NAND savegame, applications can move received StreetPass data to an arbitrary savegame. Wifi infrastructure with APs are used to communicate where the data-frames are encrypted with WPA2 CCMP, like [[NWM_Services|UDS]]/[[Download Play]].&lt;br /&gt;
&lt;br /&gt;
== WiFi Probe Request Frame ==&lt;br /&gt;
&lt;br /&gt;
Whenever the 3DS is woken from sleep (or turned on), and WiFi is enabled, it sends out a 802.11 Probe Request which include all saved access points, as well a probe to an SSID containing an arbitrary string of data, such as &amp;quot;ic[kSvm9s@*cYD&amp;gt;/~IEVj\(fGG;qDo8j&amp;quot;. This string changes at least daily, and most likely every time the device is woken up.&lt;br /&gt;
&lt;br /&gt;
The MAC address used for these probes is the static MAC address found in the System Settings application. Unlike the StreetPass MAC address, it will not change over time. This MAC address OUI also differs from the one used in StreetPass.&lt;br /&gt;
&lt;br /&gt;
== CCMP Key ==&lt;br /&gt;
The StreetPass local-WLAN CCMP data-encryption key is generated by the StreetPass CECD module, where the CCMP key is the 16-byte output from encrypting an all-zero block with AES-CTR via [[PS:EncryptDecryptAes]], with keytype6. The CTR is the first 0x10-bytes from a SHA1-HMAC hash. The SHA1-HMAC key is a 17-byte text string including the NULL-terminator, a seperate HMAC key is used for retail/dev-units, this is determined via [[Configuration_Memory#ENVINFO|ENVINFO]] bit0. The data hashed with SHA1-HMAC is a 0x1C-byte buffer, which is described below.&lt;br /&gt;
&lt;br /&gt;
=== Hash Block ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8-byte StreetPass consoleID for the host, from the probe frames.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8-byte StreetPass consoleID for the client, from the probe frames.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x6&lt;br /&gt;
| MAC address for host.&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| 0x6&lt;br /&gt;
| MAC address for client.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== StreetPass Exchange ==&lt;br /&gt;
&lt;br /&gt;
While StreetPass is enabled, the 3DS constantly sends out Probe Requests with an SSID of &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;. Unlike beacons, which are actively advertising the device&#039;s presence, the 3DS is essentially actively looking for other 3DSes. This design is likely to limit impact to non-3DS WiFi capable devices. Each Probe Request contains basic information about that 3DS, including an identifier, and active StreetPass services. If another 3DS is in range, the second 3DS (#2) will respond with a Probe Response, to which the original 3DS (#1), and of the receiving device with every frame thereafter, will respond with an 802.11 Acknowledgement. 3DS(#1) then sends an 802.11 Action frame, as well as an additional Probe Request. The second 3DS sends back another Probe Response that begins the encrypted exchange between the two devices, no authentication/association is done here.&lt;br /&gt;
&lt;br /&gt;
The MAC address used in sleep-mode seems to change every time there&#039;s a StreetPass hit, as well as the last 8-bytes(StreetPass consoleID) of the Nintendo tag data. The MAC address + 8-byte StreetPass consoleID is seen to change every time the user enters and exits and Settings application if they have not had a StreetPass in an observed time period of 24 hours. It is uncertain how the 3DS determines when it can do a StreetPass again with another 3DS, or what information is actually used to track that. It may be related to how long that 3DS was in range constantly/out of range. 3DSes that are constantly in range of each other in sleep-mode, usually do StreetPass every 11 hours.&lt;br /&gt;
&lt;br /&gt;
=== Probe Request Frame ===&lt;br /&gt;
&lt;br /&gt;
Using Wireshark tool with a WiFi card in monitor mode allow you to see the data used to scan for other 3DS in the range. The below is a broadcast probe request from an 3DS while in standby mode, with SSID &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;. This SSID remains consistent across all 3DS units. This frame also contains a custom variable length Nintendo tag, which contains information regarding the offered StreetPass services. The sequence numbers for these probe request increment by 3 for every probe, until another 3DS responds with a probe response.&lt;br /&gt;
&lt;br /&gt;
  0000   00 00 1a 00 2f 48 00 00 19 7d 19 de 2a 00 00 00  ..../H...}..*...&lt;br /&gt;
  0010   12 16 9e 09 a0 00 c9 02 00 00 40 00 00 00 ff ff  ..........@.....&lt;br /&gt;
  0020   ff ff ff ff da 6b f7 22 f3 77 ff ff ff ff ff ff  .....k.&amp;quot;.w......&lt;br /&gt;
  0030   40 77 00 20 4e 69 6e 74 65 6e 64 6f 5f 33 44 53  @w. Nintendo_3DS&lt;br /&gt;
  0040   5f 63 6f 6e 74 69 6e 75 6f 75 73 5f 73 63 61 6e  _continuous_scan&lt;br /&gt;
  0050   5f 30 30 30 01 08 82 84 8b 0c 12 96 18 24 32 04  _000.........$2.&lt;br /&gt;
  0060   30 48 60 6c dd 15 00 1f 32 01 11 05 00 02 08 00  0H`l....2.......&lt;br /&gt;
  0070   00 f0 08 c8 34 6e 05 0f c9 c6 80 5b 6f bc 5a     ....4n.....[o.Z&lt;br /&gt;
&lt;br /&gt;
==== Nintendo Tag Format ====&lt;br /&gt;
&lt;br /&gt;
The offsets, in bytes, mentioned in the table below start at the beginning of the Nintendo tag ID, which is variable in length, and can be found right after the Vendor Specific OUI type of the 802.11 frame, which is often seen as a byte of &amp;quot;01&amp;quot;. Each one of the elements are discussed in more detail after the table. Note that this table represents a current theory on what each of the fields represent, with the argument stated in the corresponding sections.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Length&lt;br /&gt;
!  Purpose&lt;br /&gt;
!  Description&lt;br /&gt;
!  Example&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x01&lt;br /&gt;
|  &#039;&#039;&#039;Protocol Identification&#039;&#039;&#039;&lt;br /&gt;
|  May be for protocol identification. All captures thus far show this value at 17, hexadecimal 11.&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
|  0x01&lt;br /&gt;
|  0x01&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass Service Length&#039;&#039;&#039;&lt;br /&gt;
|  Length in bytes of only the StreetPass Services field.&lt;br /&gt;
|  05&lt;br /&gt;
|-&lt;br /&gt;
|  0x02&lt;br /&gt;
|  0x05&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass Services&#039;&#039;&#039;&lt;br /&gt;
|  Starting at the 0x02 offset, it appears to be a list of StreetPass services, each in length of 5 bytes. This continues on depending on the number of services the user has enabled at the time.&lt;br /&gt;
|  00 02 08 00 00&lt;br /&gt;
|-&lt;br /&gt;
|  varies&lt;br /&gt;
|  0x02&lt;br /&gt;
|  &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|  At the end of the StreetPass Services field is a two byte field that is the same among all devices thus far. Its purpose is unknown.&lt;br /&gt;
|  f0 08&lt;br /&gt;
|-&lt;br /&gt;
|  -0x08&lt;br /&gt;
|  0x08&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass consoleID&#039;&#039;&#039;&lt;br /&gt;
|  Seen to change when the Settings app is used if there has not been a StreetPass tag recently. Also may change after each StreetPass hit and system power-off?&lt;br /&gt;
|  c8 34 6e 05 0f c9 c6 80&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Protocol Version =====&lt;br /&gt;
&lt;br /&gt;
Appears to represent a protocol version, or device identification. This field remains consistent on all devices, despite variable enabled StreetPass services or length of the tag. Could also represent region.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass Service Length =====&lt;br /&gt;
&lt;br /&gt;
This field is used to indicate the length of the StreetPass Services field. Removing and adding services has shown this field to increment and decrement in 5 bytes, or 11 bytes depending on the game. The StreetPass Services field has then expanded or reduced accordingly.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass Services =====&lt;br /&gt;
&lt;br /&gt;
The third field in the protocol header appears to be an arbitrary length list of StreetPass services enabled on the device. Each StreetPass service seems to be identified by a 5-byte ID. If you enable or disable services, the number of 5-byte IDs grows and shrinks within this list. Observed service IDs include:&lt;br /&gt;
&lt;br /&gt;
  Mii Plaza: 00 02 08 00 00&lt;br /&gt;
  Ridge Racer: 00 03 58 00 30&lt;br /&gt;
  Sims 3: 00 03 65 00 30&lt;br /&gt;
  Street Fighter: 00 03 05 00 02 (FF FF FF FF FF FF)&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes are the titleID of the service, the last byte seems to contain flags.&lt;br /&gt;
&lt;br /&gt;
The last byte (flags) have been observed between those possibilities :&lt;br /&gt;
&lt;br /&gt;
  00000000&lt;br /&gt;
  00000010&lt;br /&gt;
  00010000&lt;br /&gt;
  00100000&lt;br /&gt;
  00110000&lt;br /&gt;
  00110010&lt;br /&gt;
&lt;br /&gt;
Only the bits 2,5,6 were used.&lt;br /&gt;
When set, the bit n°2 indicates the presence of a following 6-byte field filled with 0xff.&lt;br /&gt;
&lt;br /&gt;
Some services have a 6-byte field succeeding the StreetPass service that is just FF bytes (e.g. FF FF FF FF FF FF). The purpose of these is unknown, although may be used as data for a service, or as separator of some sort for different types of StreetPass services.&lt;br /&gt;
&lt;br /&gt;
Observed services (leading titleID 0x00 removed, 6*0xff ignored) on 68K probe requests between 2013-08-24 and 2014-06-29 in various european locations.&lt;br /&gt;
&lt;br /&gt;
The fact that a same titleID can have different flags should be noted.&lt;br /&gt;
&lt;br /&gt;
  0db6-00100000 5&lt;br /&gt;
  0db6-00110000 20&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Occurrences&lt;br /&gt;
!  TitleID &lt;br /&gt;
!  Flags&lt;br /&gt;
|-&lt;br /&gt;
| 131&lt;br /&gt;
| 0208&lt;br /&gt;
| 00000000&lt;br /&gt;
|-&lt;br /&gt;
| 58&lt;br /&gt;
| 0516&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 56&lt;br /&gt;
| 053f&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| 0306&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 44&lt;br /&gt;
| 0862&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| 09f1&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| 0db6&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 0516&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 0205&lt;br /&gt;
| 00110010&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 0ec4&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 0300&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 055d&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 08d3&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 053b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0916&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0306&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0300&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0916&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0b1d&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0ec4&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 080f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 07c8&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 038a&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0f30&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0db6&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0910&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0862&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 053f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0522&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0ae2&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 09f1&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 08c5&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 038c&lt;br /&gt;
| 00000000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 033b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 030b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0ba9&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0a53&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 08d3&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0751&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0402&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0f82&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0f5b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0e7f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0bff&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0b1d&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0ad6&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0a90&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0a05&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 073c&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 06da&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 05aa&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 05a5&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 053b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 04ca&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 038a&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 033b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 030b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0305&lt;br /&gt;
| 00000010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Unknown 2-byte Field =====&lt;br /&gt;
&lt;br /&gt;
The purpose of this field is not known yet. It has remained the same across all devices thus far. The value has always been observed as &#039;&#039;&#039;f008&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass consoleID =====&lt;br /&gt;
&lt;br /&gt;
When there&#039;s a StreetPass hit, and no StreetPass data changed on either of the 3DSes, no data is transferred besides probes? After turning off power, then powering on and entering sleepmode, the MAC doesn&#039;t change from prior to power off but the last 8-bytes of the Nintendo tag changes. This tag has been seen to not be sequential over time. After one of the new StreetPass content is handled, (running one of the StreetPass titles etc) this 8-byte StreetPass consoleID changes?&lt;br /&gt;
&lt;br /&gt;
=== Initial Probe Response Frame ===&lt;br /&gt;
&lt;br /&gt;
If a 3DS (#2) receives another device&#039;s probe request and has not yet tagged that device in an arbitrary amount of time (~12 hours), the receiving 3DS (#2) will respond with a Probe Response frame. The destination MAC address is the StreetPass MAC address of the 3DS (#1) that was transmitting the probe request, while the receiving device sets its StreetPass MAC address as the source address. This is important to note because further exchanges may cease using destination and/or source addresses.&lt;br /&gt;
&lt;br /&gt;
In the probe response, the 3DS (#2) appears to offer a channel of 1, 6, or 11. Different channels have been seen offered between the same set of 3DS for each StreetPass. Offered channels, and channel range most likely varies by region.&lt;br /&gt;
&lt;br /&gt;
The StreetPass Probe Response frame contains the same Nintendo tag in Probe Requests of the device that is transmitting the Probe Response frame.&lt;br /&gt;
&lt;br /&gt;
=== Subsequent Probe Request and Response Frames ===&lt;br /&gt;
&lt;br /&gt;
The 3DS (#1) that the Initial Probe Response is directed to will send an 802.11 Action frame back to the device. The sequence numbers at this point stop stepping up by 3, and instead increase by one based from each originating device&#039;s SN. It will then send another Probe Request, this time sent directly to the responding 3DS (#2) by specifying its MAC address in the destination field, and setting its own MAC address in the source address field. It also does not have a SSID specified in the frame, except the frame will contain a BSSID with the value of the 3DS (#2) that responded to the initial Probe, and thus acts as the master in the 802.11 exchange.&lt;br /&gt;
&lt;br /&gt;
=== Send Mode ===&lt;br /&gt;
The 3DS can mark StreetPass data with one of 4 Send Modes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!ID!!Send Mode!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0||EXCHANGE||StreetPass message exchange will only happen if both consoles can store the message of the other. E.g. the inbox isn&#039;t full. Example title: StreetPass Mii Plaza&lt;br /&gt;
|-&lt;br /&gt;
|1||RECV_ONLY||3DS doesn&#039;t have anything in its outbox so it is only receiving messages.&lt;br /&gt;
|-&lt;br /&gt;
|2||SEND_ONLY||&lt;br /&gt;
|-&lt;br /&gt;
|3||SEND_RECV||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== StreetPass Spoofing ==&lt;br /&gt;
&lt;br /&gt;
A streetpass &amp;quot;AP&amp;quot; was spoofed with hostapd by setting the SSID to &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;, with the extra Nintendo tag from another 3DS&#039; probe request. Like 3DS&amp;lt;&amp;gt;3DS communications, the 3DS didn&#039;t authenticate or associate with the host. Streetpass communications use CCMP encryption. Eventually the 3DS stops communicating with the host since the host doesn&#039;t reply to any of the data frames, then sends a 802.11 &amp;quot;Action&amp;quot; frame, with category ID 0x7f and Nintendo&#039;s vendor ID: 00 1f 32.(However the 3DS keeps communicating with the above process repeatedly)&lt;br /&gt;
Communication with two 3DSes are the same as above except there&#039;s actual encrypted data sent to/from both consoles, unlike the fake host.&lt;br /&gt;
&lt;br /&gt;
==StreetPass Relay==&lt;br /&gt;
This feature was implemented in version [[6.2.0-12]].&lt;br /&gt;
&lt;br /&gt;
It was probably controlled over the [[SpotPass#policylist]]. When connecting to a Nintendo Zone Hotspot the console will send an additional GET parameter named &#039;&#039;ap&#039;&#039;. Adding the following priority to the policylist will instruct the console to upload its data (The level tag can probably be lower and must not be HIGH).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;Priority&amp;gt;&lt;br /&gt;
    &amp;lt;TitleId&amp;gt;0004013000003400&amp;lt;/TitleId&amp;gt;&lt;br /&gt;
    &amp;lt;TaskId&amp;gt;sprelay&amp;lt;/TaskId&amp;gt;&lt;br /&gt;
    &amp;lt;Level&amp;gt;HIGH&amp;lt;/Level&amp;gt;&lt;br /&gt;
    &amp;lt;Persistent&amp;gt;false&amp;lt;/Persistent&amp;gt;&lt;br /&gt;
    &amp;lt;Revive&amp;gt;false&amp;lt;/Revive&amp;gt;&lt;br /&gt;
  &amp;lt;/Priority&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
The following additional headers will be send in the request:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
|X-Boss-Apinfo||Access Point Info. The same number that is send with the policylist GET parameter ap. Probably identifies the SSID of connected Nintendo Zone Hotspot. If not connected to Nintendo Zone Hotspot this will be an empty string.||02012600000&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Bssid||The MAC address of the access point the 3DS is connected to.||11:22:33:44:55:66&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Country||2 letter country code of the set language.||ES&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Region||3 letter region code of the 3DS&#039; region.||EUR&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Userid||A unique 16 character long hexadecimal string that represents a 64-bit integer. It is unknown how this number is generated.||6966442DE2EED063&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the request body there will be a file named &#039;&#039;spr-meta&#039;&#039; and a file per registered StreetPass game &#039;&#039;spr-slotXX&#039;&#039; where XX is an incrementing number. If the game contains not messages in its outbox so the size of the file would be 0 then no file is created and sent but it will still be listed in the spr-meta file.&lt;br /&gt;
&lt;br /&gt;
===spr-meta file===&lt;br /&gt;
The spr-meta file is a text file which may contain the following content.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
slotsize: 5&lt;br /&gt;
spr-slot01: 3,000EC400,10664&lt;br /&gt;
spr-slot02: 2,0007AD00,3648&lt;br /&gt;
spr-slot03: 3,00030000,3804&lt;br /&gt;
spr-slot04: 1,00051600,0&lt;br /&gt;
spr-slot05: 0,00020800,28228&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The comma seperated list after each spr-slotXX has the following meaning&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
|Send Mode||StreetPass ID (Low title ID of the game. May be from a different region like japan.)||Size of the file in bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===spr-slotXX files===&lt;br /&gt;
These are binary files. They begin a with a header with the follwing structure.&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
!Offset!!Size!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||0x04||Magic number 0x00006161&lt;br /&gt;
|-&lt;br /&gt;
|0x04||0x04||Size of the file in bytes including this header&lt;br /&gt;
|-&lt;br /&gt;
|0x08||0x04||StreetPass ID (Low title ID of the game. May be from a different region like japan.)&lt;br /&gt;
|-&lt;br /&gt;
|0x0C||0x04||Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x10||0x04||Number of messages after this header&lt;br /&gt;
|}&lt;br /&gt;
After the header follows the StreetPass message exactly as it is stored in the outbox of [[CECD_Savegame#File_.3C12-char_ID.3E|CEC Save]].&lt;br /&gt;
&lt;br /&gt;
===Response===&lt;br /&gt;
The following headers are expected:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
!Key!!colspan=3|Value!!Example&lt;br /&gt;
|-&lt;br /&gt;
|X-Spr-SlotXX-Result||StreetPass ID||Send Mode||Size of the file in bytes||X-Spr-Slot01-Result: 000EC400,3,17760&lt;br /&gt;
|}&lt;br /&gt;
It expects a header for every game it sent in the request.&lt;br /&gt;
&lt;br /&gt;
The body is expected to contain binary data with the same structure as the spr-slotXX files in the request. The order of these must be the same as the reponse header order.&lt;br /&gt;
&lt;br /&gt;
== Structs, Data Types ==&lt;br /&gt;
Streetpass uses multiple different structs and data types for storing and transporting data.&lt;br /&gt;
&lt;br /&gt;
=== MessageId ===&lt;br /&gt;
This datatype holds a per-console-per-title unique message id.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| The message id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Timestamp12 ===&lt;br /&gt;
This holds a timestamp in 12 bytes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Year&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Month&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Day&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Weekday&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Hour&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Minute&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Second&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| Millisecond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Message (0x6060) ===&lt;br /&gt;
MessageHeader:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6060 (&amp;lt;code&amp;gt;``&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| Padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_size&lt;br /&gt;
| The size in bytes of the entire message, including all headers and hmac&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| total_header_size&lt;br /&gt;
| The size in bytes of all headers, including the extra headers&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| body_size&lt;br /&gt;
| The size in bytes of the body of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id2&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| batch_id&lt;br /&gt;
| The sending client sets an ID here if multiple messages should be batched together into one transaction&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| transfer_id&lt;br /&gt;
| All messages from the same transfer (That is, sending the messages) contain the same transfer id&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x08&lt;br /&gt;
| MessageId&lt;br /&gt;
| message_id&lt;br /&gt;
| The ID of the sending message&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_version&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x08&lt;br /&gt;
| MessageId&lt;br /&gt;
| message_id_2&lt;br /&gt;
| The message ID that this message is referring to, e.g. the individual responses in Streetpass Mii Plaza&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| recipients&lt;br /&gt;
| bitfield: 0x01: everyone; 0x02: friends&lt;br /&gt;
|-&lt;br /&gt;
| 0x35&lt;br /&gt;
| 0x01&lt;br /&gt;
| SendMethod&lt;br /&gt;
| send_method&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x36&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| unopened&lt;br /&gt;
| Set if the message hasn&#039;t been opened yet&lt;br /&gt;
|-&lt;br /&gt;
| 0x37&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| is_new&lt;br /&gt;
| Set if the message is new&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x08&lt;br /&gt;
| u64&lt;br /&gt;
| sender_id&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x08&lt;br /&gt;
| u64&lt;br /&gt;
| sender_id_2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| sent&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| received&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| created&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| send_count&lt;br /&gt;
| How often this message can be sent&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| forward_count&lt;br /&gt;
| How often this message can be forwarded&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| user_data&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
ExtMessageHeader:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| type&lt;br /&gt;
| The type of the extra header&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| size&lt;br /&gt;
| Size, in bytes, of the extra header&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| body&lt;br /&gt;
| The body of the extra header&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Message:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x70&lt;br /&gt;
| MessageHeader&lt;br /&gt;
| header&lt;br /&gt;
| The header of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
|&lt;br /&gt;
| ExtMessageHeader[]&lt;br /&gt;
| ext_headers&lt;br /&gt;
| An array of the extra headers for the message. The array keeps filling until the length no more until &amp;lt;code&amp;gt;header.total_header_size&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| body&lt;br /&gt;
| The actual body/payload of the message&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 0x20&lt;br /&gt;
| u8[0x20]&lt;br /&gt;
| hmac&lt;br /&gt;
| The hmac over the body with the hmac_key&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Slot (0x6161) ===&lt;br /&gt;
The slot groups multiple messages of one title id together into a single struct&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6161 (&amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| size&lt;br /&gt;
| The size of bytes of the entire slot, including the header and all messages it contains&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| batch_id&lt;br /&gt;
| If the slot contains batched messages, the batch id is set to the same one as those messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_count&lt;br /&gt;
| The total number of messages in this slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
| Message[]&lt;br /&gt;
| messages&lt;br /&gt;
| An array of length &amp;lt;code&amp;gt;message_count&amp;lt;/code&amp;gt; all the messages of this slot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoxInfo (0x6262) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6262 (&amp;lt;code&amp;gt;bb&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| file_size&lt;br /&gt;
| The size of the box info in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_box_size&lt;br /&gt;
| The maximum allowed size of the box in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| box_size&lt;br /&gt;
| The current size of the box in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_num_messages&lt;br /&gt;
| The maximum number of messages that the box can hold&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_messages&lt;br /&gt;
| The current number of messages in the box&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_batch_size&lt;br /&gt;
| The maximum size of a bach, in number of messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_message_size&lt;br /&gt;
| The maximum size of a message, in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
|&lt;br /&gt;
| MessageHeader[]&lt;br /&gt;
| message_headers&lt;br /&gt;
| An array of all message headers in this box of length &amp;lt;code&amp;gt;num_messages&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MBoxInfo (0x6363) ===&lt;br /&gt;
This holds information on the message box, including both inbox and outbox&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6363 (&amp;lt;code&amp;gt;cc&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id for this mbox&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| private_id&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| mbox_type_flags&lt;br /&gt;
| 0x01: normal programs, 0x06: system programs, 0x80: silent notif&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| enabled&lt;br /&gt;
| Weather this message box is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x20&lt;br /&gt;
| u8[0x20]&lt;br /&gt;
| hmac_key&lt;br /&gt;
| The hmac key to make hmacs for messages. These are unique per title, however they are the same for all consoles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| last_accessed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unread&lt;br /&gt;
| Does this message box contain unread messages?&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_new&lt;br /&gt;
| Does this message box contain new messages?&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unknown&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unknown&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| last_received&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| unknown_timestamp&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 0x6565 ===&lt;br /&gt;
SlotMetadata:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| SendMethod&lt;br /&gt;
| send_method&lt;br /&gt;
| The send method for the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| body_size&lt;br /&gt;
| The size of the slot body in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| count&lt;br /&gt;
| Number of messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x14&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Struct:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6565 (&amp;lt;code&amp;gt;ee&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x28&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x360&lt;br /&gt;
| SlotMetadata[0x18]&lt;br /&gt;
| slots&lt;br /&gt;
| Metadata of all slots&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OBIndex (0x6767) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6767 (&amp;lt;code&amp;gt;gg&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_messages&lt;br /&gt;
| The number of messages in the outbox&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
|&lt;br /&gt;
| MessageId[]&lt;br /&gt;
| message_ids&lt;br /&gt;
| An array of the message IDs in the outbox, of length &amp;lt;code&amp;gt;num_messages&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MBoxList (0x6868) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6868 (&amp;lt;code&amp;gt;hh&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| version&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_boxes&lt;br /&gt;
| The number of boxes (= games with streetpass enabled)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x180&lt;br /&gt;
| char[0x18][0x10]&lt;br /&gt;
| box_names&lt;br /&gt;
| A 0x18-long array of all the box names (= hex encoded title ids) of games with streetpass enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Nintendo Software]]&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=StreetPass&amp;diff=23384</id>
		<title>StreetPass</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=StreetPass&amp;diff=23384"/>
		<updated>2025-03-17T11:16:26Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Message (0x6060) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;StreetPass&#039;&#039;&#039; is a feature that allows your 3DS to connect with other 3DS consoles using WiFi in standby mode.&lt;br /&gt;
It can be used to share Mii(s) on Mii Plaza for example. Applications&#039; StreetPass data are stored in the CECD module&#039;s NAND savegame, applications can move received StreetPass data to an arbitrary savegame. Wifi infrastructure with APs are used to communicate where the data-frames are encrypted with WPA2 CCMP, like [[NWM_Services|UDS]]/[[Download Play]].&lt;br /&gt;
&lt;br /&gt;
== WiFi Probe Request Frame ==&lt;br /&gt;
&lt;br /&gt;
Whenever the 3DS is woken from sleep (or turned on), and WiFi is enabled, it sends out a 802.11 Probe Request which include all saved access points, as well a probe to an SSID containing an arbitrary string of data, such as &amp;quot;ic[kSvm9s@*cYD&amp;gt;/~IEVj\(fGG;qDo8j&amp;quot;. This string changes at least daily, and most likely every time the device is woken up.&lt;br /&gt;
&lt;br /&gt;
The MAC address used for these probes is the static MAC address found in the System Settings application. Unlike the StreetPass MAC address, it will not change over time. This MAC address OUI also differs from the one used in StreetPass.&lt;br /&gt;
&lt;br /&gt;
== CCMP Key ==&lt;br /&gt;
The StreetPass local-WLAN CCMP data-encryption key is generated by the StreetPass CECD module, where the CCMP key is the 16-byte output from encrypting an all-zero block with AES-CTR via [[PS:EncryptDecryptAes]], with keytype6. The CTR is the first 0x10-bytes from a SHA1-HMAC hash. The SHA1-HMAC key is a 17-byte text string including the NULL-terminator, a seperate HMAC key is used for retail/dev-units, this is determined via [[Configuration_Memory#ENVINFO|ENVINFO]] bit0. The data hashed with SHA1-HMAC is a 0x1C-byte buffer, which is described below.&lt;br /&gt;
&lt;br /&gt;
=== Hash Block ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8-byte StreetPass consoleID for the host, from the probe frames.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8-byte StreetPass consoleID for the client, from the probe frames.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x6&lt;br /&gt;
| MAC address for host.&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| 0x6&lt;br /&gt;
| MAC address for client.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== StreetPass Exchange ==&lt;br /&gt;
&lt;br /&gt;
While StreetPass is enabled, the 3DS constantly sends out Probe Requests with an SSID of &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;. Unlike beacons, which are actively advertising the device&#039;s presence, the 3DS is essentially actively looking for other 3DSes. This design is likely to limit impact to non-3DS WiFi capable devices. Each Probe Request contains basic information about that 3DS, including an identifier, and active StreetPass services. If another 3DS is in range, the second 3DS (#2) will respond with a Probe Response, to which the original 3DS (#1), and of the receiving device with every frame thereafter, will respond with an 802.11 Acknowledgement. 3DS(#1) then sends an 802.11 Action frame, as well as an additional Probe Request. The second 3DS sends back another Probe Response that begins the encrypted exchange between the two devices, no authentication/association is done here.&lt;br /&gt;
&lt;br /&gt;
The MAC address used in sleep-mode seems to change every time there&#039;s a StreetPass hit, as well as the last 8-bytes(StreetPass consoleID) of the Nintendo tag data. The MAC address + 8-byte StreetPass consoleID is seen to change every time the user enters and exits and Settings application if they have not had a StreetPass in an observed time period of 24 hours. It is uncertain how the 3DS determines when it can do a StreetPass again with another 3DS, or what information is actually used to track that. It may be related to how long that 3DS was in range constantly/out of range. 3DSes that are constantly in range of each other in sleep-mode, usually do StreetPass every 11 hours.&lt;br /&gt;
&lt;br /&gt;
=== Probe Request Frame ===&lt;br /&gt;
&lt;br /&gt;
Using Wireshark tool with a WiFi card in monitor mode allow you to see the data used to scan for other 3DS in the range. The below is a broadcast probe request from an 3DS while in standby mode, with SSID &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;. This SSID remains consistent across all 3DS units. This frame also contains a custom variable length Nintendo tag, which contains information regarding the offered StreetPass services. The sequence numbers for these probe request increment by 3 for every probe, until another 3DS responds with a probe response.&lt;br /&gt;
&lt;br /&gt;
  0000   00 00 1a 00 2f 48 00 00 19 7d 19 de 2a 00 00 00  ..../H...}..*...&lt;br /&gt;
  0010   12 16 9e 09 a0 00 c9 02 00 00 40 00 00 00 ff ff  ..........@.....&lt;br /&gt;
  0020   ff ff ff ff da 6b f7 22 f3 77 ff ff ff ff ff ff  .....k.&amp;quot;.w......&lt;br /&gt;
  0030   40 77 00 20 4e 69 6e 74 65 6e 64 6f 5f 33 44 53  @w. Nintendo_3DS&lt;br /&gt;
  0040   5f 63 6f 6e 74 69 6e 75 6f 75 73 5f 73 63 61 6e  _continuous_scan&lt;br /&gt;
  0050   5f 30 30 30 01 08 82 84 8b 0c 12 96 18 24 32 04  _000.........$2.&lt;br /&gt;
  0060   30 48 60 6c dd 15 00 1f 32 01 11 05 00 02 08 00  0H`l....2.......&lt;br /&gt;
  0070   00 f0 08 c8 34 6e 05 0f c9 c6 80 5b 6f bc 5a     ....4n.....[o.Z&lt;br /&gt;
&lt;br /&gt;
==== Nintendo Tag Format ====&lt;br /&gt;
&lt;br /&gt;
The offsets, in bytes, mentioned in the table below start at the beginning of the Nintendo tag ID, which is variable in length, and can be found right after the Vendor Specific OUI type of the 802.11 frame, which is often seen as a byte of &amp;quot;01&amp;quot;. Each one of the elements are discussed in more detail after the table. Note that this table represents a current theory on what each of the fields represent, with the argument stated in the corresponding sections.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Length&lt;br /&gt;
!  Purpose&lt;br /&gt;
!  Description&lt;br /&gt;
!  Example&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x01&lt;br /&gt;
|  &#039;&#039;&#039;Protocol Identification&#039;&#039;&#039;&lt;br /&gt;
|  May be for protocol identification. All captures thus far show this value at 17, hexadecimal 11.&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
|  0x01&lt;br /&gt;
|  0x01&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass Service Length&#039;&#039;&#039;&lt;br /&gt;
|  Length in bytes of only the StreetPass Services field.&lt;br /&gt;
|  05&lt;br /&gt;
|-&lt;br /&gt;
|  0x02&lt;br /&gt;
|  0x05&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass Services&#039;&#039;&#039;&lt;br /&gt;
|  Starting at the 0x02 offset, it appears to be a list of StreetPass services, each in length of 5 bytes. This continues on depending on the number of services the user has enabled at the time.&lt;br /&gt;
|  00 02 08 00 00&lt;br /&gt;
|-&lt;br /&gt;
|  varies&lt;br /&gt;
|  0x02&lt;br /&gt;
|  &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|  At the end of the StreetPass Services field is a two byte field that is the same among all devices thus far. Its purpose is unknown.&lt;br /&gt;
|  f0 08&lt;br /&gt;
|-&lt;br /&gt;
|  -0x08&lt;br /&gt;
|  0x08&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass consoleID&#039;&#039;&#039;&lt;br /&gt;
|  Seen to change when the Settings app is used if there has not been a StreetPass tag recently. Also may change after each StreetPass hit and system power-off?&lt;br /&gt;
|  c8 34 6e 05 0f c9 c6 80&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Protocol Version =====&lt;br /&gt;
&lt;br /&gt;
Appears to represent a protocol version, or device identification. This field remains consistent on all devices, despite variable enabled StreetPass services or length of the tag. Could also represent region.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass Service Length =====&lt;br /&gt;
&lt;br /&gt;
This field is used to indicate the length of the StreetPass Services field. Removing and adding services has shown this field to increment and decrement in 5 bytes, or 11 bytes depending on the game. The StreetPass Services field has then expanded or reduced accordingly.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass Services =====&lt;br /&gt;
&lt;br /&gt;
The third field in the protocol header appears to be an arbitrary length list of StreetPass services enabled on the device. Each StreetPass service seems to be identified by a 5-byte ID. If you enable or disable services, the number of 5-byte IDs grows and shrinks within this list. Observed service IDs include:&lt;br /&gt;
&lt;br /&gt;
  Mii Plaza: 00 02 08 00 00&lt;br /&gt;
  Ridge Racer: 00 03 58 00 30&lt;br /&gt;
  Sims 3: 00 03 65 00 30&lt;br /&gt;
  Street Fighter: 00 03 05 00 02 (FF FF FF FF FF FF)&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes are the titleID of the service, the last byte seems to contain flags.&lt;br /&gt;
&lt;br /&gt;
The last byte (flags) have been observed between those possibilities :&lt;br /&gt;
&lt;br /&gt;
  00000000&lt;br /&gt;
  00000010&lt;br /&gt;
  00010000&lt;br /&gt;
  00100000&lt;br /&gt;
  00110000&lt;br /&gt;
  00110010&lt;br /&gt;
&lt;br /&gt;
Only the bits 2,5,6 were used.&lt;br /&gt;
When set, the bit n°2 indicates the presence of a followinf 6-byte field filled with 0xff.&lt;br /&gt;
&lt;br /&gt;
Some services have a 6-byte field succeeding the StreetPass service that is just FF bytes (e.g. FF FF FF FF FF FF). The purpose of these is unknown, although may be used as data for a service, or as separator of some sort for different types of StreetPass services.&lt;br /&gt;
&lt;br /&gt;
Observed services (leading titleID 0x00 removed, 6*0xff ignored) on 68K probe requests between 2013-08-24 and 2014-06-29 in various european locations.&lt;br /&gt;
&lt;br /&gt;
The fact that a same titleID can have different flags should be noted.&lt;br /&gt;
&lt;br /&gt;
  0db6-00100000 5&lt;br /&gt;
  0db6-00110000 20&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Occurrences&lt;br /&gt;
!  TitleID &lt;br /&gt;
!  Flags&lt;br /&gt;
|-&lt;br /&gt;
| 131&lt;br /&gt;
| 0208&lt;br /&gt;
| 00000000&lt;br /&gt;
|-&lt;br /&gt;
| 58&lt;br /&gt;
| 0516&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 56&lt;br /&gt;
| 053f&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| 0306&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 44&lt;br /&gt;
| 0862&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| 09f1&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| 0db6&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 0516&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 0205&lt;br /&gt;
| 00110010&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 0ec4&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 0300&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 055d&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 08d3&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 053b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0916&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0306&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0300&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0916&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0b1d&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0ec4&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 080f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 07c8&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 038a&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0f30&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0db6&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0910&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0862&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 053f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0522&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0ae2&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 09f1&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 08c5&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 038c&lt;br /&gt;
| 00000000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 033b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 030b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0ba9&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0a53&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 08d3&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0751&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0402&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0f82&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0f5b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0e7f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0bff&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0b1d&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0ad6&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0a90&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0a05&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 073c&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 06da&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 05aa&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 05a5&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 053b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 04ca&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 038a&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 033b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 030b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0305&lt;br /&gt;
| 00000010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Unknown 2-byte Field =====&lt;br /&gt;
&lt;br /&gt;
The purpose of this field is not known yet. It has remained the same across all devices thus far. The value has always been observed as &#039;&#039;&#039;f008&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass consoleID =====&lt;br /&gt;
&lt;br /&gt;
When there&#039;s a StreetPass hit, and no StreetPass data changed on either of the 3DSes, no data is transferred besides probes? After turning off power, then powering on and entering sleepmode, the MAC doesn&#039;t change from prior to power off but the last 8-bytes of the Nintendo tag changes. This tag has been seen to not be sequential over time. After one of the new StreetPass content is handled, (running one of the StreetPass titles etc) this 8-byte StreetPass consoleID changes?&lt;br /&gt;
&lt;br /&gt;
=== Initial Probe Response Frame ===&lt;br /&gt;
&lt;br /&gt;
If a 3DS (#2) receives another device&#039;s probe request and has not yet tagged that device in an arbitrary amount of time (~12 hours), the receiving 3DS (#2) will respond with a Probe Response frame. The destination MAC address is the StreetPass MAC address of the 3DS (#1) that was transmitting the probe request, while the receiving device sets its StreetPass MAC address as the source address. This is important to note because further exchanges may cease using destination and/or source addresses.&lt;br /&gt;
&lt;br /&gt;
In the probe response, the 3DS (#2) appears to offer a channel of 1, 6, or 11. Different channels have been seen offered between the same set of 3DS for each StreetPass. Offered channels, and channel range most likely varies by region.&lt;br /&gt;
&lt;br /&gt;
The StreetPass Probe Response frame contains the same Nintendo tag in Probe Requests of the device that is transmitting the Probe Response frame.&lt;br /&gt;
&lt;br /&gt;
=== Subsequent Probe Request and Response Frames ===&lt;br /&gt;
&lt;br /&gt;
The 3DS (#1) that the Initial Probe Response is directed to will send an 802.11 Action frame back to the device. The sequence numbers at this point stop stepping up by 3, and instead increase by one based from each originating device&#039;s SN. It will then send another Probe Request, this time sent directly to the responding 3DS (#2) by specifying its MAC address in the destination field, and setting its own MAC address in the source address field. It also does not have a SSID specified in the frame, except the frame will contain a BSSID with the value of the 3DS (#2) that responded to the initial Probe, and thus acts as the master in the 802.11 exchange.&lt;br /&gt;
&lt;br /&gt;
=== Send Mode ===&lt;br /&gt;
The 3DS can mark StreetPass data with one of 4 Send Modes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!ID!!Send Mode!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0||EXCHANGE||StreetPass message exchange will only happen if both consoles can store the message of the other. E.g. the inbox isn&#039;t full. Example title: StreetPass Mii Plaza&lt;br /&gt;
|-&lt;br /&gt;
|1||RECV_ONLY||3DS doesn&#039;t have anything in its outbox so it is only receiving messages.&lt;br /&gt;
|-&lt;br /&gt;
|2||SEND_ONLY||&lt;br /&gt;
|-&lt;br /&gt;
|3||SEND_RECV||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== StreetPass Spoofing ==&lt;br /&gt;
&lt;br /&gt;
A streetpass &amp;quot;AP&amp;quot; was spoofed with hostapd by setting the SSID to &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;, with the extra Nintendo tag from another 3DS&#039; probe request. Like 3DS&amp;lt;&amp;gt;3DS communications, the 3DS didn&#039;t authenticate or associate with the host. Streetpass communications use CCMP encryption. Eventually the 3DS stops communicating with the host since the host doesn&#039;t reply to any of the data frames, then sends a 802.11 &amp;quot;Action&amp;quot; frame, with category ID 0x7f and Nintendo&#039;s vendor ID: 00 1f 32.(However the 3DS keeps communicating with the above process repeatedly)&lt;br /&gt;
Communication with two 3DSes are the same as above except there&#039;s actual encrypted data sent to/from both consoles, unlike the fake host.&lt;br /&gt;
&lt;br /&gt;
==StreetPass Relay==&lt;br /&gt;
This feature was implemented in version [[6.2.0-12]].&lt;br /&gt;
&lt;br /&gt;
It was probably controlled over the [[SpotPass#policylist]]. When connecting to a Nintendo Zone Hotspot the console will send an additional GET parameter named &#039;&#039;ap&#039;&#039;. Adding the following priority to the policylist will instruct the console to upload its data (The level tag can probably be lower and must not be HIGH).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;Priority&amp;gt;&lt;br /&gt;
    &amp;lt;TitleId&amp;gt;0004013000003400&amp;lt;/TitleId&amp;gt;&lt;br /&gt;
    &amp;lt;TaskId&amp;gt;sprelay&amp;lt;/TaskId&amp;gt;&lt;br /&gt;
    &amp;lt;Level&amp;gt;HIGH&amp;lt;/Level&amp;gt;&lt;br /&gt;
    &amp;lt;Persistent&amp;gt;false&amp;lt;/Persistent&amp;gt;&lt;br /&gt;
    &amp;lt;Revive&amp;gt;false&amp;lt;/Revive&amp;gt;&lt;br /&gt;
  &amp;lt;/Priority&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
The following additional headers will be send in the request:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
|X-Boss-Apinfo||Access Point Info. The same number that is send with the policylist GET parameter ap. Probably identifies the SSID of connected Nintendo Zone Hotspot. If not connected to Nintendo Zone Hotspot this will be an empty string.||02012600000&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Bssid||The MAC address of the access point the 3DS is connected to.||11:22:33:44:55:66&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Country||2 letter country code of the set language.||ES&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Region||3 letter region code of the 3DS&#039; region.||EUR&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Userid||A unique 16 character long hexadecimal string that represents a 64-bit integer. It is unknown how this number is generated.||6966442DE2EED063&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the request body there will be a file named &#039;&#039;spr-meta&#039;&#039; and a file per registered StreetPass game &#039;&#039;spr-slotXX&#039;&#039; where XX is an incrementing number. If the game contains not messages in its outbox so the size of the file would be 0 then no file is created and sent but it will still be listed in the spr-meta file.&lt;br /&gt;
&lt;br /&gt;
===spr-meta file===&lt;br /&gt;
The spr-meta file is a text file which may contain the following content.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
slotsize: 5&lt;br /&gt;
spr-slot01: 3,000EC400,10664&lt;br /&gt;
spr-slot02: 2,0007AD00,3648&lt;br /&gt;
spr-slot03: 3,00030000,3804&lt;br /&gt;
spr-slot04: 1,00051600,0&lt;br /&gt;
spr-slot05: 0,00020800,28228&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The comma seperated list after each spr-slotXX has the following meaning&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
|Send Mode||StreetPass ID (Low title ID of the game. May be from a different region like japan.)||Size of the file in bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===spr-slotXX files===&lt;br /&gt;
These are binary files. They begin a with a header with the follwing structure.&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
!Offset!!Size!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||0x04||Magic number 0x00006161&lt;br /&gt;
|-&lt;br /&gt;
|0x04||0x04||Size of the file in bytes including this header&lt;br /&gt;
|-&lt;br /&gt;
|0x08||0x04||StreetPass ID (Low title ID of the game. May be from a different region like japan.)&lt;br /&gt;
|-&lt;br /&gt;
|0x0C||0x04||Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x10||0x04||Number of messages after this header&lt;br /&gt;
|}&lt;br /&gt;
After the header follows the StreetPass message exactly as it is stored in the outbox of [[CECD_Savegame#File_.3C12-char_ID.3E|CEC Save]].&lt;br /&gt;
&lt;br /&gt;
===Response===&lt;br /&gt;
The following headers are expected:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
!Key!!colspan=3|Value!!Example&lt;br /&gt;
|-&lt;br /&gt;
|X-Spr-SlotXX-Result||StreetPass ID||Send Mode||Size of the file in bytes||X-Spr-Slot01-Result: 000EC400,3,17760&lt;br /&gt;
|}&lt;br /&gt;
It expects a header for every game it sent in the request.&lt;br /&gt;
&lt;br /&gt;
The body is expected to contain binary data with the same structure as the spr-slotXX files in the request. The order of these must be the same as the reponse header order.&lt;br /&gt;
&lt;br /&gt;
== Structs, Data Types ==&lt;br /&gt;
Streetpass uses multiple different structs and data types for storing and transporting data.&lt;br /&gt;
&lt;br /&gt;
=== MessageId ===&lt;br /&gt;
This datatype holds a per-console-per-title unique message id.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| The message id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Timestamp12 ===&lt;br /&gt;
This holds a timestamp in 12 bytes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Year&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Month&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Day&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Weekday&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Hour&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Minute&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Second&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| Millisecond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Message (0x6060) ===&lt;br /&gt;
MessageHeader:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6060 (&amp;lt;code&amp;gt;``&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| Padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_size&lt;br /&gt;
| The size in bytes of the entire message, including all headers and hmac&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| total_header_size&lt;br /&gt;
| The size in bytes of all headers, including the extra headers&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| body_size&lt;br /&gt;
| The size in bytes of the body of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id2&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| batch_id&lt;br /&gt;
| The sending client sets an ID here if multiple messages should be batched together into one transaction&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| transfer_id&lt;br /&gt;
| All messages from the same transfer (That is, sending the messages) contain the same transfer id&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x08&lt;br /&gt;
| MessageId&lt;br /&gt;
| message_id&lt;br /&gt;
| The ID of the sending message&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_version&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x08&lt;br /&gt;
| MessageId&lt;br /&gt;
| message_id_2&lt;br /&gt;
| The message ID that this message is referring to, e.g. the individual responses in Streetpass Mii Plaza&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| recipients&lt;br /&gt;
| bitfield: 0x01: everyone; 0x02: friends&lt;br /&gt;
|-&lt;br /&gt;
| 0x35&lt;br /&gt;
| 0x01&lt;br /&gt;
| SendMethod&lt;br /&gt;
| send_method&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x36&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| unopened&lt;br /&gt;
| Set if the message hasn&#039;t been opened yet&lt;br /&gt;
|-&lt;br /&gt;
| 0x37&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| is_new&lt;br /&gt;
| Set if the message is new&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x08&lt;br /&gt;
| u64&lt;br /&gt;
| sender_id&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x08&lt;br /&gt;
| u64&lt;br /&gt;
| sender_id_2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| sent&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| received&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| created&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| send_count&lt;br /&gt;
| How often this message can be sent&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| forward_count&lt;br /&gt;
| How often this message can be forwarded&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| user_data&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
ExtMessageHeader:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| type&lt;br /&gt;
| The type of the extra header&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| size&lt;br /&gt;
| Size, in bytes, of the extra header&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| body&lt;br /&gt;
| The body of the extra header&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Message:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x70&lt;br /&gt;
| MessageHeader&lt;br /&gt;
| header&lt;br /&gt;
| The header of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
|&lt;br /&gt;
| ExtMessageHeader[]&lt;br /&gt;
| ext_headers&lt;br /&gt;
| An array of the extra headers for the message. The array keeps filling until the length no more until &amp;lt;code&amp;gt;header.total_header_size&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| body&lt;br /&gt;
| The actual body/payload of the message&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 0x20&lt;br /&gt;
| u8[0x20]&lt;br /&gt;
| hmac&lt;br /&gt;
| The hmac over the body with the hmac_key&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Slot (0x6161) ===&lt;br /&gt;
The slot groups multiple messages of one title id together into a single struct&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6161 (&amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| size&lt;br /&gt;
| The size of bytes of the entire slot, including the header and all messages it contains&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| batch_id&lt;br /&gt;
| If the slot contains batched messages, the batch id is set to the same one as those messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_count&lt;br /&gt;
| The total number of messages in this slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
| Message[]&lt;br /&gt;
| messages&lt;br /&gt;
| An array of length &amp;lt;code&amp;gt;message_count&amp;lt;/code&amp;gt; all the messages of this slot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoxInfo (0x6262) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6262 (&amp;lt;code&amp;gt;bb&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| file_size&lt;br /&gt;
| The size of the box info in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_box_size&lt;br /&gt;
| The maximum allowed size of the box in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| box_size&lt;br /&gt;
| The current size of the box in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_num_messages&lt;br /&gt;
| The maximum number of messages that the box can hold&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_messages&lt;br /&gt;
| The current number of messages in the box&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_batch_size&lt;br /&gt;
| The maximum size of a bach, in number of messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_message_size&lt;br /&gt;
| The maximum size of a message, in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
|&lt;br /&gt;
| MessageHeader[]&lt;br /&gt;
| message_headers&lt;br /&gt;
| An array of all message headers in this box of length &amp;lt;code&amp;gt;num_messages&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MBoxInfo (0x6363) ===&lt;br /&gt;
This holds information on the message box, including both inbox and outbox&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6363 (&amp;lt;code&amp;gt;cc&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id for this mbox&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| private_id&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| mbox_type_flags&lt;br /&gt;
| 0x01: normal programs, 0x06: system programs, 0x80: silent notif&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| enabled&lt;br /&gt;
| Weather this message box is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x20&lt;br /&gt;
| u8[0x20]&lt;br /&gt;
| hmac_key&lt;br /&gt;
| The hmac key to make hmacs for messages. These are unique per title, however they are the same for all consoles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| last_accessed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unread&lt;br /&gt;
| Does this message box contain unread messages?&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_new&lt;br /&gt;
| Does this message box contain new messages?&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unknown&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unknown&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| last_received&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| unknown_timestamp&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 0x6565 ===&lt;br /&gt;
SlotMetadata:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| SendMethod&lt;br /&gt;
| send_method&lt;br /&gt;
| The send method for the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| body_size&lt;br /&gt;
| The size of the slot body in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| count&lt;br /&gt;
| Number of messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x14&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Struct:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6565 (&amp;lt;code&amp;gt;ee&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x28&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x360&lt;br /&gt;
| SlotMetadata[0x18]&lt;br /&gt;
| slots&lt;br /&gt;
| Metadata of all slots&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OBIndex (0x6767) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6767 (&amp;lt;code&amp;gt;gg&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_messages&lt;br /&gt;
| The number of messages in the outbox&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
|&lt;br /&gt;
| MessageId[]&lt;br /&gt;
| message_ids&lt;br /&gt;
| An array of the message IDs in the outbox, of length &amp;lt;code&amp;gt;num_messages&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MBoxList (0x6868) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6868 (&amp;lt;code&amp;gt;hh&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| version&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_boxes&lt;br /&gt;
| The number of boxes (= games with streetpass enabled)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x180&lt;br /&gt;
| char[0x18][0x10]&lt;br /&gt;
| box_names&lt;br /&gt;
| A 0x18-long array of all the box names (= hex encoded title ids) of games with streetpass enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Nintendo Software]]&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprDone&amp;diff=23383</id>
		<title>CECDS:SprDone</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprDone&amp;diff=23383"/>
		<updated>2025-03-16T17:51:03Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x0414|1|0}}&lt;br /&gt;
{{IPC/RequestEntry|(bool) success}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Indicates that a cecd spr exchange is completely done. Based on &amp;lt;code&amp;gt;success&amp;lt;/code&amp;gt; the changes to the cec data re committed or rolled back.&lt;br /&gt;
&lt;br /&gt;
Sets the [[CECD_Services#CecSprStatus|Cec Spr Status]] to &amp;lt;code&amp;gt;CEC_SPR_CONNECTION_FINISHED&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseRecv&amp;diff=23382</id>
		<title>CECDS:SprFinaliseRecv</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseRecv&amp;diff=23382"/>
		<updated>2025-03-16T17:50:42Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x0413|0|0}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Tells the cecd service that it is done receiving data for the spr exchange now.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_RECEIVE&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprAddSlot&amp;diff=23381</id>
		<title>CECDS:SprAddSlot</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprAddSlot&amp;diff=23381"/>
		<updated>2025-03-16T17:50:20Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x0412|3|2}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|&amp;lt;code&amp;gt;0xFF&amp;lt;/code&amp;gt; (flags?)}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerR|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This adds a [[StreetPass#Slot_.280x6161.29|slot]] to be received.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprSetRecvSlotsMetadata&amp;diff=23380</id>
		<title>CECDS:SprSetRecvSlotsMetadata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprSetRecvSlotsMetadata&amp;diff=23380"/>
		<updated>2025-03-16T17:50:02Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x0411|1|2}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerR|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This notifies the cec service of the [[StreetPass#Slot_.280x6161.29|slots]] that it will receive shortly by sending it metadata objects for each title.&lt;br /&gt;
Each metadata object consists out of a tuple of three words: &amp;lt;code&amp;gt;send method&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; whereas the size is the size in bytes of the corresponding spr slot.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprStartRecv&amp;diff=23379</id>
		<title>CECDS:SprStartRecv</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprStartRecv&amp;diff=23379"/>
		<updated>2025-03-16T17:49:41Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x0410|0|0}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Sets the cecd service start expecting received spr data.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23378</id>
		<title>CECDS:SprFinaliseSend</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23378"/>
		<updated>2025-03-16T17:49:24Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x040F|0|0}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Tells the cecd service that fetching data for sending is done now. After this the implementation is expected to actually send the data to the remote provider.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_SEND&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprSetTitleSent&amp;diff=23377</id>
		<title>CECDS:SprSetTitleSent</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprSetTitleSent&amp;diff=23377"/>
		<updated>2025-03-16T17:49:07Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x040E|2|0}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|(bool) success}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Sets weather a title was successfully sent for the SPR connection.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CEC_SPR_SEND&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSlot&amp;diff=23376</id>
		<title>CECDS:SprGetSlot</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSlot&amp;diff=23376"/>
		<updated>2025-03-16T17:48:32Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x040D|2|2}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies a [[StreetPass#Slot_.280x6161.29|slot]] to be sent into the specified buffer.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23375</id>
		<title>CECDS:SprGetSendSlotsMetadata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23375"/>
		<updated>2025-03-16T17:48:12Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestHeader|0x040C|1|2}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEntry|Amount of slots read}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies the metadata for all [[StreetPass#Slot_.280x6161.29|slots]] that need to be sent into the specified buffer.&lt;br /&gt;
Each metadata object consists out of a tuple of three words: &amp;lt;code&amp;gt;send method&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; whereas the size is the size in bytes of the corresponding spr slot. Copies up to &amp;lt;code&amp;gt;buffer size / (4*3)&amp;lt;/code&amp;gt; slots into the buffer.&lt;br /&gt;
&lt;br /&gt;
Returns the amount of slots read, &#039;&#039;not&#039;&#039; the amount of bytes read.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=23374</id>
		<title>CECD Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=23374"/>
		<updated>2025-03-16T17:26:55Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* CECD Service &amp;quot;cecd:s&amp;quot; */ Put in the proper header codes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
Streetpass stuff.&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C2&lt;br /&gt;
| Open/[[CECDU:OpenRawFile|OpenRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| Read/[[CECDU:ReadRawFile|ReadRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030104&lt;br /&gt;
| [[CECDU:ReadMessage|ReadMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040106&lt;br /&gt;
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050042&lt;br /&gt;
| Write/[[CECDU:WriteRawFile|WriteRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060104&lt;br /&gt;
| [[CECDU:WriteMessage|WriteMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070106&lt;br /&gt;
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080102&lt;br /&gt;
| [[CECDU:Delete|Delete]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000900C2&lt;br /&gt;
| SetData (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A00C4&lt;br /&gt;
| ReadData/[[CECDU:GetSystemInfo|GetSystemInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| [[CECDU:Start|Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| [[CECDU:Stop|Stop]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| GetCecInfoBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetCecdState (returns CecStateAbbreviated in cmdbuf[2])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110104&lt;br /&gt;
| [[CECDU:OpenAndWrite|OpenAndWrite]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120104&lt;br /&gt;
| [[CECDU:OpenAndRead|OpenAndRead]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0082&lt;br /&gt;
| [[CECDU:GetEventLog|GetEventLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0000&lt;br /&gt;
| [[CECDU:GetEventLogStart|GetEventLogStart]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| [[CECDU:GetEventLogEntryCount|GetEventLogEntryCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0021....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecDataPathType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_LIST || 1&lt;br /&gt;
| data:/CEC/MBoxList____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_INFO || 2&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxInfo____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_INFO || 3&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INFO  || 4&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INDEX  || 5&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/OBIndex_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_MSG  || 6&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_MSG  || 7&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_ROOT_DIR  || 10&lt;br /&gt;
| data:/CEC&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_DIR  || 11&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_DIR  || 12&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_DIR  || 13&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__&lt;br /&gt;
|-&lt;br /&gt;
| || 101 thru 199 (inclusive)&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.0&amp;lt;i-100&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_ICON  || 101&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.001&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_TITLE  || 110&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecCommand ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NONE&lt;br /&gt;
| 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_START&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_START&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCAN&lt;br /&gt;
| 3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCANWAIT&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STARTSCAN&lt;br /&gt;
| 5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESCAN&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_RESUME&lt;br /&gt;
| 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOPWAIT&lt;br /&gt;
| 0xA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP&lt;br /&gt;
| 0xB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE&lt;br /&gt;
| 0xC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE_WAIT&lt;br /&gt;
| 0xD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_FILTER&lt;br /&gt;
| 0xE&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_STOP&lt;br /&gt;
| 0xF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_START&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_EXIT&lt;br /&gt;
| 0x11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS&lt;br /&gt;
| 0x12&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE&lt;br /&gt;
| 0x13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_END&lt;br /&gt;
| 0x15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecStateAbbreviated ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_IDLE&lt;br /&gt;
| 1&lt;br /&gt;
| Corresponds to CEC_STATE_IDLE&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_INACTIVE&lt;br /&gt;
| 2&lt;br /&gt;
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_SCANNING&lt;br /&gt;
| 3&lt;br /&gt;
| Corresponds to CEC_STATE_SCANNING&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_WLREADY?&lt;br /&gt;
| 4&lt;br /&gt;
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_OTHER&lt;br /&gt;
| 5&lt;br /&gt;
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecMessageId ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:s&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0401....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020002&lt;br /&gt;
| GetCecInfoEventHandleSys&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A0000&lt;br /&gt;
| [[CECDS:SprCreate|SprCreate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040B0000&lt;br /&gt;
| [[CECDS:SprInitialise|SprInitialise]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0042&lt;br /&gt;
| [[CECDS:SprGetSendSlotsMetadata|SprGetSendSlotsMetadata]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0082&lt;br /&gt;
| [[CECDS:SprGetSlot|SprGetSlot]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E0080&lt;br /&gt;
| [[CECDS:SprSetTitleSent|SprSetTitleSent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F0000&lt;br /&gt;
| [[CECDS:SprFinaliseSend|SprFinaliseSend]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04100000&lt;br /&gt;
| [[CECDS:SprStartRecv|SprStartRecv]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04110042&lt;br /&gt;
| [[CECDS:SprSetRecvSlotsMetadata|SprSetRecvSlotsMetadata]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x041200C2&lt;br /&gt;
| [[CECDS:SprAddSlot|SprAddSlot]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04130000&lt;br /&gt;
| [[CECDS:SprFinaliseRecv|SprFinaliseRecv]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04140040&lt;br /&gt;
| [[CECDS:SprDone|SprDone]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04150000&lt;br /&gt;
| [[CECDS:GenHashConsoleUnique|GenHashConsoleUnique]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04160002&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0417....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecSprStatus ===&lt;br /&gt;
This enum is used internally of the cecd service to keep track of which state of an SPR exchange it is in currently.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_START&lt;br /&gt;
| 0&lt;br /&gt;
| The internal objects were just created&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_INIT&lt;br /&gt;
| 1&lt;br /&gt;
| The internal objects for sending and receiving have been initialised&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_READY&lt;br /&gt;
| 2&lt;br /&gt;
| The sysmodule is ready for SPR Send, now it is possible to fetch the SPR data needed&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND&lt;br /&gt;
| 3&lt;br /&gt;
| The other program should be sending the SPR request now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_READY&lt;br /&gt;
| 4&lt;br /&gt;
| The sysmodule is ready to receive SPR data now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE&lt;br /&gt;
| 5&lt;br /&gt;
| The sysmodule is done receiving SPR data&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:ndm&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| Deinitialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ResumeDaemon&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| SuspendDaemon(bool immediately)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| QueryStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| GetNZoneInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070042&lt;br /&gt;
| SetNZoneSSIDList&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080042&lt;br /&gt;
| SetNZoneMacFilter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseRecv&amp;diff=23373</id>
		<title>CECDS:SprFinaliseRecv</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseRecv&amp;diff=23373"/>
		<updated>2025-03-16T17:24:45Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04130000&amp;lt;/code&amp;gt;}} {{IPC/RequestEnd}}  = Response = {{IPC/Request}} {{#vardefine:...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04130000&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Tells the cecd service that it is done receiving data for the spr exchange now.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_RECEIVE&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23372</id>
		<title>CECDS:SprFinaliseSend</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23372"/>
		<updated>2025-03-16T17:24:37Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040F0000&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Tells the cecd service that fetching data for sending is done now. After this the implementation is expected to actually send the data to the remote provider.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_SEND&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprDone&amp;diff=23371</id>
		<title>CECDS:SprDone</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprDone&amp;diff=23371"/>
		<updated>2025-03-16T17:22:50Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04140040&amp;lt;/code&amp;gt;}} {{IPC/RequestEntry|(bool) success}} {{IPC/RequestEnd}}  = Resp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04140040&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|(bool) success}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Indicates that a cecd spr exchange is completely done. Based on &amp;lt;code&amp;gt;success&amp;lt;/code&amp;gt; the changes to the cec data re committed or rolled back.&lt;br /&gt;
&lt;br /&gt;
Sets the [[CECD_Services#CecSprStatus|Cec Spr Status]] to &amp;lt;code&amp;gt;CEC_SPR_CONNECTION_FINISHED&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23370</id>
		<title>CECDS:SprFinaliseSend</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23370"/>
		<updated>2025-03-16T17:20:42Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040F0000&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Tells the cecd service that fetching data for sending is done now. After this the implementation is expected to actually send the data to the remote provider&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_RECEIVE&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprAddSlot&amp;diff=23369</id>
		<title>CECDS:SprAddSlot</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprAddSlot&amp;diff=23369"/>
		<updated>2025-03-16T17:19:01Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x041200C2&amp;lt;/code&amp;gt;}} {{IPC/RequestEntry|title id}} {{IPC/RequestEntry|&amp;lt;code&amp;gt;0xFF&amp;lt;/c...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x041200C2&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|&amp;lt;code&amp;gt;0xFF&amp;lt;/code&amp;gt; (flags?)}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerR|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This adds a [[StreetPass#Slot_.280x6161.29|slot]] to be received.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprSetRecvSlotsMetadata&amp;diff=23368</id>
		<title>CECDS:SprSetRecvSlotsMetadata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprSetRecvSlotsMetadata&amp;diff=23368"/>
		<updated>2025-03-16T17:16:50Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04110042&amp;lt;/code&amp;gt;}} {{IPC/RequestEntry|buffer size}} {{IPC/MapPointerR|buffer addr...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04110042&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerR|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This notifies the cec service of the [[StreetPass#Slot_.280x6161.29|slots]] that it will receive shortly by sending it metadata objects for each title.&lt;br /&gt;
Each metadata object consists out of a tuple of three words: &amp;lt;code&amp;gt;send method&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; whereas the size is the size in bytes of the corresponding spr slot.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprStartRecv&amp;diff=23367</id>
		<title>CECDS:SprStartRecv</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprStartRecv&amp;diff=23367"/>
		<updated>2025-03-16T17:14:43Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04100000&amp;lt;/code&amp;gt;}} {{IPC/RequestEnd}}  = Response = {{IPC/Request}} {{#vardefine:...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x04100000&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Sets the cecd service start expecting received spr data.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23366</id>
		<title>CECDS:SprFinaliseSend</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprFinaliseSend&amp;diff=23366"/>
		<updated>2025-03-16T17:13:04Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040F0000&amp;lt;/code&amp;gt;}} {{IPC/RequestEnd}}  = Response = {{IPC/Request}} {{#vardefine:...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040F0000&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Tells the cecd service that fetching data for sending is done now. After this the implementation is expected to actually send the data to the remote provider&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_SEND&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprSetTitleSent&amp;diff=23365</id>
		<title>CECDS:SprSetTitleSent</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprSetTitleSent&amp;diff=23365"/>
		<updated>2025-03-16T17:10:06Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040E0080&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|(bool) success}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
Sets weather a title was successfully sent for the SPR connection.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CEC_SPR_SEND&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;CEC_SPR_RECEIVE_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23364</id>
		<title>CECDS:SprGetSendSlotsMetadata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23364"/>
		<updated>2025-03-16T17:05:56Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040C0042&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEntry|Amount of slots read}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies the metadata for all [[StreetPass#Slot_.280x6161.29|slots]] that need to be sent into the specified buffer.&lt;br /&gt;
Each metadata object consists out of a tuple of three words: &amp;lt;code&amp;gt;send method&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; whereas the size is the size in bytes of the corresponding spr slot. Copies up to &amp;lt;code&amp;gt;buffer size / (4*3)&amp;lt;/code&amp;gt; slots into the buffer.&lt;br /&gt;
&lt;br /&gt;
Returns the amount of slots read, &#039;&#039;not&#039;&#039; the amount of bytes read.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSlot&amp;diff=23363</id>
		<title>CECDS:SprGetSlot</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSlot&amp;diff=23363"/>
		<updated>2025-03-16T17:05:49Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040D0082&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies a [[StreetPass#Slot_.280x6161.29|slot]] to be sent into the specified buffer.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprSetTitleSent&amp;diff=23362</id>
		<title>CECDS:SprSetTitleSent</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprSetTitleSent&amp;diff=23362"/>
		<updated>2025-03-16T17:05:37Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040D0082&amp;lt;/code&amp;gt;}} {{IPC/RequestEntry|title id}} {{IPC/RequestEntry|buffer size}}...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040D0082&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies a [[StreetPass#Slot_.280x6161.29|slot]] to be sent into the specified buffer.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprCreate&amp;diff=23361</id>
		<title>CECDS:SprCreate</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprCreate&amp;diff=23361"/>
		<updated>2025-03-16T17:05:15Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x040A0000]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index Word&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This creates the data needed to start an SPR exchange. Sets the [[CECD_Services#CecSprStatus|Cec Spr Status]] to &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_START&amp;lt;/code&amp;gt; and then to &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_INIT&amp;lt;/code&amp;gt; upon success.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprInitialise&amp;diff=23360</id>
		<title>CECDS:SprInitialise</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprInitialise&amp;diff=23360"/>
		<updated>2025-03-16T17:04:54Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x040B0000]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index Word&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This initialises the data needed to start an SPR exchange. Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_INIT&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_SEND_READY&amp;lt;/code&amp;gt; upon success.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSlot&amp;diff=23359</id>
		<title>CECDS:SprGetSlot</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSlot&amp;diff=23359"/>
		<updated>2025-03-16T17:02:38Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040D0082&amp;lt;/code&amp;gt;}} {{IPC/RequestEntry|title id}} {{IPC/RequestEntry|buffer size}}...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040D0082&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|title id}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies a [[StreetPass#Slot_.280x6161.29|slot]] to be sent into the specified buffer.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_INIT&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23358</id>
		<title>CECDS:SprGetSendSlotsMetadata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23358"/>
		<updated>2025-03-16T17:02:17Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040C0042&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEntry|Amount of slots read}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies the metadata for all [[StreetPass#Slot_.280x6161.29|slots]] that need to be sent into the specified buffer.&lt;br /&gt;
Each metadata object consists out of a tuple of three words: &amp;lt;code&amp;gt;send method&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; whereas the size is the size in bytes of the corresponding spr slot. Copies up to &amp;lt;code&amp;gt;buffer size / (4*3)&amp;lt;/code&amp;gt; slots into the buffer.&lt;br /&gt;
&lt;br /&gt;
Returns the amount of slots read, &#039;&#039;not&#039;&#039; the amount of bytes read.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_INIT&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23357</id>
		<title>CECDS:SprGetSendSlotsMetadata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23357"/>
		<updated>2025-03-16T16:59:30Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Description */ Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040C0042&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEntry|Amount of slots read}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies the metadata for all slots that need to be sent into the specified buffer.&lt;br /&gt;
Each metadata object consists out of a tuple of three words: &amp;lt;code&amp;gt;send method&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; whereas the size is the size in bytes of the corresponding spr slot. Copies up to &amp;lt;code&amp;gt;buffer size / (4*3)&amp;lt;/code&amp;gt; slots into the buffer.&lt;br /&gt;
&lt;br /&gt;
Returns the amount of slots read, &#039;&#039;not&#039;&#039; the amount of bytes read.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_INIT&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23356</id>
		<title>CECDS:SprGetSendSlotsMetadata</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprGetSendSlotsMetadata&amp;diff=23356"/>
		<updated>2025-03-16T16:59:01Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {{IPC/Request}} {{#vardefine:ipc_offset|0}} {{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040C0042&amp;lt;/code&amp;gt;}} {{IPC/RequestEntry|buffer size}} {{IPC/MapPointerW|buffer addr...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code &amp;lt;code&amp;gt;0x040C0042&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{IPC/RequestEntry|buffer size}}&lt;br /&gt;
{{IPC/MapPointerW|buffer address}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{{IPC/Request}}&lt;br /&gt;
{{#vardefine:ipc_offset|0}}&lt;br /&gt;
{{IPC/RequestEntry|Header code}}&lt;br /&gt;
{{IPC/RequestEntry|Result code}}&lt;br /&gt;
{{IPC/RequestEntry|Amount of slots read}}&lt;br /&gt;
{{IPC/RequestEnd}}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This copies the metadata for all slots that need to be sent into the specified buffer.&lt;br /&gt;
Each metadata object consists out of a tuple of three words: &amp;lt;code&amp;gt;send method&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;title_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt; whereas the size is the size in bytes of the corresponding spr slot. Copies up to &amp;lt;code&amp;gt;buffer size / (4*3)&amp;lt;/code&amp;gt; slots into the buffer.&lt;br /&gt;
&lt;br /&gt;
Returns the amount of slots read, _not_ the amount of bytes read.&lt;br /&gt;
&lt;br /&gt;
Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_INIT&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprInitialise&amp;diff=23355</id>
		<title>CECDS:SprInitialise</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprInitialise&amp;diff=23355"/>
		<updated>2025-03-16T16:47:43Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |- !  Index Word !  Description |- | 0 | Header code [0x040B0000] |- |}  = Response = {| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |- ! Index Wo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x040B0000]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index Word&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This initialises the data needed to start an SPR exchange. Requires the [[CECD_Services#CecSprStatus|Cec Spr Status]] to be &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_START&amp;lt;/code&amp;gt; and sets it to &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_INIT&amp;lt;/code&amp;gt; upon success.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:SprCreate&amp;diff=23354</id>
		<title>CECDS:SprCreate</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:SprCreate&amp;diff=23354"/>
		<updated>2025-03-16T16:46:15Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;= Request = {| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |- !  Index Word !  Description |- | 0 | Header code [0x040A0000] |- |}  = Response = {| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |- ! Index Wo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x040A0000]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index Word&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This creates the data needed to start an SPR exchange. Sets the [[CECD_Services#CecSprStatus|Cec Spr Status]] to &amp;lt;code&amp;gt;CEC_SPR_SEND_RECV_START&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=23353</id>
		<title>CECD Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=23353"/>
		<updated>2025-03-16T16:45:01Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* CecSprStatus */ Removed falsely added enum values&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
Streetpass stuff.&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C2&lt;br /&gt;
| Open/[[CECDU:OpenRawFile|OpenRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| Read/[[CECDU:ReadRawFile|ReadRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030104&lt;br /&gt;
| [[CECDU:ReadMessage|ReadMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040106&lt;br /&gt;
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050042&lt;br /&gt;
| Write/[[CECDU:WriteRawFile|WriteRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060104&lt;br /&gt;
| [[CECDU:WriteMessage|WriteMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070106&lt;br /&gt;
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080102&lt;br /&gt;
| [[CECDU:Delete|Delete]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000900C2&lt;br /&gt;
| SetData (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A00C4&lt;br /&gt;
| ReadData/[[CECDU:GetSystemInfo|GetSystemInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| [[CECDU:Start|Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| [[CECDU:Stop|Stop]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| GetCecInfoBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetCecdState (returns CecStateAbbreviated in cmdbuf[2])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110104&lt;br /&gt;
| [[CECDU:OpenAndWrite|OpenAndWrite]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120104&lt;br /&gt;
| [[CECDU:OpenAndRead|OpenAndRead]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0082&lt;br /&gt;
| [[CECDU:GetEventLog|GetEventLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0000&lt;br /&gt;
| [[CECDU:GetEventLogStart|GetEventLogStart]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| [[CECDU:GetEventLogEntryCount|GetEventLogEntryCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0021....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecDataPathType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_LIST || 1&lt;br /&gt;
| data:/CEC/MBoxList____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_INFO || 2&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxInfo____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_INFO || 3&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INFO  || 4&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INDEX  || 5&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/OBIndex_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_MSG  || 6&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_MSG  || 7&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_ROOT_DIR  || 10&lt;br /&gt;
| data:/CEC&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_DIR  || 11&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_DIR  || 12&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_DIR  || 13&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__&lt;br /&gt;
|-&lt;br /&gt;
| || 101 thru 199 (inclusive)&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.0&amp;lt;i-100&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_ICON  || 101&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.001&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_TITLE  || 110&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecCommand ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NONE&lt;br /&gt;
| 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_START&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_START&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCAN&lt;br /&gt;
| 3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCANWAIT&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STARTSCAN&lt;br /&gt;
| 5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESCAN&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_RESUME&lt;br /&gt;
| 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOPWAIT&lt;br /&gt;
| 0xA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP&lt;br /&gt;
| 0xB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE&lt;br /&gt;
| 0xC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE_WAIT&lt;br /&gt;
| 0xD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_FILTER&lt;br /&gt;
| 0xE&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_STOP&lt;br /&gt;
| 0xF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_START&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_EXIT&lt;br /&gt;
| 0x11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS&lt;br /&gt;
| 0x12&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE&lt;br /&gt;
| 0x13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_END&lt;br /&gt;
| 0x15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecStateAbbreviated ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_IDLE&lt;br /&gt;
| 1&lt;br /&gt;
| Corresponds to CEC_STATE_IDLE&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_INACTIVE&lt;br /&gt;
| 2&lt;br /&gt;
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_SCANNING&lt;br /&gt;
| 3&lt;br /&gt;
| Corresponds to CEC_STATE_SCANNING&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_WLREADY?&lt;br /&gt;
| 4&lt;br /&gt;
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_OTHER&lt;br /&gt;
| 5&lt;br /&gt;
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecMessageId ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:s&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0401....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020002&lt;br /&gt;
| GetCecInfoEventHandleSys&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A....&lt;br /&gt;
| [[CECDS:SprCreate|SprCreate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040B....&lt;br /&gt;
| [[CECDS:SprInitialise|SprInitialise]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0042&lt;br /&gt;
| [[CECDS:SprGetSendSlotsMetadata|SprGetSendSlotsMetadata]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0082&lt;br /&gt;
| [[CECDS:SprGetSlot|SprGetSlot]] title_id, write_buffer, buffer_size&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E....&lt;br /&gt;
| [[CECDS:SprSetTitleSent|SprSetTitleSent]] title_id, bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F....&lt;br /&gt;
| [[CECDS:SprFinaliseSend|SprFinaliseSend]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0410....&lt;br /&gt;
| [[CECDS:SprStartRecv|SprStartRecv]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04110042&lt;br /&gt;
| [[CECDS:SprSetRecvSlotsMetadata|SprSetRecvSlotsMetadata]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x041200C2&lt;br /&gt;
| [[CECDS:SprAddSlot|SprAddSlot]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0413....&lt;br /&gt;
| [[CECDS:SprFinaliseRecv|SprFinaliseRecv]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0414....&lt;br /&gt;
| [[CECDS:SprDone|SprDone]] bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x04150000&lt;br /&gt;
| [[CECDS:GenHashConsoleUnique|GenHashConsoleUnique]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04160002&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0417....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecSprStatus ===&lt;br /&gt;
This enum is used internally of the cecd service to keep track of which state of an SPR exchange it is in currently.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_START&lt;br /&gt;
| 0&lt;br /&gt;
| The internal objects were just created&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_INIT&lt;br /&gt;
| 1&lt;br /&gt;
| The internal objects for sending and receiving have been initialised&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_READY&lt;br /&gt;
| 2&lt;br /&gt;
| The sysmodule is ready for SPR Send, now it is possible to fetch the SPR data needed&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND&lt;br /&gt;
| 3&lt;br /&gt;
| The other program should be sending the SPR request now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_READY&lt;br /&gt;
| 4&lt;br /&gt;
| The sysmodule is ready to receive SPR data now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE&lt;br /&gt;
| 5&lt;br /&gt;
| The sysmodule is done receiving SPR data&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:ndm&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| Deinitialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ResumeDaemon&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| SuspendDaemon(bool immediately)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| QueryStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| GetNZoneInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070042&lt;br /&gt;
| SetNZoneSSIDList&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080042&lt;br /&gt;
| SetNZoneMacFilter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=23352</id>
		<title>CECD Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=23352"/>
		<updated>2025-03-16T16:36:24Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Linkify the names for the cecds:spr methods, renaming 0x411 to be more consistent with the remaining&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
Streetpass stuff.&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C2&lt;br /&gt;
| Open/[[CECDU:OpenRawFile|OpenRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| Read/[[CECDU:ReadRawFile|ReadRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030104&lt;br /&gt;
| [[CECDU:ReadMessage|ReadMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040106&lt;br /&gt;
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050042&lt;br /&gt;
| Write/[[CECDU:WriteRawFile|WriteRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060104&lt;br /&gt;
| [[CECDU:WriteMessage|WriteMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070106&lt;br /&gt;
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080102&lt;br /&gt;
| [[CECDU:Delete|Delete]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000900C2&lt;br /&gt;
| SetData (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A00C4&lt;br /&gt;
| ReadData/[[CECDU:GetSystemInfo|GetSystemInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| [[CECDU:Start|Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| [[CECDU:Stop|Stop]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| GetCecInfoBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetCecdState (returns CecStateAbbreviated in cmdbuf[2])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110104&lt;br /&gt;
| [[CECDU:OpenAndWrite|OpenAndWrite]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120104&lt;br /&gt;
| [[CECDU:OpenAndRead|OpenAndRead]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0082&lt;br /&gt;
| [[CECDU:GetEventLog|GetEventLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0000&lt;br /&gt;
| [[CECDU:GetEventLogStart|GetEventLogStart]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| [[CECDU:GetEventLogEntryCount|GetEventLogEntryCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0021....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecDataPathType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_LIST || 1&lt;br /&gt;
| data:/CEC/MBoxList____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_INFO || 2&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxInfo____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_INFO || 3&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INFO  || 4&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INDEX  || 5&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/OBIndex_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_MSG  || 6&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_MSG  || 7&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_ROOT_DIR  || 10&lt;br /&gt;
| data:/CEC&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_DIR  || 11&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_DIR  || 12&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_DIR  || 13&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__&lt;br /&gt;
|-&lt;br /&gt;
| || 101 thru 199 (inclusive)&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.0&amp;lt;i-100&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_ICON  || 101&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.001&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_TITLE  || 110&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecCommand ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NONE&lt;br /&gt;
| 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_START&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_START&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCAN&lt;br /&gt;
| 3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCANWAIT&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STARTSCAN&lt;br /&gt;
| 5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESCAN&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_RESUME&lt;br /&gt;
| 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOPWAIT&lt;br /&gt;
| 0xA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP&lt;br /&gt;
| 0xB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE&lt;br /&gt;
| 0xC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE_WAIT&lt;br /&gt;
| 0xD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_FILTER&lt;br /&gt;
| 0xE&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_STOP&lt;br /&gt;
| 0xF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_START&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_EXIT&lt;br /&gt;
| 0x11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS&lt;br /&gt;
| 0x12&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE&lt;br /&gt;
| 0x13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_END&lt;br /&gt;
| 0x15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecStateAbbreviated ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_IDLE&lt;br /&gt;
| 1&lt;br /&gt;
| Corresponds to CEC_STATE_IDLE&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_INACTIVE&lt;br /&gt;
| 2&lt;br /&gt;
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_SCANNING&lt;br /&gt;
| 3&lt;br /&gt;
| Corresponds to CEC_STATE_SCANNING&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_WLREADY?&lt;br /&gt;
| 4&lt;br /&gt;
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_OTHER&lt;br /&gt;
| 5&lt;br /&gt;
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecMessageId ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:s&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0401....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020002&lt;br /&gt;
| GetCecInfoEventHandleSys&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A....&lt;br /&gt;
| [[CECDS:SprCreate|SprCreate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040B....&lt;br /&gt;
| [[CECDS:SprInitialise|SprInitialise]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0042&lt;br /&gt;
| [[CECDS:SprGetSendSlotsMetadata|SprGetSendSlotsMetadata]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0082&lt;br /&gt;
| [[CECDS:SprGetSlot|SprGetSlot]] title_id, write_buffer, buffer_size&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E....&lt;br /&gt;
| [[CECDS:SprSetTitleSent|SprSetTitleSent]] title_id, bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F....&lt;br /&gt;
| [[CECDS:SprFinaliseSend|SprFinaliseSend]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0410....&lt;br /&gt;
| [[CECDS:SprStartRecv|SprStartRecv]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04110042&lt;br /&gt;
| [[CECDS:SprSetRecvSlotsMetadata|SprSetRecvSlotsMetadata]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x041200C2&lt;br /&gt;
| [[CECDS:SprAddSlot|SprAddSlot]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0413....&lt;br /&gt;
| [[CECDS:SprFinaliseRecv|SprFinaliseRecv]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0414....&lt;br /&gt;
| [[CECDS:SprDone|SprDone]] bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x04150000&lt;br /&gt;
| [[CECDS:GenHashConsoleUnique|GenHashConsoleUnique]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04160002&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0417....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecSprStatus ===&lt;br /&gt;
This enum is used internally of the cecd service to keep track of which state of an SPR exchange it is in currently.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_START&lt;br /&gt;
| 0&lt;br /&gt;
| The internal objects were just created&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_INIT&lt;br /&gt;
| 1&lt;br /&gt;
| The internal objects for sending and receiving have been initialised&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_READY&lt;br /&gt;
| 2&lt;br /&gt;
| The sysmodule is ready for SPR Send, now it is possible to fetch the SPR data needed&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND&lt;br /&gt;
| 3&lt;br /&gt;
| The other program should be sending the SPR request now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_READY&lt;br /&gt;
| 4&lt;br /&gt;
| The sysmodule is ready to receive SPR data now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE&lt;br /&gt;
| 5&lt;br /&gt;
| The sysmodule is done receiving SPR data&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED_TCP&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED&lt;br /&gt;
| 7&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_POST&lt;br /&gt;
| 8&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_POST&lt;br /&gt;
| 9&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHING&lt;br /&gt;
| 0x0F&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHED&lt;br /&gt;
| 0x10&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:ndm&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| Deinitialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ResumeDaemon&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| SuspendDaemon(bool immediately)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| QueryStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| GetNZoneInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070042&lt;br /&gt;
| SetNZoneSSIDList&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080042&lt;br /&gt;
| SetNZoneMacFilter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=User:Sorunome&amp;diff=23311</id>
		<title>User:Sorunome</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=User:Sorunome&amp;diff=23311"/>
		<updated>2025-02-10T09:44:36Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Created page with &amp;quot;Fox. Creator of [https://netpass.cafe NetPass].&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fox. Creator of [https://netpass.cafe NetPass].&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=MAC_Address&amp;diff=23310</id>
		<title>MAC Address</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=MAC_Address&amp;diff=23310"/>
		<updated>2025-02-10T09:43:55Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Add more mac prefixes from NetPass research&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== List of known Nintendo MAC prefixes ==&lt;br /&gt;
[http://www.coffer.com/mac_find/?string=Nintendo Vendor/Ethernet/Bluetooth MAC Address Lookup and Search]&lt;br /&gt;
&lt;br /&gt;
== List of known 3DS MAC prefixes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! MAC prefix&lt;br /&gt;
! Found in model / version (region)&lt;br /&gt;
! Source&lt;br /&gt;
|-&lt;br /&gt;
| 04:03:D6&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 18:2A:7B&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 2C:10:C1&lt;br /&gt;
| O3DS / Red (U)&lt;br /&gt;
| [https://gbatemp.net/threads/device-mac-address-survey.365525/#post-4987679 GBAtemp]&lt;br /&gt;
|-&lt;br /&gt;
| 34:2F:BD&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 34:AF:2C&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 40:D2:8A&lt;br /&gt;
| N3DS XL / Black (U)&lt;br /&gt;
| [[User:Rubik|Rubik]]&lt;br /&gt;
|-&lt;br /&gt;
| 40:F4:07&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 48:A5:E7&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 58:2F:40&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 68:BD:13&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 58:BD:A3&lt;br /&gt;
| O3DS / Blue (U) &lt;br /&gt;
| [https://gbatemp.net/threads/device-mac-address-survey.365525/#post-4987679 GBAtemp]&lt;br /&gt;
|-&lt;br /&gt;
| 58:BD:A3&lt;br /&gt;
| O3DS / Zelda: OOT3D (E)&lt;br /&gt;
| [[User:EmuAGR|EmuAGR]]&lt;br /&gt;
|-&lt;br /&gt;
| 5C:52:1E&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 60:6B:FF&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 64:B5:C6&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 78:A2:A0&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 7C:BB:8A&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 8C:CD:E8&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 94:58:CB&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 98:41:5C&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 98:B6:E9&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| 9C:E6:35&lt;br /&gt;
| O3DS XL (J)&lt;br /&gt;
| [https://gbatemp.net/threads/device-mac-address-survey.365525/#post-4987679 GBAtemp]&lt;br /&gt;
|-&lt;br /&gt;
| A4:38:CC&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| A4:C0:E1&lt;br /&gt;
| O3DS / Blue (E)&lt;br /&gt;
| [[User:EmuAGR|EmuAGR]]&lt;br /&gt;
|-&lt;br /&gt;
| B8:78:26&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| B8:8A:EC&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| B8:AE:6E&lt;br /&gt;
| O3DS XL / Zelda: Link Between Worlds (U)&lt;br /&gt;
| [https://gbatemp.net/threads/device-mac-address-survey.365525/#post-4987679 GBAtemp]&lt;br /&gt;
|-&lt;br /&gt;
| CC:FB:65&lt;br /&gt;
| N3DS / White (E)&lt;br /&gt;
| [[User:EmuAGR|EmuAGR]]&lt;br /&gt;
|-&lt;br /&gt;
| CC:FB:65&lt;br /&gt;
| N3DS / White (E), launch day&lt;br /&gt;
| [[User:Ryccardo|Ryccardo]]&lt;br /&gt;
|-&lt;br /&gt;
| CC:FB:65&lt;br /&gt;
| N3DS XL / Zelda: Majora&#039;s Mask (E)&lt;br /&gt;
| [[User:EmuAGR|EmuAGR]]&lt;br /&gt;
|-&lt;br /&gt;
| D8:6B:F7&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| DC:68:EB&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| CC:9E:00&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| E0:0C:7F&lt;br /&gt;
| O3DS / Zelda: OOT3D (E)&lt;br /&gt;
| [[User:EmuAGR|EmuAGR]]&lt;br /&gt;
|-&lt;br /&gt;
| E0:F6:B5&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|-&lt;br /&gt;
| EC:C4:0D&lt;br /&gt;
|&lt;br /&gt;
| [[User:Sorunome|Sorunome]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FS:OpenArchive&amp;diff=23036</id>
		<title>FS:OpenArchive</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FS:OpenArchive&amp;diff=23036"/>
		<updated>2025-01-16T07:44:05Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Fix link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x080C00C2]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| [[Filesystem_services#Archives|Archive ID]]&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| [[Filesystem_services#PathType|Path Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Path Size (including null-terminator)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| (PathSize &amp;lt;&amp;lt; 14)  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 2&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Path Data Pointer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| u64, Archive Handle&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=News_Services&amp;diff=22816</id>
		<title>News Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=News_Services&amp;diff=22816"/>
		<updated>2024-12-10T11:35:36Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Add missing category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This system module handles the system notifications.&lt;br /&gt;
&lt;br /&gt;
The maximum number of notifications that can be stored/handled is 100, hence the intended range for notificationIDs is 0-99.&lt;br /&gt;
&lt;br /&gt;
=News service &amp;lt;nowiki&amp;gt;&amp;quot;news:u&amp;quot;&amp;lt;/nowiki&amp;gt;=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C8&lt;br /&gt;
| [[NEWSU:AddNotification|AddNotification]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This service only has &#039;&#039;one&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
=News service &amp;lt;nowiki&amp;gt;&amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt;=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C6&lt;br /&gt;
| [[NEWSS:AddNotification|AddNotification]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0002....&lt;br /&gt;
| Stubbed, only returns 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0003....&lt;br /&gt;
| Stubbed, only returns 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| [[NEWSS:ResetNotifications|ResetNotifications]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| [[NEWSS:GetTotalNotifications|GetTotalNotifications]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| [[NEWSS:SetNewsDBHeader|SetNewsDBHeader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070082&lt;br /&gt;
| [[NEWSS:SetNotificationHeader|SetNotificationHeader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080082&lt;br /&gt;
| [[NEWSS:SetNotificationMessage|SetNotificationMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090082&lt;br /&gt;
| [[NEWSS:SetNotificationImage|SetNotificationImage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0042&lt;br /&gt;
| [[NEWSS:GetNewsDBHeader|GetNewsDBHeader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0082&lt;br /&gt;
| [[NEWSS:GetNotificationHeader|GetNotificationHeader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0082&lt;br /&gt;
| [[NEWSS:GetNotificationMessage|GetNotificationMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| [[NEWSS:GetNotificationImage|GetNotificationImage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0040&lt;br /&gt;
| [[NEWSS:SetInfoLEDPattern|SetInfoLEDPattern]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| [[NEWSS:SyncArrivedNotifications|SyncArrivedNotifications]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100040&lt;br /&gt;
| [[NEWSS:SyncOneArrivedNotification|SyncOneArrivedNotification]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110040&lt;br /&gt;
| [[NEWSS:SetAutomaticSyncFlag|SetAutomaticSyncFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120082&lt;br /&gt;
| [[NEWSS:SetNotificationHeaderOther|SetNotificationHeaderOther]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00130000&lt;br /&gt;
| [[NEWSS:WriteNewsDBSavedata|WriteNewsDBSavedata]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00140000&lt;br /&gt;
| [[NEWSS:GetTotalArrivedNotifications|GetTotalArrivedNotifications]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=News module NAND [[System_SaveData|savedata]]=&lt;br /&gt;
* &amp;quot;news.db&amp;quot;: This is the main save-file, the filesize is fixed to 0x2BD0-bytes.&lt;br /&gt;
* &amp;quot;newsXXX.txt&amp;quot; This is the [[NEWSS:AddNotification|message]] data for this notification, where XXX is the decimal notification-index in the below headers-array. The filesize should be &amp;lt;= &amp;lt;size listed [[NEWSS:GetNotificationMessage|here]]&amp;gt;, since that&#039;s the max size read by the notifications applet.&lt;br /&gt;
* &amp;quot;newsXXX.mpo&amp;quot; This is the [[NEWSS:AddNotification|MPO]] data for this notification if any, where XXX is the decimal notification-index in the below headers-array. The filesize should be &amp;lt;= &amp;lt;size listed [[NEWSS:GetNotificationImage|here]]&amp;gt;, since that&#039;s the max size read by the notifications applet.&lt;br /&gt;
&lt;br /&gt;
==news.db==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x10&lt;br /&gt;
| Header, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x2BC0 (100 * 0x70)&lt;br /&gt;
| Array of [[NEWSS:AddNotification|headers]] for each notification.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Header===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Must be 0x1 &amp;quot;is valid&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Flags&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0xE&lt;br /&gt;
| Normally zero?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flags===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Set by news module when handling BOSS notifications and the AddNotification commands. This indicates that there&#039;s &amp;quot;unread&amp;quot; notifications, the notifications applet clears this once all notifications have been &amp;quot;read&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Set by news module when handling CECD notifications.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=News module startup=&lt;br /&gt;
The actual main function called by main() does the following:&lt;br /&gt;
* srv_init()&lt;br /&gt;
* Registers services &amp;lt;nowiki&amp;gt;&amp;quot;news:u&amp;quot; and &amp;quot;news:s&amp;quot;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
* Initializes the service session handle for &amp;quot;ptm:sysm&amp;quot;.&lt;br /&gt;
* Loads 4 handles from somewhere, which gets used with svcReplyAndReceive later.&lt;br /&gt;
* Does notificationID state init, uses [[SRV:GetNotificationSemaphore]], then subscribes to srv notifications 0x104 and 0x106.&lt;br /&gt;
* &amp;lt;Some func calls&amp;gt;&lt;br /&gt;
* Here [[PTMSYSM:SetInfoLEDPattern]] is used.&lt;br /&gt;
* Some state init is done, then the usual svcReplyAndReceive loop begins.&lt;br /&gt;
&lt;br /&gt;
=Errors=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Error code&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8A12805&lt;br /&gt;
| The news.db or notification header data for the specified notificationID is not set(the specified notification doesn&#039;t exist).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Title Versions=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title version&lt;br /&gt;
!  System version&lt;br /&gt;
!  Changes&lt;br /&gt;
|-&lt;br /&gt;
| v7168&lt;br /&gt;
| [[9.7.0-25|9.7.0-X]]&lt;br /&gt;
| All of the changes are the following:&lt;br /&gt;
* See [[9.7.0-25|here]] regarding the updated CTRSDK function code.&lt;br /&gt;
* This function is eventually called by newss_cmdf, newss_cmd10, and &amp;lt;certain function&amp;gt;. When calling a certain function fails in here, this code now calls &amp;lt;another certain function&amp;gt; before returning.&lt;br /&gt;
* Mutex enter/leave function calls were added to a certain function.&lt;br /&gt;
* More state init was added to the start of an initialization function called during news module startup(crt0?).&lt;br /&gt;
* 0x14 new bytes were added to .rodata.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ErrDisp&amp;diff=22815</id>
		<title>ErrDisp</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ErrDisp&amp;diff=22815"/>
		<updated>2024-12-09T21:42:37Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Add missing category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This system process handles displaying the error screens, such as &amp;quot;an error has occurred, the system needs shutdown&amp;quot;. This can also display a register dump for exceptions, and info for fatal errors. (Normally the black-screen errors are displayed on retail, while the latter is displayed on development units.)&lt;br /&gt;
&lt;br /&gt;
The register dump/fatal error info can also be written to [[nandrw/sys/native.log]]. On retail consoles, the system does not notify ErrDisp that any user-land exceptions occurred, ErrDisp is only notified for this on dev/debug units. Therefore, on retail consoles native.log only contains info from fatal errors. Starting with [[5.0.0-11]] ErrDisp no longer writes logs to native.log, except when the error-type is value 5 and when other checks with the errorinfo structure are successful (normally processes using this port never use error-type 5).&lt;br /&gt;
&lt;br /&gt;
The bottom screen displays the error screen like &amp;quot;error has occurred&amp;quot;, even with a development 3DS. The top screen can display the development error info, this is only displayed when [[Configuration_Memory#ENVINFO|ENVINFO]] bit0 is clear, for a development 3DS.&lt;br /&gt;
&lt;br /&gt;
ErrDisp handles &amp;quot;returning&amp;quot; to Home Menu via [[NSS:RebootSystem]], which triggers a hardware system reboot.&lt;br /&gt;
&lt;br /&gt;
= ErrDisp error port &amp;quot;err:f&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010800&lt;br /&gt;
| [[ERR:Throw|Throw]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| [[ERR:SetUserString|SetUserString]]&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22814</id>
		<title>CECD Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22814"/>
		<updated>2024-12-05T14:45:32Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: add 0x40E name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
Streetpass stuff.&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C2&lt;br /&gt;
| Open/[[CECDU:OpenRawFile|OpenRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| Read/[[CECDU:ReadRawFile|ReadRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030104&lt;br /&gt;
| [[CECDU:ReadMessage|ReadMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040106&lt;br /&gt;
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050042&lt;br /&gt;
| Write/[[CECDU:WriteRawFile|WriteRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060104&lt;br /&gt;
| [[CECDU:WriteMessage|WriteMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070106&lt;br /&gt;
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080102&lt;br /&gt;
| [[CECDU:Delete|Delete]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000900C2&lt;br /&gt;
| SetData (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A00C4&lt;br /&gt;
| ReadData/[[CECDU:GetSystemInfo|GetSystemInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| [[CECDU:Start|Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| [[CECDU:Stop|Stop]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| GetCecInfoBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetCecdState (returns CecStateAbbreviated in cmdbuf[2])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110104&lt;br /&gt;
| [[CECDU:OpenAndWrite|OpenAndWrite]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120104&lt;br /&gt;
| [[CECDU:OpenAndRead|OpenAndRead]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0082&lt;br /&gt;
| [[CECDU:GetEventLog|GetEventLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0000&lt;br /&gt;
| [[CECDU:GetEventLogStart|GetEventLogStart]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| [[CECDU:GetEventLogEntryCount|GetEventLogEntryCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0021....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecDataPathType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_LIST || 1&lt;br /&gt;
| data:/CEC/MBoxList____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_INFO || 2&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxInfo____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_INFO || 3&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INFO  || 4&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INDEX  || 5&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/OBIndex_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_MSG  || 6&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_MSG  || 7&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_ROOT_DIR  || 10&lt;br /&gt;
| data:/CEC&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_DIR  || 11&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_DIR  || 12&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_DIR  || 13&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__&lt;br /&gt;
|-&lt;br /&gt;
| || 101 thru 199 (inclusive)&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.0&amp;lt;i-100&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_ICON  || 101&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.001&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_TITLE  || 110&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecCommand ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NONE&lt;br /&gt;
| 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_START&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_START&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCAN&lt;br /&gt;
| 3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCANWAIT&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STARTSCAN&lt;br /&gt;
| 5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESCAN&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_RESUME&lt;br /&gt;
| 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOPWAIT&lt;br /&gt;
| 0xA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP&lt;br /&gt;
| 0xB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE&lt;br /&gt;
| 0xC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE_WAIT&lt;br /&gt;
| 0xD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_FILTER&lt;br /&gt;
| 0xE&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_STOP&lt;br /&gt;
| 0xF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_START&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_EXIT&lt;br /&gt;
| 0x11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS&lt;br /&gt;
| 0x12&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE&lt;br /&gt;
| 0x13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_END&lt;br /&gt;
| 0x15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecStateAbbreviated ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_IDLE&lt;br /&gt;
| 1&lt;br /&gt;
| Corresponds to CEC_STATE_IDLE&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_INACTIVE&lt;br /&gt;
| 2&lt;br /&gt;
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_SCANNING&lt;br /&gt;
| 3&lt;br /&gt;
| Corresponds to CEC_STATE_SCANNING&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_WLREADY?&lt;br /&gt;
| 4&lt;br /&gt;
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_OTHER&lt;br /&gt;
| 5&lt;br /&gt;
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecMessageId ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:s&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0401....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020002&lt;br /&gt;
| GetCecInfoEventHandleSys&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A....&lt;br /&gt;
| SprCreate&lt;br /&gt;
|-&lt;br /&gt;
| 0x040B....&lt;br /&gt;
| SprInitialise&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0042&lt;br /&gt;
| SprGetSendSlotsMetadata&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0082&lt;br /&gt;
| SprGetSlot title_id, write_buffer, buffer_size&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E....&lt;br /&gt;
| SprSetTitleSent title_id, bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F....&lt;br /&gt;
| SprFinaliseSend&lt;br /&gt;
|-&lt;br /&gt;
| 0x0410....&lt;br /&gt;
| SprStartRecv&lt;br /&gt;
|-&lt;br /&gt;
| 0x04110042&lt;br /&gt;
| SprAddSlotsMetadata&lt;br /&gt;
|-&lt;br /&gt;
| 0x041200C2&lt;br /&gt;
| SprAddSlot&lt;br /&gt;
|-&lt;br /&gt;
| 0x0413....&lt;br /&gt;
| SprFinaliseRecv&lt;br /&gt;
|-&lt;br /&gt;
| 0x0414....&lt;br /&gt;
| SprDone bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x04150000&lt;br /&gt;
| [[CECDS:GenHashConsoleUnique|GenHashConsoleUnique]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04160002&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0417....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecSprStatus ===&lt;br /&gt;
This enum is used internally of the cecd service to keep track of which state of an SPR exchange it is in currently.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_START&lt;br /&gt;
| 0&lt;br /&gt;
| The internal objects were just created&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_INIT&lt;br /&gt;
| 1&lt;br /&gt;
| The internal objects for sending and receiving have been initialised&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_READY&lt;br /&gt;
| 2&lt;br /&gt;
| The sysmodule is ready for SPR Send, now it is possible to fetch the SPR data needed&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND&lt;br /&gt;
| 3&lt;br /&gt;
| The other program should be sending the SPR request now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_READY&lt;br /&gt;
| 4&lt;br /&gt;
| The sysmodule is ready to receive SPR data now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE&lt;br /&gt;
| 5&lt;br /&gt;
| The sysmodule is done receiving SPR data&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED_TCP&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED&lt;br /&gt;
| 7&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_POST&lt;br /&gt;
| 8&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_POST&lt;br /&gt;
| 9&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHING&lt;br /&gt;
| 0x0F&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHED&lt;br /&gt;
| 0x10&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:ndm&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| Deinitialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ResumeDaemon&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| SuspendDaemon(bool immediately)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| QueryStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| GetNZoneInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070042&lt;br /&gt;
| SetNZoneSSIDList&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080042&lt;br /&gt;
| SetNZoneMacFilter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=NDMU:LeaveExclusiveState&amp;diff=22813</id>
		<title>NDMU:LeaveExclusiveState</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=NDMU:LeaveExclusiveState&amp;diff=22813"/>
		<updated>2024-12-02T12:34:07Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: specify where the magic number comes from&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00020002]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x20 (process id)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22812</id>
		<title>CECD Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22812"/>
		<updated>2024-12-02T11:36:49Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
Streetpass stuff.&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C2&lt;br /&gt;
| Open/[[CECDU:OpenRawFile|OpenRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| Read/[[CECDU:ReadRawFile|ReadRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030104&lt;br /&gt;
| [[CECDU:ReadMessage|ReadMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040106&lt;br /&gt;
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050042&lt;br /&gt;
| Write/[[CECDU:WriteRawFile|WriteRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060104&lt;br /&gt;
| [[CECDU:WriteMessage|WriteMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070106&lt;br /&gt;
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080102&lt;br /&gt;
| [[CECDU:Delete|Delete]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000900C2&lt;br /&gt;
| SetData (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A00C4&lt;br /&gt;
| ReadData/[[CECDU:GetSystemInfo|GetSystemInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| [[CECDU:Start|Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| [[CECDU:Stop|Stop]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| GetCecInfoBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetCecdState (returns CecStateAbbreviated in cmdbuf[2])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110104&lt;br /&gt;
| [[CECDU:OpenAndWrite|OpenAndWrite]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120104&lt;br /&gt;
| [[CECDU:OpenAndRead|OpenAndRead]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0082&lt;br /&gt;
| [[CECDU:GetEventLog|GetEventLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0000&lt;br /&gt;
| [[CECDU:GetEventLogStart|GetEventLogStart]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| [[CECDU:GetEventLogEntryCount|GetEventLogEntryCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0021....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecDataPathType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_LIST || 1&lt;br /&gt;
| data:/CEC/MBoxList____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_INFO || 2&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxInfo____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_INFO || 3&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INFO  || 4&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INDEX  || 5&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/OBIndex_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_MSG  || 6&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_MSG  || 7&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_ROOT_DIR  || 10&lt;br /&gt;
| data:/CEC&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_DIR  || 11&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_DIR  || 12&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_DIR  || 13&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__&lt;br /&gt;
|-&lt;br /&gt;
| || 101 thru 199 (inclusive)&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.0&amp;lt;i-100&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_ICON  || 101&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.001&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_TITLE  || 110&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecCommand ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NONE&lt;br /&gt;
| 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_START&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_START&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCAN&lt;br /&gt;
| 3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCANWAIT&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STARTSCAN&lt;br /&gt;
| 5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESCAN&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_RESUME&lt;br /&gt;
| 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOPWAIT&lt;br /&gt;
| 0xA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP&lt;br /&gt;
| 0xB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE&lt;br /&gt;
| 0xC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE_WAIT&lt;br /&gt;
| 0xD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_FILTER&lt;br /&gt;
| 0xE&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_STOP&lt;br /&gt;
| 0xF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_START&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_EXIT&lt;br /&gt;
| 0x11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS&lt;br /&gt;
| 0x12&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE&lt;br /&gt;
| 0x13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_END&lt;br /&gt;
| 0x15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecStateAbbreviated ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_IDLE&lt;br /&gt;
| 1&lt;br /&gt;
| Corresponds to CEC_STATE_IDLE&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_INACTIVE&lt;br /&gt;
| 2&lt;br /&gt;
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_SCANNING&lt;br /&gt;
| 3&lt;br /&gt;
| Corresponds to CEC_STATE_SCANNING&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_WLREADY?&lt;br /&gt;
| 4&lt;br /&gt;
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_OTHER&lt;br /&gt;
| 5&lt;br /&gt;
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecMessageId ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:s&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0401....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020002&lt;br /&gt;
| GetCecInfoEventHandleSys&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A....&lt;br /&gt;
| SprCreate&lt;br /&gt;
|-&lt;br /&gt;
| 0x040B....&lt;br /&gt;
| SprInitialise&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0042&lt;br /&gt;
| SprGetSendSlotsMetadata&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0082&lt;br /&gt;
| SprGetSlot title_id, write_buffer, buffer_size&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F....&lt;br /&gt;
| SprFinaliseSend&lt;br /&gt;
|-&lt;br /&gt;
| 0x0410....&lt;br /&gt;
| SprStartRecv&lt;br /&gt;
|-&lt;br /&gt;
| 0x04110042&lt;br /&gt;
| SprAddSlotsMetadata&lt;br /&gt;
|-&lt;br /&gt;
| 0x041200C2&lt;br /&gt;
| SprAddSlot&lt;br /&gt;
|-&lt;br /&gt;
| 0x0413....&lt;br /&gt;
| SprFinaliseRecv&lt;br /&gt;
|-&lt;br /&gt;
| 0x0414....&lt;br /&gt;
| SprDone bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x04150000&lt;br /&gt;
| [[CECDS:GenHashConsoleUnique|GenHashConsoleUnique]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04160002&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0417....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecSprStatus ===&lt;br /&gt;
This enum is used internally of the cecd service to keep track of which state of an SPR exchange it is in currently.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_START&lt;br /&gt;
| 0&lt;br /&gt;
| The internal objects were just created&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_INIT&lt;br /&gt;
| 1&lt;br /&gt;
| The internal objects for sending and receiving have been initialised&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_READY&lt;br /&gt;
| 2&lt;br /&gt;
| The sysmodule is ready for SPR Send, now it is possible to fetch the SPR data needed&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND&lt;br /&gt;
| 3&lt;br /&gt;
| The other program should be sending the SPR request now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_READY&lt;br /&gt;
| 4&lt;br /&gt;
| The sysmodule is ready to receive SPR data now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE&lt;br /&gt;
| 5&lt;br /&gt;
| The sysmodule is done receiving SPR data&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED_TCP&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED&lt;br /&gt;
| 7&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_POST&lt;br /&gt;
| 8&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_POST&lt;br /&gt;
| 9&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHING&lt;br /&gt;
| 0x0F&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHED&lt;br /&gt;
| 0x10&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:ndm&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| Deinitialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ResumeDaemon&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| SuspendDaemon(bool immediately)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| QueryStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| GetNZoneInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070042&lt;br /&gt;
| SetNZoneSSIDList&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080042&lt;br /&gt;
| SetNZoneMacFilter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=StreetPass&amp;diff=22811</id>
		<title>StreetPass</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=StreetPass&amp;diff=22811"/>
		<updated>2024-12-02T11:23:52Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Fill in structs for streetpass messages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;StreetPass&#039;&#039;&#039; is a feature that allows your 3DS to connect with other 3DS consoles using WiFi in standby mode.&lt;br /&gt;
It can be used to share Mii(s) on Mii Plaza for example. Applications&#039; StreetPass data are stored in the CECD module&#039;s NAND savegame, applications can move received StreetPass data to an arbitrary savegame. Wifi infrastructure with APs are used to communicate where the data-frames are encrypted with WPA2 CCMP, like [[NWM_Services|UDS]]/[[Download Play]].&lt;br /&gt;
&lt;br /&gt;
== WiFi Probe Request Frame ==&lt;br /&gt;
&lt;br /&gt;
Whenever the 3DS is woken from sleep (or turned on), and WiFi is enabled, it sends out a 802.11 Probe Request which include all saved access points, as well a probe to an SSID containing an arbitrary string of data, such as &amp;quot;ic[kSvm9s@*cYD&amp;gt;/~IEVj\(fGG;qDo8j&amp;quot;. This string changes at least daily, and most likely every time the device is woken up.&lt;br /&gt;
&lt;br /&gt;
The MAC address used for these probes is the static MAC address found in the System Settings application. Unlike the StreetPass MAC address, it will not change over time. This MAC address OUI also differs from the one used in StreetPass.&lt;br /&gt;
&lt;br /&gt;
== CCMP Key ==&lt;br /&gt;
The StreetPass local-WLAN CCMP data-encryption key is generated by the StreetPass CECD module, where the CCMP key is the 16-byte output from encrypting an all-zero block with AES-CTR via [[PS:EncryptDecryptAes]], with keytype6. The CTR is the first 0x10-bytes from a SHA1-HMAC hash. The SHA1-HMAC key is a 17-byte text string including the NULL-terminator, a seperate HMAC key is used for retail/dev-units, this is determined via [[Configuration_Memory#ENVINFO|ENVINFO]] bit0. The data hashed with SHA1-HMAC is a 0x1C-byte buffer, which is described below.&lt;br /&gt;
&lt;br /&gt;
=== Hash Block ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8-byte StreetPass consoleID for the host, from the probe frames.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8-byte StreetPass consoleID for the client, from the probe frames.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x6&lt;br /&gt;
| MAC address for host.&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| 0x6&lt;br /&gt;
| MAC address for client.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== StreetPass Exchange ==&lt;br /&gt;
&lt;br /&gt;
While StreetPass is enabled, the 3DS constantly sends out Probe Requests with an SSID of &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;. Unlike beacons, which are actively advertising the device&#039;s presence, the 3DS is essentially actively looking for other 3DSes. This design is likely to limit impact to non-3DS WiFi capable devices. Each Probe Request contains basic information about that 3DS, including an identifier, and active StreetPass services. If another 3DS is in range, the second 3DS (#2) will respond with a Probe Response, to which the original 3DS (#1), and of the receiving device with every frame thereafter, will respond with an 802.11 Acknowledgement. 3DS(#1) then sends an 802.11 Action frame, as well as an additional Probe Request. The second 3DS sends back another Probe Response that begins the encrypted exchange between the two devices, no authentication/association is done here.&lt;br /&gt;
&lt;br /&gt;
The MAC address used in sleep-mode seems to change every time there&#039;s a StreetPass hit, as well as the last 8-bytes(StreetPass consoleID) of the Nintendo tag data. The MAC address + 8-byte StreetPass consoleID is seen to change every time the user enters and exits and Settings application if they have not had a StreetPass in an observed time period of 24 hours. It is uncertain how the 3DS determines when it can do a StreetPass again with another 3DS, or what information is actually used to track that. It may be related to how long that 3DS was in range constantly/out of range. 3DSes that are constantly in range of each other in sleep-mode, usually do StreetPass every 11 hours.&lt;br /&gt;
&lt;br /&gt;
=== Probe Request Frame ===&lt;br /&gt;
&lt;br /&gt;
Using Wireshark tool with a WiFi card in monitor mode allow you to see the data used to scan for other 3DS in the range. The below is a broadcast probe request from an 3DS while in standby mode, with SSID &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;. This SSID remains consistent across all 3DS units. This frame also contains a custom variable length Nintendo tag, which contains information regarding the offered StreetPass services. The sequence numbers for these probe request increment by 3 for every probe, until another 3DS responds with a probe response.&lt;br /&gt;
&lt;br /&gt;
  0000   00 00 1a 00 2f 48 00 00 19 7d 19 de 2a 00 00 00  ..../H...}..*...&lt;br /&gt;
  0010   12 16 9e 09 a0 00 c9 02 00 00 40 00 00 00 ff ff  ..........@.....&lt;br /&gt;
  0020   ff ff ff ff da 6b f7 22 f3 77 ff ff ff ff ff ff  .....k.&amp;quot;.w......&lt;br /&gt;
  0030   40 77 00 20 4e 69 6e 74 65 6e 64 6f 5f 33 44 53  @w. Nintendo_3DS&lt;br /&gt;
  0040   5f 63 6f 6e 74 69 6e 75 6f 75 73 5f 73 63 61 6e  _continuous_scan&lt;br /&gt;
  0050   5f 30 30 30 01 08 82 84 8b 0c 12 96 18 24 32 04  _000.........$2.&lt;br /&gt;
  0060   30 48 60 6c dd 15 00 1f 32 01 11 05 00 02 08 00  0H`l....2.......&lt;br /&gt;
  0070   00 f0 08 c8 34 6e 05 0f c9 c6 80 5b 6f bc 5a     ....4n.....[o.Z&lt;br /&gt;
&lt;br /&gt;
==== Nintendo Tag Format ====&lt;br /&gt;
&lt;br /&gt;
The offsets, in bytes, mentioned in the table below start at the beginning of the Nintendo tag ID, which is variable in length, and can be found right after the Vendor Specific OUI type of the 802.11 frame, which is often seen as a byte of &amp;quot;01&amp;quot;. Each one of the elements are discussed in more detail after the table. Note that this table represents a current theory on what each of the fields represent, with the argument stated in the corresponding sections.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Length&lt;br /&gt;
!  Purpose&lt;br /&gt;
!  Description&lt;br /&gt;
!  Example&lt;br /&gt;
|-&lt;br /&gt;
|  0x00&lt;br /&gt;
|  0x01&lt;br /&gt;
|  &#039;&#039;&#039;Protocol Identification&#039;&#039;&#039;&lt;br /&gt;
|  May be for protocol identification. All captures thus far show this value at 17, hexadecimal 11.&lt;br /&gt;
| 11&lt;br /&gt;
|-&lt;br /&gt;
|  0x01&lt;br /&gt;
|  0x01&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass Service Length&#039;&#039;&#039;&lt;br /&gt;
|  Length in bytes of only the StreetPass Services field.&lt;br /&gt;
|  05&lt;br /&gt;
|-&lt;br /&gt;
|  0x02&lt;br /&gt;
|  0x05&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass Services&#039;&#039;&#039;&lt;br /&gt;
|  Starting at the 0x02 offset, it appears to be a list of StreetPass services, each in length of 5 bytes. This continues on depending on the number of services the user has enabled at the time.&lt;br /&gt;
|  00 02 08 00 00&lt;br /&gt;
|-&lt;br /&gt;
|  varies&lt;br /&gt;
|  0x02&lt;br /&gt;
|  &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|  At the end of the StreetPass Services field is a two byte field that is the same among all devices thus far. Its purpose is unknown.&lt;br /&gt;
|  f0 08&lt;br /&gt;
|-&lt;br /&gt;
|  -0x08&lt;br /&gt;
|  0x08&lt;br /&gt;
|  &#039;&#039;&#039;StreetPass consoleID&#039;&#039;&#039;&lt;br /&gt;
|  Seen to change when the Settings app is used if there has not been a StreetPass tag recently. Also may change after each StreetPass hit and system power-off?&lt;br /&gt;
|  c8 34 6e 05 0f c9 c6 80&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Protocol Version =====&lt;br /&gt;
&lt;br /&gt;
Appears to represent a protocol version, or device identification. This field remains consistent on all devices, despite variable enabled StreetPass services or length of the tag. Could also represent region.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass Service Length =====&lt;br /&gt;
&lt;br /&gt;
This field is used to indicate the length of the StreetPass Services field. Removing and adding services has shown this field to increment and decrement in 5 bytes, or 11 bytes depending on the game. The StreetPass Services field has then expanded or reduced accordingly.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass Services =====&lt;br /&gt;
&lt;br /&gt;
The third field in the protocol header appears to be an arbitrary length list of StreetPass services enabled on the device. Each StreetPass service seems to be identified by a 5-byte ID. If you enable or disable services, the number of 5-byte IDs grows and shrinks within this list. Observed service IDs include:&lt;br /&gt;
&lt;br /&gt;
  Mii Plaza: 00 02 08 00 00&lt;br /&gt;
  Ridge Racer: 00 03 58 00 30&lt;br /&gt;
  Sims 3: 00 03 65 00 30&lt;br /&gt;
  Street Fighter: 00 03 05 00 02 (FF FF FF FF FF FF)&lt;br /&gt;
&lt;br /&gt;
The first 4 bytes are the titleID of the service, the last byte seems to contain flags.&lt;br /&gt;
&lt;br /&gt;
The last byte (flags) have been observed between those possibilities :&lt;br /&gt;
&lt;br /&gt;
  00000000&lt;br /&gt;
  00000010&lt;br /&gt;
  00010000&lt;br /&gt;
  00100000&lt;br /&gt;
  00110000&lt;br /&gt;
  00110010&lt;br /&gt;
&lt;br /&gt;
Only the bits 2,5,6 were used.&lt;br /&gt;
When set, the bit n°2 indicates the presence of a followinf 6-byte field filled with 0xff.&lt;br /&gt;
&lt;br /&gt;
Some services have a 6-byte field succeeding the StreetPass service that is just FF bytes (e.g. FF FF FF FF FF FF). The purpose of these is unknown, although may be used as data for a service, or as separator of some sort for different types of StreetPass services.&lt;br /&gt;
&lt;br /&gt;
Observed services (leading titleID 0x00 removed, 6*0xff ignored) on 68K probe requests between 2013-08-24 and 2014-06-29 in various european locations.&lt;br /&gt;
&lt;br /&gt;
The fact that a same titleID can have different flags should be noted.&lt;br /&gt;
&lt;br /&gt;
  0db6-00100000 5&lt;br /&gt;
  0db6-00110000 20&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Occurrences&lt;br /&gt;
!  TitleID &lt;br /&gt;
!  Flags&lt;br /&gt;
|-&lt;br /&gt;
| 131&lt;br /&gt;
| 0208&lt;br /&gt;
| 00000000&lt;br /&gt;
|-&lt;br /&gt;
| 58&lt;br /&gt;
| 0516&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 56&lt;br /&gt;
| 053f&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| 0306&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 44&lt;br /&gt;
| 0862&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| 09f1&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| 0db6&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 0516&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 0205&lt;br /&gt;
| 00110010&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 0ec4&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 0300&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 055d&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 08d3&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 053b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0916&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0306&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 0300&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0916&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0b1d&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0ec4&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 080f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 07c8&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 038a&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0f30&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0db6&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0910&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0862&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 053f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0522&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0ae2&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 09f1&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 08c5&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 038c&lt;br /&gt;
| 00000000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 033b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 030b&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0ba9&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0a53&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 08d3&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 07ad&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0751&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0402&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0f82&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0f5b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0e7f&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0bff&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0b1d&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0ad6&lt;br /&gt;
| 00010000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0a90&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0a05&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 073c&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 06da&lt;br /&gt;
| 00100000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 05aa&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 05a5&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 053b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 04ca&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 038a&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 033b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 030b&lt;br /&gt;
| 00110000&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0305&lt;br /&gt;
| 00000010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Unknown 2-byte Field =====&lt;br /&gt;
&lt;br /&gt;
The purpose of this field is not known yet. It has remained the same across all devices thus far. The value has always been observed as &#039;&#039;&#039;f008&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===== StreetPass consoleID =====&lt;br /&gt;
&lt;br /&gt;
When there&#039;s a StreetPass hit, and no StreetPass data changed on either of the 3DSes, no data is transferred besides probes? After turning off power, then powering on and entering sleepmode, the MAC doesn&#039;t change from prior to power off but the last 8-bytes of the Nintendo tag changes. This tag has been seen to not be sequential over time. After one of the new StreetPass content is handled, (running one of the StreetPass titles etc) this 8-byte StreetPass consoleID changes?&lt;br /&gt;
&lt;br /&gt;
=== Initial Probe Response Frame ===&lt;br /&gt;
&lt;br /&gt;
If a 3DS (#2) receives another device&#039;s probe request and has not yet tagged that device in an arbitrary amount of time (~12 hours), the receiving 3DS (#2) will respond with a Probe Response frame. The destination MAC address is the StreetPass MAC address of the 3DS (#1) that was transmitting the probe request, while the receiving device sets its StreetPass MAC address as the source address. This is important to note because further exchanges may cease using destination and/or source addresses.&lt;br /&gt;
&lt;br /&gt;
In the probe response, the 3DS (#2) appears to offer a channel of 1, 6, or 11. Different channels have been seen offered between the same set of 3DS for each StreetPass. Offered channels, and channel range most likely varies by region.&lt;br /&gt;
&lt;br /&gt;
The StreetPass Probe Response frame contains the same Nintendo tag in Probe Requests of the device that is transmitting the Probe Response frame.&lt;br /&gt;
&lt;br /&gt;
=== Subsequent Probe Request and Response Frames ===&lt;br /&gt;
&lt;br /&gt;
The 3DS (#1) that the Initial Probe Response is directed to will send an 802.11 Action frame back to the device. The sequence numbers at this point stop stepping up by 3, and instead increase by one based from each originating device&#039;s SN. It will then send another Probe Request, this time sent directly to the responding 3DS (#2) by specifying its MAC address in the destination field, and setting its own MAC address in the source address field. It also does not have a SSID specified in the frame, except the frame will contain a BSSID with the value of the 3DS (#2) that responded to the initial Probe, and thus acts as the master in the 802.11 exchange.&lt;br /&gt;
&lt;br /&gt;
=== Send Mode ===&lt;br /&gt;
The 3DS can mark StreetPass data with one of 4 Send Modes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!ID!!Send Mode!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0||EXCHANGE||StreetPass message exchange will only happen if both consoles can store the message of the other. E.g. the inbox isn&#039;t full. Example title: StreetPass Mii Plaza&lt;br /&gt;
|-&lt;br /&gt;
|1||RECV_ONLY||3DS doesn&#039;t have anything in its outbox so it is only receiving messages.&lt;br /&gt;
|-&lt;br /&gt;
|2||SEND_ONLY||&lt;br /&gt;
|-&lt;br /&gt;
|3||SEND_RECV||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== StreetPass Spoofing ==&lt;br /&gt;
&lt;br /&gt;
A streetpass &amp;quot;AP&amp;quot; was spoofed with hostapd by setting the SSID to &amp;quot;Nintendo_3DS_continuous_scan_000&amp;quot;, with the extra Nintendo tag from another 3DS&#039; probe request. Like 3DS&amp;lt;&amp;gt;3DS communications, the 3DS didn&#039;t authenticate or associate with the host. Streetpass communications use CCMP encryption. Eventually the 3DS stops communicating with the host since the host doesn&#039;t reply to any of the data frames, then sends a 802.11 &amp;quot;Action&amp;quot; frame, with category ID 0x7f and Nintendo&#039;s vendor ID: 00 1f 32.(However the 3DS keeps communicating with the above process repeatedly)&lt;br /&gt;
Communication with two 3DSes are the same as above except there&#039;s actual encrypted data sent to/from both consoles, unlike the fake host.&lt;br /&gt;
&lt;br /&gt;
==StreetPass Relay==&lt;br /&gt;
This feature was implemented in version [[6.2.0-12]].&lt;br /&gt;
&lt;br /&gt;
It was probably controlled over the [[SpotPass#policylist]]. When connecting to a Nintendo Zone Hotspot the console will send an additional GET parameter named &#039;&#039;ap&#039;&#039;. Adding the following priority to the policylist will instruct the console to upload its data (The level tag can probably be lower and must not be HIGH).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;Priority&amp;gt;&lt;br /&gt;
    &amp;lt;TitleId&amp;gt;0004013000003400&amp;lt;/TitleId&amp;gt;&lt;br /&gt;
    &amp;lt;TaskId&amp;gt;sprelay&amp;lt;/TaskId&amp;gt;&lt;br /&gt;
    &amp;lt;Level&amp;gt;HIGH&amp;lt;/Level&amp;gt;&lt;br /&gt;
    &amp;lt;Persistent&amp;gt;false&amp;lt;/Persistent&amp;gt;&lt;br /&gt;
    &amp;lt;Revive&amp;gt;false&amp;lt;/Revive&amp;gt;&lt;br /&gt;
  &amp;lt;/Priority&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
The following additional headers will be send in the request:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
|X-Boss-Apinfo||Access Point Info. The same number that is send with the policylist GET parameter ap. Probably identifies the SSID of connected Nintendo Zone Hotspot. If not connected to Nintendo Zone Hotspot this will be an empty string.||02012600000&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Bssid||The MAC address of the access point the 3DS is connected to.||11:22:33:44:55:66&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Country||2 letter country code of the set language.||ES&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Region||3 letter region code of the 3DS&#039; region.||EUR&lt;br /&gt;
|-&lt;br /&gt;
|X-Boss-Userid||A unique 16 character long hexadecimal string that represents a 64-bit integer. It is unknown how this number is generated.||6966442DE2EED063&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the request body there will be a file named &#039;&#039;spr-meta&#039;&#039; and a file per registered StreetPass game &#039;&#039;spr-slotXX&#039;&#039; where XX is an incrementing number. If the game contains not messages in its outbox so the size of the file would be 0 then no file is created and sent but it will still be listed in the spr-meta file.&lt;br /&gt;
&lt;br /&gt;
===spr-meta file===&lt;br /&gt;
The spr-meta file is a text file which may contain the following content.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
slotsize: 5&lt;br /&gt;
spr-slot01: 3,000EC400,10664&lt;br /&gt;
spr-slot02: 2,0007AD00,3648&lt;br /&gt;
spr-slot03: 3,00030000,3804&lt;br /&gt;
spr-slot04: 1,00051600,0&lt;br /&gt;
spr-slot05: 0,00020800,28228&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The comma seperated list after each spr-slotXX has the following meaning&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
|Send Mode||StreetPass ID (Low title ID of the game. May be from a different region like japan.)||Size of the file in bytes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===spr-slotXX files===&lt;br /&gt;
These are binary files. They begin a with a header with the follwing structure.&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
!Offset!!Size!!Description&lt;br /&gt;
|-&lt;br /&gt;
|0x00||0x04||Magic number 0x00006161&lt;br /&gt;
|-&lt;br /&gt;
|0x04||0x04||Size of the file in bytes including this header&lt;br /&gt;
|-&lt;br /&gt;
|0x08||0x04||StreetPass ID (Low title ID of the game. May be from a different region like japan.)&lt;br /&gt;
|-&lt;br /&gt;
|0x0C||0x04||Unknown&lt;br /&gt;
|-&lt;br /&gt;
|0x10||0x04||Number of messages after this header&lt;br /&gt;
|}&lt;br /&gt;
After the header follows the StreetPass message exactly as it is stored in the outbox of [[CECD_Savegame#File_.3C12-char_ID.3E|CEC Save]].&lt;br /&gt;
&lt;br /&gt;
===Response===&lt;br /&gt;
The following headers are expected:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
!Key!!colspan=3|Value!!Example&lt;br /&gt;
|-&lt;br /&gt;
|X-Spr-SlotXX-Result||StreetPass ID||Send Mode||Size of the file in bytes||X-Spr-Slot01-Result: 000EC400,3,17760&lt;br /&gt;
|}&lt;br /&gt;
It expects a header for every game it sent in the request.&lt;br /&gt;
&lt;br /&gt;
The body is expected to contain binary data with the same structure as the spr-slotXX files in the request. The order of these must be the same as the reponse header order.&lt;br /&gt;
&lt;br /&gt;
== Structs, Data Types ==&lt;br /&gt;
Streetpass uses multiple different structs and data types for storing and transporting data.&lt;br /&gt;
&lt;br /&gt;
=== MessageId ===&lt;br /&gt;
This datatype holds a per-console-per-title unique message id.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| The message id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Timestamp12 ===&lt;br /&gt;
This holds a timestamp in 12 bytes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Year&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Month&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Day&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Weekday&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Hour&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Minute&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8&lt;br /&gt;
| Second&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| Millisecond&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Message (0x6060) ===&lt;br /&gt;
MessageHeader:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6060 (&amp;lt;code&amp;gt;``&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16&lt;br /&gt;
| Padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_size&lt;br /&gt;
| The size in bytes of the entire message, including all headers and hmac&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| total_header_size&lt;br /&gt;
| The size in bytes of all headers, including the extra headers&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| body_size&lt;br /&gt;
| The size in bytes of the body of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id2&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| batch_id&lt;br /&gt;
| The sending client sets an ID here if multiple messages should be batched together into one transaction&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| transfer_id&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x08&lt;br /&gt;
| MessageId&lt;br /&gt;
| message_id&lt;br /&gt;
| The ID of the sending message&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_version&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x08&lt;br /&gt;
| MessageId&lt;br /&gt;
| message_id_2&lt;br /&gt;
| The message ID that this message is referring to, e.g. the individual responses in Streetpass Mii Plaza&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| flags&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x35&lt;br /&gt;
| 0x01&lt;br /&gt;
| SendMethod&lt;br /&gt;
| send_method&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x36&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| unopened&lt;br /&gt;
| Set if the message hasn&#039;t been opened yet&lt;br /&gt;
|-&lt;br /&gt;
| 0x37&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| is_new&lt;br /&gt;
| Set if the message is new&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x08&lt;br /&gt;
| u64&lt;br /&gt;
| sender_id&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x08&lt;br /&gt;
| u64&lt;br /&gt;
| sender_id_2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| sent&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| received&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| created&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| send_count&lt;br /&gt;
| How often this message can be sent&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| forward_count&lt;br /&gt;
| How often this message can be forwarded&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| user_data&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
ExtMessageHeader:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| type&lt;br /&gt;
| The type of the extra header&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| size&lt;br /&gt;
| Size, in bytes, of the extra header&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| body&lt;br /&gt;
| The body of the extra header&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Message:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x70&lt;br /&gt;
| MessageHeader&lt;br /&gt;
| header&lt;br /&gt;
| The header of the message&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
|&lt;br /&gt;
| ExtMessageHeader[]&lt;br /&gt;
| ext_headers&lt;br /&gt;
| An array of the extra headers for the message. The array keeps filling until the length no more until &amp;lt;code&amp;gt;header.total_header_size&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| body&lt;br /&gt;
| The actual body/payload of the message&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 0x20&lt;br /&gt;
| u8[0x20]&lt;br /&gt;
| hmac&lt;br /&gt;
| The hmac over the body with the hmac_key&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Slot (0x6161) ===&lt;br /&gt;
The slot groups multiple messages of one title id together into a single struct&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6161 (&amp;lt;code&amp;gt;aa&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| size&lt;br /&gt;
| The size of bytes of the entire slot, including the header and all messages it contains&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| batch_id&lt;br /&gt;
| If the slot contains batched messages, the batch id is set to the same one as those messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| message_count&lt;br /&gt;
| The total number of messages in this slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
| Message[]&lt;br /&gt;
| messages&lt;br /&gt;
| An array of length &amp;lt;code&amp;gt;message_count&amp;lt;/code&amp;gt; all the messages of this slot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoxInfo (0x6262) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6262 (&amp;lt;code&amp;gt;bb&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| file_size&lt;br /&gt;
| The size of the box info in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_box_size&lt;br /&gt;
| The maximum allowed size of the box in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| box_size&lt;br /&gt;
| The current size of the box in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_num_messages&lt;br /&gt;
| The maximum number of messages that the box can hold&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_messages&lt;br /&gt;
| The current number of messages in the box&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_batch_size&lt;br /&gt;
| The maximum size of a bach, in number of messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| max_message_size&lt;br /&gt;
| The maximum size of a message, in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
|&lt;br /&gt;
| MessageHeader[]&lt;br /&gt;
| message_headers&lt;br /&gt;
| An array of all message headers in this box of length &amp;lt;code&amp;gt;num_messages&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MBoxInfo (0x6363) ===&lt;br /&gt;
This holds information on the message box, including both inbox and outbox&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6363 (&amp;lt;code&amp;gt;cc&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id for this mbox&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| private_id&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x01&lt;br /&gt;
| u8&lt;br /&gt;
| mbox_type_flags&lt;br /&gt;
| 0x01: normal programs, 0x06: system programs, 0x80: silent notif&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| enabled&lt;br /&gt;
| Weather this message box is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x20&lt;br /&gt;
| u8[0x20]&lt;br /&gt;
| hmac_key&lt;br /&gt;
| The hmac key to make hmacs for messages. These are unique per title, however they are the same for all consoles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| last_accessed&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unread&lt;br /&gt;
| Does this message box contain unread messages?&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_new&lt;br /&gt;
| Does this message box contain new messages?&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unknown&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| 0x01&lt;br /&gt;
| bool&lt;br /&gt;
| flag_unknown&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| last_received&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Timestamp12&lt;br /&gt;
| unknown_timestamp&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 0x6565 ===&lt;br /&gt;
SlotMetadata:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| title_id&lt;br /&gt;
| The title id of the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| SendMethod&lt;br /&gt;
| send_method&lt;br /&gt;
| The send method for the slot&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| body_size&lt;br /&gt;
| The size of the slot body in bytes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| count&lt;br /&gt;
| Number of messages&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x14&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Struct:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Length&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6565 (&amp;lt;code&amp;gt;ee&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x28&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;unknown&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x360&lt;br /&gt;
| SlotMetadata[0x18]&lt;br /&gt;
| slots&lt;br /&gt;
| Metadata of all slots&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== OBIndex (0x6767) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6767 (&amp;lt;code&amp;gt;gg&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_messages&lt;br /&gt;
| The number of messages in the outbox&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
|&lt;br /&gt;
| MessageId[]&lt;br /&gt;
| message_ids&lt;br /&gt;
| An array of the message IDs in the outbox, of length &amp;lt;code&amp;gt;num_messages&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== MBoxList (0x6868) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| magic&lt;br /&gt;
| Equals 0x6868 (&amp;lt;code&amp;gt;hh&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| 0x02&lt;br /&gt;
| u16&lt;br /&gt;
| padding&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| version&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x04&lt;br /&gt;
| u32&lt;br /&gt;
| num_boxes&lt;br /&gt;
| The number of boxes (= games with streetpass enabled)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x180&lt;br /&gt;
| char[0x18][0x10]&lt;br /&gt;
| box_names&lt;br /&gt;
| A 0x18-long array of all the box names (= hex encoded title ids) of games with streetpass enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Nintendo Software]]&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22810</id>
		<title>CECD Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22810"/>
		<updated>2024-12-02T10:09:25Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Add information from reverse-engineering for NetPass&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
Streetpass stuff.&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C2&lt;br /&gt;
| Open/[[CECDU:OpenRawFile|OpenRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| Read/[[CECDU:ReadRawFile|ReadRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030104&lt;br /&gt;
| [[CECDU:ReadMessage|ReadMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040106&lt;br /&gt;
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050042&lt;br /&gt;
| Write/[[CECDU:WriteRawFile|WriteRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060104&lt;br /&gt;
| [[CECDU:WriteMessage|WriteMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070106&lt;br /&gt;
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080102&lt;br /&gt;
| [[CECDU:Delete|Delete]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000900C2&lt;br /&gt;
| SetData (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A00C4&lt;br /&gt;
| ReadData/[[CECDU:GetSystemInfo|GetSystemInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| [[CECDU:Start|Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| [[CECDU:Stop|Stop]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| GetCecInfoBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetCecdState (returns CecStateAbbreviated in cmdbuf[2])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110104&lt;br /&gt;
| [[CECDU:OpenAndWrite|OpenAndWrite]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120104&lt;br /&gt;
| [[CECDU:OpenAndRead|OpenAndRead]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0082&lt;br /&gt;
| [[CECDU:GetEventLog|GetEventLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0000&lt;br /&gt;
| [[CECDU:GetEventLogStart|GetEventLogStart]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| [[CECDU:GetEventLogEntryCount|GetEventLogEntryCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0021....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecDataPathType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_LIST || 1&lt;br /&gt;
| data:/CEC/MBoxList____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_INFO || 2&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxInfo____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_INFO || 3&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INFO  || 4&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INDEX  || 5&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/OBIndex_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_MSG  || 6&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_MSG  || 7&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_ROOT_DIR  || 10&lt;br /&gt;
| data:/CEC&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_DIR  || 11&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_DIR  || 12&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_DIR  || 13&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__&lt;br /&gt;
|-&lt;br /&gt;
| || 101 thru 199 (inclusive)&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.0&amp;lt;i-100&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_ICON  || 101&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.001&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_TITLE  || 110&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecCommand ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NONE&lt;br /&gt;
| 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_START&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_START&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCAN&lt;br /&gt;
| 3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCANWAIT&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STARTSCAN&lt;br /&gt;
| 5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESCAN&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_RESUME&lt;br /&gt;
| 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOPWAIT&lt;br /&gt;
| 0xA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP&lt;br /&gt;
| 0xB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE&lt;br /&gt;
| 0xC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE_WAIT&lt;br /&gt;
| 0xD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_FILTER&lt;br /&gt;
| 0xE&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_STOP&lt;br /&gt;
| 0xF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_START&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_EXIT&lt;br /&gt;
| 0x11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS&lt;br /&gt;
| 0x12&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE&lt;br /&gt;
| 0x13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_END&lt;br /&gt;
| 0x15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecStateAbbreviated ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_IDLE&lt;br /&gt;
| 1&lt;br /&gt;
| Corresponds to CEC_STATE_IDLE&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_INACTIVE&lt;br /&gt;
| 2&lt;br /&gt;
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_SCANNING&lt;br /&gt;
| 3&lt;br /&gt;
| Corresponds to CEC_STATE_SCANNING&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_WLREADY?&lt;br /&gt;
| 4&lt;br /&gt;
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_OTHER&lt;br /&gt;
| 5&lt;br /&gt;
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecMessageId ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:s&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0401....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020002&lt;br /&gt;
| GetCecInfoEventHandleSys&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A....&lt;br /&gt;
| SprCreate&lt;br /&gt;
|-&lt;br /&gt;
| 0x040B....&lt;br /&gt;
| SprInitialise&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0042&lt;br /&gt;
| SprGetSendSlotsMetadata&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0082&lt;br /&gt;
| SprGetSlot title_id, write_buffer, buffer_size&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F....&lt;br /&gt;
| SprFinaliseSend&lt;br /&gt;
|-&lt;br /&gt;
| 0x0410....&lt;br /&gt;
| SprStartRecv&lt;br /&gt;
|-&lt;br /&gt;
| 0x04110042&lt;br /&gt;
| SprAddSlotsMetadata&lt;br /&gt;
|-&lt;br /&gt;
| 0x041200C2&lt;br /&gt;
| SprbAddSlot&lt;br /&gt;
|-&lt;br /&gt;
| 0x0413....&lt;br /&gt;
| SprFinaliseRecv&lt;br /&gt;
|-&lt;br /&gt;
| 0x0414....&lt;br /&gt;
| SprDone bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x04150000&lt;br /&gt;
| [[CECDS:GenHashConsoleUnique|GenHashConsoleUnique]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04160002&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0417....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecSprStatus ===&lt;br /&gt;
This enum is used internally of the cecd service to keep track of which state of an SPR exchange it is in currently.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_START&lt;br /&gt;
| 0&lt;br /&gt;
| The internal objects were just created&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_RECV_INIT&lt;br /&gt;
| 1&lt;br /&gt;
| The internal objects for sending and receiving have been initialised&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_READY&lt;br /&gt;
| 2&lt;br /&gt;
| The sysmodule is ready for SPR Send, now it is possible to fetch the SPR data needed&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND&lt;br /&gt;
| 3&lt;br /&gt;
| The other program should be sending the SPR request now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_READY&lt;br /&gt;
| 4&lt;br /&gt;
| The sysmodule is ready to receive SPR data now&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE&lt;br /&gt;
| 5&lt;br /&gt;
| The sysmodule is done receiving SPR data&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED_TCP&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_CONNECTION_FINISHED&lt;br /&gt;
| 7&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_SEND_POST&lt;br /&gt;
| 8&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_RECEIVE_POST&lt;br /&gt;
| 9&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHING&lt;br /&gt;
| 0x0F&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|-&lt;br /&gt;
| CEC_SPR_FINISHED&lt;br /&gt;
| 0x10&lt;br /&gt;
| ??? Enum usage not found in source&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:ndm&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| Deinitialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ResumeDaemon&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| SuspendDaemon(bool immediately)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| QueryStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| GetNZoneInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070042&lt;br /&gt;
| SetNZoneSSIDList&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080042&lt;br /&gt;
| SetNZoneMacFilter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=IPC&amp;diff=22809</id>
		<title>IPC</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=IPC&amp;diff=22809"/>
		<updated>2024-12-01T20:07:23Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Buffer Mapping Translation */ correct incorrect statement&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The 3DS software stack follows a server/client architecture, where common functionality is provided by global server processes through interfaces called &#039;&#039;ports&#039;&#039; and &#039;&#039;services&#039;&#039;. Applications can access this functionality by creating &#039;&#039;sessions&#039;&#039; to the provided services. Technically, this is implemented using &#039;&#039;interprocess communication&#039;&#039; (IPC).&lt;br /&gt;
&lt;br /&gt;
== Concepts ==&lt;br /&gt;
&lt;br /&gt;
=== Sessions ===&lt;br /&gt;
&lt;br /&gt;
Sessions are communication channels consisting of a client and server, through which data can be exchanged in the form of a request and response, respectively. Through sessions, the standard [[#Command Structure|IPC command protocol]] is implemented. Clients use their client session handle to send IPC commands to the server using svcSendSyncRequest, while servers use svcReplyAndReceive to reply. Client sessions can&#039;t be used with svcReplyAndReceive. In both cases, the kernel takes care of transferring IPC command data from the [[Thread Local Storage]] of the sending thread to the TLS of the receiving thread. Sessions can be created through svcCreateSession, which provides the caller with the client and server handles.&lt;br /&gt;
&lt;br /&gt;
Sessions are used in their raw form to implement [[FS:OpenFile|file handles]]. In this case, fs-module creates a raw session using svcCreateSession, and provides the &amp;quot;fs:USER&amp;quot; client with the resulting client session handle, keeping the server session handle for its own use. These sessions expose their [[Filesystem services#File service|own set of IPC commands]] which act on the file that was opened through fs:USER.&lt;br /&gt;
&lt;br /&gt;
=== Ports ===&lt;br /&gt;
&lt;br /&gt;
Ports are interfaces for managing multiple client sessions to the same high-level server. Ports are created through svcCreatePort, and can be global or private. A global port is created by passing a name for the port to svcCreatePort. Clients can start IPC sessions to global ports by connecting to the port using svcConnectToPort, passing the desired port name. If the port is private, it is not possible to create a session through svcConnectToPort - sessions can only be created if one has a handle to the port itself, obtained from the call to svcCreatePort. When a client wishes to connect to a port (i.e. create a session), the server must accept the new session using svcAcceptSession. The kernel notifies the server whenever a new session is incoming via the server&#039;s port handle. The server can wait for this notification through svcWaitSynchronization or svcReplyAndReceive.&lt;br /&gt;
&lt;br /&gt;
The two global ports usually found on retail are &amp;quot;srv:&amp;quot; ([[Services|service manager]]) and &amp;quot;err:f&amp;quot; ([[ErrDisp]]).&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;br /&gt;
&lt;br /&gt;
Services are an abstraction of ports that are managed by service manager. Services cannot be connected to through svcConnectToPort, as the underlying port is a private port. The service name is instead entirely handled by service manager, and the kernel is not aware of it. Clients are instead expected to open a session to a service using the &amp;quot;srv:&amp;quot; port command [[SRV:GetServiceHandle|GetServiceHandle]]. The client process must pass an access permission check for each service (by name) that it attempts to request a session with. These permissions are granted in the &amp;quot;service access control&amp;quot; of the title&#039;s [[NCCH/Extended Header#ARM11 Local System Capabilities|extended header]]. A service is registered with service manager using the command [[SRV:RegisterService|RegisterService]].&lt;br /&gt;
&lt;br /&gt;
Internally, service manager creates services by creating a private port which it associates with the desired service name. The resulting server port handle is returned in the RegisterService response, for the server&#039;s own use (see ports). To create sessions to a service on behalf of a client, service manager uses svcCreateSessionToPort, passing the client port handle it obtained when creating the port, to the kernel. Service manager then returns the resulting session handle to the client in the GetServiceHandle response.&lt;br /&gt;
&lt;br /&gt;
The majority of 3DS inter-process communication is implemented as services.&lt;br /&gt;
&lt;br /&gt;
=== Shared Memory ===&lt;br /&gt;
&lt;br /&gt;
Communication through port/service requests and replies may incur a big bottleneck when exchanging large amounts of data because the kernel needs to transfer the data between the two involved processes. There is hence a complementary feature to share the same physical memory between two processes. For this purpose, one process needs to create a block of shared memory using svcCreateMemoryBlock such that the other process can map it into its own virtual memory address space using svcMapMemoryBlock. The memory block handle for the latter is provided using a regular IPC command.&lt;br /&gt;
&lt;br /&gt;
Many services use shared memory as a secondary command interface (e.g. [[GSP_Shared_Memory|GSP]]), the processing of which is triggered through an IPC request (cf. [[GSPGPU:TriggerCmdReqQueue]]).&lt;br /&gt;
&lt;br /&gt;
== Message Structure ==&lt;br /&gt;
&lt;br /&gt;
IPC requests are written to the [[Thread Local Storage]] at offset 0x80 and submitted using [[SVC|svcSendSyncRequest]]. If the kernel was able to dispatch the request, the server reply will be written to TLS+0x80 before svcSendSyncRequest returns. By convention, the second word of the response data is an error code (or 0 on success). IPC requests and IPC replies follow the same structure.&lt;br /&gt;
&lt;br /&gt;
Every IPC message starts with a u32 header code. Parameters (if any) are written following this header. There are &amp;quot;normal parameters&amp;quot;, which are fixed-size words, and there are &amp;quot;translate parameters&amp;quot;, which are of flexible size and each of which begins with a header. The entire command has the following structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Word&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| x&lt;br /&gt;
| Normal parameters&lt;br /&gt;
|-&lt;br /&gt;
| 1+x&lt;br /&gt;
| y&lt;br /&gt;
| Translate parameters&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The IPC message header has the following structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-5&lt;br /&gt;
| Total size in words of the translate parameters (=y). Note that this is in general different from the number of translate parameters&lt;br /&gt;
|-&lt;br /&gt;
| 6-11&lt;br /&gt;
| Number of normal parameters (=x)&lt;br /&gt;
|-&lt;br /&gt;
| 12-15&lt;br /&gt;
| Unused&lt;br /&gt;
|-&lt;br /&gt;
| 16-31&lt;br /&gt;
| Command ID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When calling svcSendSyncRequest, the command id specifies a function specific to the target service to call. When calling svcReplyAndReceive, the command ID is generally ignored. However if it&#039;s 0xffff (and 0 is passed for the reply target handle), the kernel will omit the IPC reply and just wait for incoming IPC requests.&lt;br /&gt;
&lt;br /&gt;
Each translate parameter starts with a translation descriptor:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1-3&lt;br /&gt;
| Translation type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Translate parameters are modified/translated transparently by the kernel. They are used to transfer handles/buffers between the different processes.&lt;br /&gt;
&lt;br /&gt;
The type of parameter is described by the bits 1-3 in the translation descriptor. Parameter types accepted for sending by the kernel are: 0, 1, 2, 5, 6, 7. &lt;br /&gt;
&lt;br /&gt;
For replies, only 0, 1, 5, 6, 7 are allowed. In other words any type 2 fields must be zeroed before calling svcReplyAndReceive on the server-side. For replies, type 0, 1, and 2 are ignored. Types 5, 6, and 7 do something with the mem pointer upon reply. The type 0 descriptor can be used to ignore parameters. The number of parameters covered by a type-0 descriptor is (desc &amp;gt;&amp;gt; 26) + 1.&lt;br /&gt;
&lt;br /&gt;
=== Handle Translation ===&lt;br /&gt;
&lt;br /&gt;
Translation type 0 is used to send handles across processes. The corresponding translation descriptor has the following structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| If set, the handles are closed for the caller. Interaction with bit5 unknown.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| If set, the following handles are replaced by the process ID. Otherwise, translate each handle between client and server.&lt;br /&gt;
|-&lt;br /&gt;
| 26-31&lt;br /&gt;
| Number of handles following this descriptor (minus one).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Usage examples:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; |  Usual form&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ((num_handles-1)&amp;lt;&amp;lt;26)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;handle 0&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;handle 1&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
| Copies the given KHandles to the receiving process, i.e. creating new handles in the target process while keeping around the ones of the source process. When a handle value is 0x0, value 0x0 is written to the destination cmdbuf without doing any actual handle-transfer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; ((num_handles-1)&amp;lt;&amp;lt;26)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;handle 0&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;handle 1&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
| Moves the given KHandles to the receiving process, i.e. creating new handles in the target process and closing the ones of the source process. When a handle value is 0x0, value 0x0 is written to the destination cmdbuf without doing any actual handle-transfer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000020&lt;br /&gt;
&amp;lt;placeholder&amp;gt;&lt;br /&gt;
| Let kernel set value to calling process ProcessID.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Static Buffer Translation ===&lt;br /&gt;
&lt;br /&gt;
Each thread may set up up to 16 static buffer descriptors in their [[Thread Local Storage]] at offset 0x180. These contain information about buffers in the thread&#039;s memory space that may be used for information exchange for communication with other processes. In particular, a static buffer descriptor encodes the address and size of a buffer.&lt;br /&gt;
&lt;br /&gt;
Using IPC requests, data can be transferred from any location in the source process to one of the static buffers set up in the target process. This is done using a translation descriptor of type 1, which is followed by a pointer to the source data. The translation descriptor has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1-3&lt;br /&gt;
| Translation type (characteristically 1)&lt;br /&gt;
|-&lt;br /&gt;
| 10-13&lt;br /&gt;
| Static buffer index of the receiving process &lt;br /&gt;
|-&lt;br /&gt;
| 14-31&lt;br /&gt;
| Size in bytes of the transferred data. Specifying an amount larger than the target static buffer will result in a kernelpanic. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When encountering such a translation descriptor, the kernel will look up the static buffer address and size corresponding to the given index and (if the buffer can hold the requested amount of data) will copy the data to the specified location.&lt;br /&gt;
&lt;br /&gt;
Note that the translation descriptor and static buffer descriptor share the same layout. However, it is unknown whether the kernel ever reads fields other than the buffer address and size when dealing with static buffer descriptors.&lt;br /&gt;
&lt;br /&gt;
Usage examples:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; |  Usual form&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (size&amp;lt;&amp;lt;14) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (static_buffer_id&amp;lt;&amp;lt;10)&lt;br /&gt;
&amp;lt;ptr&amp;gt;&lt;br /&gt;
| The corresponding value contains a ptr to a buffer of said size, that should be copied to an already set-up buffer in destination process at [[Thread Local Storage]] offset 0x180 + static_buffer_id*8. The static_buffer_id is only 4 bits, making it possible for at most up to 16 buffers in total per thread.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Mapping Translation ===&lt;br /&gt;
&lt;br /&gt;
The IPC subsystem can temporarily map a whole buffer of the sender&#039;s memory into the receiver&#039;s memory space. This is useful for large buffers, for which the overhead of copying static buffer data around would be too expensive.&lt;br /&gt;
&lt;br /&gt;
This kind of translation is enabled by setting bit3 in the translation descriptor. The other two bits of what&#039;s documented as the translation type above are used to specify buffer access permissions of the source process.&lt;br /&gt;
&lt;br /&gt;
Buffers will get mapped at virtual address 0x04000000+ in the destination process. When this translation descriptor is submitted to the kernel through svcReplyAndReceive, the given buffer will be unmapped from the sending process(otherwise the buffer will be left mapped after the cmd-reply is finished). Regardless of the descriptor used here, the MMU-table entries for the source-process(from svcSendSyncRequest) buffers are not changed: memory permissions are left at the original while commands are being processed. The memory permissions for buffers at 0x04000000+ is always RW-, regardless of the actual memory permissions for the source-process buffer. Bitmask 0xFFF(low 12-bits) of the start address of each buffer for 0x04000000+ is the same as bitmask 0xFFF from the source-process buffer address.&lt;br /&gt;
&lt;br /&gt;
The buffer address written into the destination cmdbuf by the kernel with svcSendSyncRequest is the allocated 0x04000000+ buffer. When doing the same with svcSendSyncRequest, the buffer address is the same one from the source cmdbuf(0x04000000+).&lt;br /&gt;
&lt;br /&gt;
The first and last pages of the buffer at 0x04000000+ are allocated under the BASE memregion(with data being copied to/from the original source-process buffer as needed), with the rest being mapped to the original buffer physmem. When the source-process buffer is 0x1000-byte aligned, the first page for 0x04000000+ is mapped directly into the original buffer physmem instead of allocating BASE memory(likewise for the last page when the buffer size is 0x1000-byte aligned).&lt;br /&gt;
&lt;br /&gt;
Each buffer at 0x04000000+ has 1 page of unmapped memory before and after the mapped memory, used for separating each buffer. Hence, the first buffer&#039;s page at 0x04000000+ is always mapped starting at 0x04001000 not 0x04000000.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1-2&lt;br /&gt;
| Access permission flags for the source process: 1=read-only, 2=write-only, 3=read/write. Specifying 0 will cause a kernel panic.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Characteristically 1 for this translation type.&lt;br /&gt;
|-&lt;br /&gt;
| 4-31&lt;br /&gt;
| Size in bytes of the shared memory block.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Usage examples:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; |  Usual form&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008&lt;br /&gt;
| This command will cause a kernel panic.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;0x0000000A | (size&amp;lt;&amp;lt;4)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;ptr&amp;gt;&lt;br /&gt;
| The corresponding value contains a ptr to a buffer of said size. The buffer specified by the source process must have read permission(tested on hardware with a read-only buffer). Used for input buffers.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (size&amp;lt;&amp;lt;4)&lt;br /&gt;
&amp;lt;ptr&amp;gt;&lt;br /&gt;
| The corresponding value contains a ptr to a buffer of said size. The buffer specified by the source process must have write permission. Used for output buffers. In the destination process with the buffer mapped at 0x04000000+, that buffer has same content as the buffer from the source buffer(like descriptor 0x0000000A). When handling command requests this is handled the same way as 0x0000000A, besides the descriptor type written into the dst cmdbuf and memory permissions.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (size&amp;lt;&amp;lt;4)&lt;br /&gt;
&amp;lt;ptr&amp;gt;&lt;br /&gt;
| The corresponding value contains a ptr to a buffer of said size. The buffer specified by the source process must have read permission during cmd-request handling(write permission is checked during cmd-reply handling for the original buffer). Some calls like [[CECDU:WriteMessageWithHMAC]] use it, however it is unsure as to why. When handling command requests this is handled the same way as 0x0000000A, and for handling command replies this is handled the same way as 0x0000000C(besides the descriptor type written into the dst cmdbuf for both of these).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Usage Examples for other Translation Types ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; |  Usual form&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x00000004 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (size&amp;lt;&amp;lt;8) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (static_buffer_id&amp;lt;&amp;lt;4)&lt;br /&gt;
&amp;lt;ptr&amp;gt;&lt;br /&gt;
| This is typically used for RW buffers over PXI, but any process can use this. The address written to the destination cmd-buf is a phys-addr for a table located in the corresponding static buffer of the receiving process (which must be provided by the latter, otherwise the kernel dereferences NULL). Each static buffer needs to be page-aligned and musn&#039;t exceed a page&#039;s length (kernelpanic otherwise). This table contains the phys-addrs for the actual data, the array entries have the following format: {u32 *datachunk_physaddr, u32 datachunk_bytesize}.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x00000006 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (size&amp;lt;&amp;lt;8) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; (static_buffer_id&amp;lt;&amp;lt;4)&lt;br /&gt;
&amp;lt;ptr&amp;gt;&lt;br /&gt;
| Same as above except for read-only buffer. Prior(?) to the kernel version which implemented memory-permission checking for PXI buffers, this was unused and hence triggered a kernelpanic.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SVCs ==&lt;br /&gt;
&lt;br /&gt;
=== svcReplyAndReceive ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature:&#039;&#039;&#039;&lt;br /&gt;
 Result ReplyAndReceive(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)&lt;br /&gt;
&lt;br /&gt;
In a single operation, sends a IPC reply and waits for a new request. &amp;lt;code&amp;gt;handles&amp;lt;/code&amp;gt; should be a pointer to an array of &amp;lt;code&amp;gt;handleCount&amp;lt;/code&amp;gt; handles.&amp;lt;sup&amp;gt;TODO: Are only port/session handles supported?&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;replyTarget&amp;lt;/code&amp;gt; should contain a handle to the session to send the reply to. (This is usually the session from which we received the previous request.)&lt;br /&gt;
If &amp;lt;code&amp;gt;replyTarget&amp;lt;/code&amp;gt; is 0, no reply and the call will simply wait for an incoming event.&amp;lt;sup&amp;gt;TODO: It doesn&#039;t seem like the 0xFFFF0000 command id mentioned in the above sections is necessary, but needs confirmation.&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon returning, &amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt; will contain an index into &amp;lt;code&amp;gt;handles&amp;lt;/code&amp;gt; specifying which object changed state.&lt;br /&gt;
If it&#039;s a server port endpoint, it means that there is a new incoming connection on that port which should be accepted using svcAcceptSession.&lt;br /&gt;
If it&#039;s a server session endpoint it means that we received a request from that session and should process and then reply to it by calling svcReplyAndReceive again with &amp;lt;code&amp;gt;replyTarget&amp;lt;/code&amp;gt; set to that session&#039;s handle.&lt;br /&gt;
&lt;br /&gt;
An example of a server svcReplyAndReceive loop is:&lt;br /&gt;
&lt;br /&gt;
 #define MAX_CLIENTS 4&lt;br /&gt;
 Handle server_port = ...;&lt;br /&gt;
 s32 requesting_index;&lt;br /&gt;
 Handle handles[1 + MAX_CLIENTS] = { server_port };&lt;br /&gt;
 s32 connected_clients = 0;&lt;br /&gt;
 Handle reply_target = 0;&lt;br /&gt;
 &lt;br /&gt;
 while (true) {&lt;br /&gt;
     Result res = svcReplyAndReceive(&amp;amp;requesting_index, handles, 1 + connected_clients, reply_target);&lt;br /&gt;
 &lt;br /&gt;
     if (res == 0xC920181A) {&lt;br /&gt;
         // Session was closed by remote&lt;br /&gt;
         // TODO: Handle disconnects&lt;br /&gt;
         reply_target = 0;&lt;br /&gt;
         continue;&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     if (requesting_index == 0) {&lt;br /&gt;
         // New connection in server_port&lt;br /&gt;
         ASSERT(connected_client &amp;lt; MAX_CLIENTS);&lt;br /&gt;
         svcAcceptSession(&amp;amp;handles[1 + connected_clients++], server_port);&lt;br /&gt;
         reply_target = 0;&lt;br /&gt;
         continue;&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     reply_target = handles[requesting_index];&lt;br /&gt;
 &lt;br /&gt;
     // Handle command here and write reply to command buffer&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECDS:GenHashConsoleUnique&amp;diff=22808</id>
		<title>CECDS:GenHashConsoleUnique</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECDS:GenHashConsoleUnique&amp;diff=22808"/>
		<updated>2024-11-29T13:33:55Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Create endpoint descsription, form research for NetPass&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Request =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x04150000]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Response =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index Word&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| 64-bit hash&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
This internally calls [[Cfg:GenHashConsoleUnique]] with a salt of 0&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22807</id>
		<title>CECD Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CECD_Services&amp;diff=22807"/>
		<updated>2024-11-29T13:32:51Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Add more endpoints, result of NetPass research&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
Streetpass stuff.&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x000100C2&lt;br /&gt;
| Open/[[CECDU:OpenRawFile|OpenRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020042&lt;br /&gt;
| Read/[[CECDU:ReadRawFile|ReadRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030104&lt;br /&gt;
| [[CECDU:ReadMessage|ReadMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040106&lt;br /&gt;
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050042&lt;br /&gt;
| Write/[[CECDU:WriteRawFile|WriteRawFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060104&lt;br /&gt;
| [[CECDU:WriteMessage|WriteMessage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070106&lt;br /&gt;
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080102&lt;br /&gt;
| [[CECDU:Delete|Delete]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000900C2&lt;br /&gt;
| SetData (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A00C4&lt;br /&gt;
| ReadData/[[CECDU:GetSystemInfo|GetSystemInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| [[CECDU:Start|Start]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| [[CECDU:Stop|Stop]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0082&lt;br /&gt;
| GetCecInfoBuffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetCecdState (returns CecStateAbbreviated in cmdbuf[2])&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110104&lt;br /&gt;
| [[CECDU:OpenAndWrite|OpenAndWrite]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120104&lt;br /&gt;
| [[CECDU:OpenAndRead|OpenAndRead]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0082&lt;br /&gt;
| [[CECDU:GetEventLog|GetEventLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0000&lt;br /&gt;
| [[CECDU:GetEventLogStart|GetEventLogStart]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| [[CECDU:GetEventLogEntryCount|GetEventLogEntryCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0021....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecDataPathType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_LIST || 1&lt;br /&gt;
| data:/CEC/MBoxList____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_INFO || 2&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxInfo____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_INFO || 3&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INFO  || 4&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/BoxInfo_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_INDEX  || 5&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/OBIndex_____&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_MSG  || 6&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_MSG  || 7&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__/_&amp;lt;message_id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_ROOT_DIR  || 10&lt;br /&gt;
| data:/CEC&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_MBOX_DIR  || 11&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_INBOX_DIR  || 12&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/InBox___&lt;br /&gt;
|-&lt;br /&gt;
| CEC_PATH_OUTBOX_DIR  || 13&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/OutBox__&lt;br /&gt;
|-&lt;br /&gt;
| || 101 thru 199 (inclusive)&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.0&amp;lt;i-100&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_ICON  || 101&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.001&lt;br /&gt;
|- &lt;br /&gt;
| CECMESSAGE_BOX_TITLE  || 110&lt;br /&gt;
| data:/CEC/&amp;lt;id&amp;gt;/MBoxData.010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecCommand ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NONE&lt;br /&gt;
| 0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_START&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_START&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCAN&lt;br /&gt;
| 3&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_READYSCANWAIT&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STARTSCAN&lt;br /&gt;
| 5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESCAN&lt;br /&gt;
| 6&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_RESUME&lt;br /&gt;
| 7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND&lt;br /&gt;
| 8&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE&lt;br /&gt;
| 9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOPWAIT&lt;br /&gt;
| 0xA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP&lt;br /&gt;
| 0xB&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE&lt;br /&gt;
| 0xC&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_STOP_FORCE_WAIT&lt;br /&gt;
| 0xD&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_RESET_FILTER&lt;br /&gt;
| 0xE&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_STOP&lt;br /&gt;
| 0xF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_DAEMON_START&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_EXIT&lt;br /&gt;
| 0x11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS&lt;br /&gt;
| 0x12&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE&lt;br /&gt;
| 0x13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT&lt;br /&gt;
| 0x14&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| CEC_COMMAND_END&lt;br /&gt;
| 0x15&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecStateAbbreviated ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_IDLE&lt;br /&gt;
| 1&lt;br /&gt;
| Corresponds to CEC_STATE_IDLE&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_INACTIVE&lt;br /&gt;
| 2&lt;br /&gt;
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_SCANNING&lt;br /&gt;
| 3&lt;br /&gt;
| Corresponds to CEC_STATE_SCANNING&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_WLREADY?&lt;br /&gt;
| 4&lt;br /&gt;
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true&lt;br /&gt;
|-&lt;br /&gt;
| CEC_STATE_ABBREV_OTHER&lt;br /&gt;
| 5&lt;br /&gt;
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CecMessageId ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| char[8]&lt;br /&gt;
| data&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:s&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0401....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020002&lt;br /&gt;
| GetCecInfoEventHandleSys&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x040B....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0042&lt;br /&gt;
| GetSendSlotsMetadata?&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0082&lt;br /&gt;
| GetSlot? title_id, write_buffer, buffer_size&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0410....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x04110042&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x041200C2&lt;br /&gt;
| AddSlot?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0413....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0414....&lt;br /&gt;
| CloseSpr? bool success&lt;br /&gt;
|-&lt;br /&gt;
| 0x04150000&lt;br /&gt;
| [[CECDS:GenHashConsoleUnique|GenHashConsoleUnique]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04160002&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0417....&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CECD Service &amp;quot;cecd:ndm&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| Deinitialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ResumeDaemon&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| SuspendDaemon(bool immediately)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| QueryStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060042&lt;br /&gt;
| GetNZoneInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070042&lt;br /&gt;
| SetNZoneSSIDList&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080042&lt;br /&gt;
| SetNZoneMacFilter&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=BOSSU:UnregisterTask&amp;diff=22792</id>
		<title>BOSSU:UnregisterTask</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=BOSSU:UnregisterTask&amp;diff=22792"/>
		<updated>2024-11-01T08:52:26Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x000C0082]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| TaskID buffer size&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ? (Probably step_id?)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| (Size &amp;lt;&amp;lt; 4)  &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 0xA&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| TaskID data pointer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Services&amp;diff=22791</id>
		<title>Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Services&amp;diff=22791"/>
		<updated>2024-10-29T21:39:13Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Add missing category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Services are an abstraction of ports and are the commonly used way of inter-process communication outside of the kernel. While handles of regular ports are retrieved from [[SVC|svcConnectToPort]], service handles are retrieved through the port &#039;&#039;srv:&#039;&#039; (&amp;quot;service manager&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
When a service is registered, [[SVC|svcCreatePort]] is used without a port-name. This means that the port is inaccessible via the port SVCs outside of sm-module. See below for getting a session handle for sending commands to services.&lt;br /&gt;
&lt;br /&gt;
Processes with PID less than or equal to the number of NATIVE_FIRM built-in modules (fs, sm, pm, pxi, ldr) have access to all services. This value is obtained from [[SVC|svcGetSystemInfo]]. Other processes are limited to access services listed in their [[NCCH/Extended_Header#ARM11_Local_System_Capabilities|service access control list]], as passed to [[SRVPM:RegisterProcess]].&lt;br /&gt;
&lt;br /&gt;
Attempting to use [[SRV:GetServiceHandle|GetServiceHandle]] with a service that the process has access to when that service isn&#039;t registered will block until it is registered.&lt;br /&gt;
&lt;br /&gt;
==Service Manager Port &amp;quot;srv:&amp;quot;==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010002&lt;br /&gt;
| [[SRV:RegisterClient|RegisterClient]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| [[SRV:EnableNotification|EnableNotification]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030100&lt;br /&gt;
| [[SRV:RegisterService|RegisterService]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000400C0&lt;br /&gt;
| [[SRV:UnregisterService|UnregisterService]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050100&lt;br /&gt;
| [[SRV:GetServiceHandle|GetServiceHandle]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000600C2&lt;br /&gt;
| [[SRV:RegisterPort|RegisterPort]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000700C0&lt;br /&gt;
| [[SRV:UnregisterPort|UnregisterPort]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080100&lt;br /&gt;
| [[SRV:GetPort|GetPort]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090040&lt;br /&gt;
| [[SRV:Subscribe|Subscribe]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0040&lt;br /&gt;
| [[SRV:Unsubscribe|Unsubscribe]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0000&lt;br /&gt;
| [[SRV:ReceiveNotification|ReceiveNotification]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0080&lt;br /&gt;
| [[SRV:PublishToSubscriber|PublishToSubscriber]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0040&lt;br /&gt;
| [[SRV:PublishAndGetSubscriber|PublishAndGetSubscriber]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E00C0&lt;br /&gt;
| [[SRV:IsServiceRegistered|IsServiceRegistered]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It appears these &amp;quot;port&amp;quot; commands can be used for transferring arbitrary handles, however [[SRV:GetPort|GetPort]] still uses the same service-access-control validation as [[SRV:GetServiceHandle|GetServiceHandle]]. Despite this fact, it appears that a &amp;quot;port&amp;quot; and a service with the same name can coexist independently.&lt;br /&gt;
&lt;br /&gt;
==Service Manager Process-Manager Port/Service &amp;quot;srv:pm&amp;quot;==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header (port), prior to [[7.0.0-13]]&lt;br /&gt;
!  Command Header (service), post [[7.0.0-13]]&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x04010042&lt;br /&gt;
| 0x00010042&lt;br /&gt;
| [[SRVPM:PublishToProcess|PublishToProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020040&lt;br /&gt;
| 0x00020040&lt;br /&gt;
| [[SRVPM:PublishToAll|PublishToAll]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04030082&lt;br /&gt;
| 0x00030082&lt;br /&gt;
| [[SRVPM:RegisterProcess|RegisterProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04040040&lt;br /&gt;
| 0x00040040&lt;br /&gt;
| [[SRVPM:UnregisterProcess|UnregisterProcess]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Prior to to [[7.0.0-13]], the commands listed for &amp;quot;srv:&amp;quot; were also accessible under this port with the same command-headers. Starting with [[7.0.0-13]], the &amp;quot;srv:pm&amp;quot; port was changed to a service. With this change, commandIDs for these commands were changed. &amp;quot;srv:pm&amp;quot; was originally vulnerable, this was fixed with [[7.0.0-13]], see [[3DS_exploits|here]]. Originally any process could use &amp;quot;srv:pm&amp;quot;, however starting with [[7.0.0-13]] only the built-in NATIVE_FIRM sysmodules have access to it. The only system title which uses &amp;quot;srv:pm&amp;quot; is the [[Process_Manager_Services|Process Manager]].&lt;br /&gt;
&lt;br /&gt;
==Notifications==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ID&lt;br /&gt;
!  Published by&lt;br /&gt;
!  Subscribed by&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x100&lt;br /&gt;
| &lt;br /&gt;
| Not Needed&lt;br /&gt;
| This indicates that the recipient must terminate.&lt;br /&gt;
|-&lt;br /&gt;
| 0x101&lt;br /&gt;
| PTM&lt;br /&gt;
| NS&lt;br /&gt;
| Signaled on sleep mode entry.&lt;br /&gt;
|-&lt;br /&gt;
| 0x102&lt;br /&gt;
| PTM&lt;br /&gt;
| NS&lt;br /&gt;
| Sleep Mode related? &lt;br /&gt;
|-&lt;br /&gt;
| 0x103&lt;br /&gt;
| PTM&lt;br /&gt;
| NS, CSND, NWM, AC, NIM&lt;br /&gt;
| Fired on sleep mode entry (Kernel state is modified by PTM after publishing this)&lt;br /&gt;
|-&lt;br /&gt;
| 0x104&lt;br /&gt;
| PTM&lt;br /&gt;
| HID&lt;br /&gt;
| This indicates that the system is entering sleep mode. (Kernel state is modified by PTM before publishing this)&lt;br /&gt;
|-&lt;br /&gt;
| 0x105&lt;br /&gt;
| PTM&lt;br /&gt;
| NS, DSP, CSND, GSP, CODEC, CAMERA, HID, QTM, MIC, IR, NWM, FRIENDS, AC, CECD, ACT, NDM, NIM&lt;br /&gt;
| This indicates that the system has exited sleep mode.&lt;br /&gt;
|-&lt;br /&gt;
| 0x106 &lt;br /&gt;
| PTM&lt;br /&gt;
| NS, MIC, AC, NEWS, CECD, BOSS&lt;br /&gt;
| Fired after sleep mode exit.&lt;br /&gt;
|-&lt;br /&gt;
| 0x107&lt;br /&gt;
| PTM&lt;br /&gt;
| NWM, CECD, BOSS, NDM, NIM, NEWS&lt;br /&gt;
| Unknown.&lt;br /&gt;
|-&lt;br /&gt;
| 0x108&lt;br /&gt;
| PTM&lt;br /&gt;
| GSP, QTM&lt;br /&gt;
| System is going to Power Down.&lt;br /&gt;
|-&lt;br /&gt;
| 0x109&lt;br /&gt;
| CFG&lt;br /&gt;
| GSP&lt;br /&gt;
| CFG block 0x00050001 has been modified, change LCD brightness/PWM settings&lt;br /&gt;
|-&lt;br /&gt;
| 0x10B&lt;br /&gt;
| CFG&lt;br /&gt;
| CAMERA&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10C&lt;br /&gt;
| PM&lt;br /&gt;
| &lt;br /&gt;
| A Regular application has started.&lt;br /&gt;
|-&lt;br /&gt;
| 0x110-0x11F&lt;br /&gt;
| PM&lt;br /&gt;
| NS&lt;br /&gt;
| Sent on application exit. See [[PMApp:LaunchTitle#Launch_Flags|PM launch flags]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x179&lt;br /&gt;
| PM&lt;br /&gt;
| PTM, NS&lt;br /&gt;
| All processes other than PTM and NS have terminated.&lt;br /&gt;
|-&lt;br /&gt;
| 0x200&lt;br /&gt;
|&lt;br /&gt;
| NS&lt;br /&gt;
| Signaled just before sleep mode is exited from.&lt;br /&gt;
|-&lt;br /&gt;
| 0x202&lt;br /&gt;
| MCU&lt;br /&gt;
| NS&lt;br /&gt;
| POWER button pressed&lt;br /&gt;
|-&lt;br /&gt;
| 0x203&lt;br /&gt;
| MCU&lt;br /&gt;
| NS&lt;br /&gt;
| POWER button held long&lt;br /&gt;
|-&lt;br /&gt;
| 0x204&lt;br /&gt;
| MCU&lt;br /&gt;
| NS&lt;br /&gt;
| HOME button pressed&lt;br /&gt;
|-&lt;br /&gt;
| 0x205&lt;br /&gt;
| MCU&lt;br /&gt;
| NS&lt;br /&gt;
| HOME button released&lt;br /&gt;
|-&lt;br /&gt;
| 0x206&lt;br /&gt;
| MCU / NWM&lt;br /&gt;
| NWM&lt;br /&gt;
| The physical Wi-Fi slider state changed&lt;br /&gt;
|-&lt;br /&gt;
| 0x207&lt;br /&gt;
|&lt;br /&gt;
| MENU&lt;br /&gt;
| SD card inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x208&lt;br /&gt;
|&lt;br /&gt;
| MENU&lt;br /&gt;
| Game cartridge inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x209&lt;br /&gt;
|&lt;br /&gt;
| NS, MENU&lt;br /&gt;
| SD card removed&lt;br /&gt;
|-&lt;br /&gt;
| 0x20A&lt;br /&gt;
|&lt;br /&gt;
| NS, MENU&lt;br /&gt;
| Game cartridge removed&lt;br /&gt;
|-&lt;br /&gt;
| 0x20B&lt;br /&gt;
|&lt;br /&gt;
| NS, MENU&lt;br /&gt;
| Game cartridge inserted or removed&lt;br /&gt;
|-&lt;br /&gt;
| 0x20C&lt;br /&gt;
| MCU&lt;br /&gt;
| PTM&lt;br /&gt;
| Published on a fatal hardware condition, when the MCU WDT triggers, ptm throws fatal error F960D407 in receipt of this&lt;br /&gt;
|-&lt;br /&gt;
| 0x20D&lt;br /&gt;
| MCU&lt;br /&gt;
| GSP&lt;br /&gt;
| Charger plugged out.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20E&lt;br /&gt;
| MCU&lt;br /&gt;
| GSP&lt;br /&gt;
| Charger plugged in. &lt;br /&gt;
|-&lt;br /&gt;
| 0x20F&lt;br /&gt;
| MCU&lt;br /&gt;
| &lt;br /&gt;
| Published by the mcu module when (bitmask &amp;amp; 0x8000) is true (started charging). This bitmask is obtained by reading i2c register 0x10.&lt;br /&gt;
|- &lt;br /&gt;
| 0x210&lt;br /&gt;
| MCU&lt;br /&gt;
| &lt;br /&gt;
| Published by the mcu module when (bitmask &amp;amp; 0x4000) is true (stopped charging). This bitmask is obtained by reading i2c register 0x10.&lt;br /&gt;
|-&lt;br /&gt;
| 0x211&lt;br /&gt;
| PTM&lt;br /&gt;
|&lt;br /&gt;
| Battery very low (5%)&lt;br /&gt;
|-&lt;br /&gt;
| 0x212&lt;br /&gt;
| PTM&lt;br /&gt;
|&lt;br /&gt;
| Battery low (10%)&lt;br /&gt;
|-&lt;br /&gt;
| 0x213&lt;br /&gt;
| NS&lt;br /&gt;
| CODEC, HID, GSP, CAMERA, MIC, NDM, QTM, PTM &lt;br /&gt;
| Shell opened.&lt;br /&gt;
|-&lt;br /&gt;
| 0x214&lt;br /&gt;
| NS&lt;br /&gt;
| CODEC, HID, GSP, CAMERA, MIC, NDM, QTM, PTM.&lt;br /&gt;
| Shell closed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x300&lt;br /&gt;
| AC&lt;br /&gt;
| NDM, MENU&lt;br /&gt;
| Signaled after sleep mode exit and during system boot.&lt;br /&gt;
|-&lt;br /&gt;
| 0x301&lt;br /&gt;
| AC&lt;br /&gt;
| FRIENDS, NDM&lt;br /&gt;
| Signaled just before sleep mode is exited from.&lt;br /&gt;
|-&lt;br /&gt;
| 0x302&lt;br /&gt;
| NWM&lt;br /&gt;
| NDM, SOCKET, FRIENDS, AC&lt;br /&gt;
| WiFi is turning off, triggered by using the WiFi switch on O3DS models and the toggle in the N3DS HOME menu (maybe disconnecting from any connected networks?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x303&lt;br /&gt;
| NWM&lt;br /&gt;
| CECD, NDM&lt;br /&gt;
| WiFi has turned off. (fires shortly after 0x302)&lt;br /&gt;
|-&lt;br /&gt;
| 0x304&lt;br /&gt;
| NWM&lt;br /&gt;
| CECD, NDM, SOCKET&lt;br /&gt;
| WiFi was turned on.&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=PTM_Services&amp;diff=22790</id>
		<title>PTM Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=PTM_Services&amp;diff=22790"/>
		<updated>2024-10-29T20:51:54Z</updated>

		<summary type="html">&lt;p&gt;Sorunome: Add missing category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A total of 24 sessions can be open for each of these services combined. The commands for each service are handled by the PTM module main() thread.&lt;br /&gt;
&lt;br /&gt;
=User PTM Service &amp;quot;ptm:u&amp;quot; / PTM services=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010002&lt;br /&gt;
| RegisterAlarmClient&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020080&lt;br /&gt;
| SetRtcAlarm&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| GetRtcAlarm&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| CancelRtcAlarm&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| [[PTM:GetAdapterState|GetAdapterState]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060000&lt;br /&gt;
| [[PTM:GetShellState|GetShellState]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070000&lt;br /&gt;
| [[PTM:GetBatteryLevel|GetBatteryLevel]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| [[PTM:GetBatteryChargeState|GetBatteryChargeState]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090000&lt;br /&gt;
| [[PTM:GetPedometerState|GetPedometerState]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0042&lt;br /&gt;
| GetStepHistoryEntry&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B00C2&lt;br /&gt;
| [[PTM:GetStepHistory|GetStepHistory]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0000&lt;br /&gt;
| [[PTM:GetTotalStepCount|GetTotalStepCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0040&lt;br /&gt;
| SetPedometerRecordingMode&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| GetPedometerRecordingMode&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0084&lt;br /&gt;
| GetStepHistoryAll&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above commands are available for all PTM services, except the SetSystemTime service.&lt;br /&gt;
&lt;br /&gt;
=PlayHistory PTM Service &amp;quot;ptm:play&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x08070082&lt;br /&gt;
| [[PTM:GetPlayHistory|GetPlayHistory]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08080000&lt;br /&gt;
| GetPlayHistoryStart&lt;br /&gt;
|-&lt;br /&gt;
| 0x08090000&lt;br /&gt;
| GetPlayHistoryLength&lt;br /&gt;
|-&lt;br /&gt;
| 0x080B0080&lt;br /&gt;
| CalcPlayHistoryStart&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=SystemControl PTM Service &amp;quot;ptm:s&amp;quot;=&lt;br /&gt;
Identical to the below &amp;quot;ptm:sysm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=SysMenu PTM Service &amp;quot;ptm:sysm&amp;quot;=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x040100C0&lt;br /&gt;
| SetRtcAlarmEx&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020042&lt;br /&gt;
| ReplySleepQuery&lt;br /&gt;
|-&lt;br /&gt;
| 0x04030042&lt;br /&gt;
| NotifySleepPreparationComplete&lt;br /&gt;
|-&lt;br /&gt;
| 0x04040102&lt;br /&gt;
| SetWakeupTrigger&lt;br /&gt;
|-&lt;br /&gt;
| 0x04050000&lt;br /&gt;
| GetAwakeReason&lt;br /&gt;
|-&lt;br /&gt;
| 0x04060000&lt;br /&gt;
| RequestSleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x040700C0&lt;br /&gt;
|  [[PTM:ShutdownAsync|ShutdownAsync]] &lt;br /&gt;
|-&lt;br /&gt;
| 0x04080000&lt;br /&gt;
| Awake&lt;br /&gt;
|-&lt;br /&gt;
| 0x04090080&lt;br /&gt;
| [[PTMSYSM:LaunchFIRMRebootSystem|RebootAsync]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A0000&lt;br /&gt;
| [[PTMSYSM:CheckNew3DS|CheckNew3DS]] (Added with [[8.0.0-18]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010640&lt;br /&gt;
| [[PTMSYSM:SetInfoLEDPattern|SetInfoLEDPattern]] (These 4 LED commands are used for the notification LED, see [[MCU]] regarding boot fail with invalid parameters)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08020040&lt;br /&gt;
| [[PTMSYSM:SetInfoLEDPatternHeader|SetInfoLEDPatternHeader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030000&lt;br /&gt;
| [[PTMSYSM:GetInfoLEDStatus|GetInfoLEDStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040040&lt;br /&gt;
| [[PTMSYSM:SetBatteryEmptyLEDPattern|SetBatteryEmptyLEDPattern]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08050000&lt;br /&gt;
| ClearStepHistory&lt;br /&gt;
|-&lt;br /&gt;
| 0x080600C2&lt;br /&gt;
| SetStepHistory&lt;br /&gt;
|-&lt;br /&gt;
| 0x08070082&lt;br /&gt;
| [[PTM:GetPlayHistory|GetPlayHistory]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08080000&lt;br /&gt;
| GetPlayHistoryStart&lt;br /&gt;
|-&lt;br /&gt;
| 0x08090000&lt;br /&gt;
| GetPlayHistoryLength&lt;br /&gt;
|-&lt;br /&gt;
| 0x080A0000&lt;br /&gt;
| ClearPlayHistory&lt;br /&gt;
|-&lt;br /&gt;
| 0x080B0080&lt;br /&gt;
| CalcPlayHistoryStart&lt;br /&gt;
|-&lt;br /&gt;
| 0x080C0080&lt;br /&gt;
| SetUserTime&lt;br /&gt;
|-&lt;br /&gt;
| 0x080D0000&lt;br /&gt;
| InvalidateSystemTime&lt;br /&gt;
|-&lt;br /&gt;
| 0x080E0140&lt;br /&gt;
| [[PTMSYSM:NotifyPlayEvent|NotifyPlayEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x080F0000&lt;br /&gt;
| [[PTMSYSM:GetSoftwareClosedFlag|GetSoftwareClosedFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08100000&lt;br /&gt;
| [[PTMSYSM:ClearSoftwareClosedFlag|ClearSoftwareClosedFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x08110000&lt;br /&gt;
| GetShellStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x08120000&lt;br /&gt;
| IsShutdownByBatteryEmpty&lt;br /&gt;
|-&lt;br /&gt;
| 0x08130000&lt;br /&gt;
| FormatSavedata&lt;br /&gt;
|-&lt;br /&gt;
| 0x08140000&lt;br /&gt;
| GetLegacyJumpProhibitedFlag&lt;br /&gt;
|- &lt;br /&gt;
| 0x08150040&lt;br /&gt;
| SetPlayHistoryRecordingMode&lt;br /&gt;
|-&lt;br /&gt;
| 0x0816....&lt;br /&gt;
| Abstraction for mcu::RTC::GetSystemClock&lt;br /&gt;
|-&lt;br /&gt;
| 0x0817....&lt;br /&gt;
| Abstraction for mcu::RTC::SetSystemClock&lt;br /&gt;
|-&lt;br /&gt;
| 0x08180040&lt;br /&gt;
| [[PTMSYSM:ConfigureNew3DSCPU|ConfigureNew3DSCPU]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=GetSystemTime PTM Service &amp;quot;ptm:gets&amp;quot;=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x04010000&lt;br /&gt;
| GetSystemTime&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=SetSystemTime PTM Service &amp;quot;ptm:sets&amp;quot;=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010080&lt;br /&gt;
| SetSystemTime&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=PTM [[System_SaveData]]=&lt;br /&gt;
&#039;&#039;Main article: [[PTM Savegame]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
During system boot PTM attempts to open the [[PTM Savegame|PTM savedata]], if this fails it will repeatedly keep trying to open the archive. When opening the archive is failing due to savedata corruption, PTM eventually (during system boot) deletes the savedata then creates it again.&lt;br /&gt;
&lt;br /&gt;
Savedata contents:&lt;br /&gt;
* &amp;quot;/Pedometer.dat&amp;quot;&lt;br /&gt;
* &amp;quot;/PlayHistory.dat&amp;quot; Filesize is 0xD5DE8.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Sorunome</name></author>
	</entry>
</feed>