StreetPass: Difference between revisions

Sorunome (talk | contribs)
Fill in structs for streetpass messages
m That is incorrect, if the outbox is empty, the 3DS does not announce the title in the probe request. Furthermore, the send method is specified on the message, not on the box info. So for a 3ds to say it has a title in RECV_ONLY, it has to have a message in its outbox with that mode.
 
(5 intermediate revisions by 3 users not shown)
Line 56: Line 56:
==== Nintendo Tag Format ====
==== Nintendo Tag Format ====


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 "01". 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.
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 "01". 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. It seems to follow a "Type–length–value" structure.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 68: Line 68:
|  0x00
|  0x00
|  0x01
|  0x01
|  '''Protocol Identification'''
|  '''StreetPass Service Tag'''
May be for protocol identification. All captures thus far show this value at 17, hexadecimal 11.
The identifier of the StreetPass Service. All captures thus far show this value at 17, hexadecimal 11.
| 11
| 11
|-
|-
Line 84: Line 84:
|  00 02 08 00 00
|  00 02 08 00 00
|-
|-
varies
-0x10
0x02
0x1
|  '''Unknown'''
|  '''StreetPass consoleID Tag'''
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.
The identifier of the StreetPass consoleID, it is always the same value.
f0 08
|  f0
|-
|  -0x09
|  0x01
|  '''StreetPass consoleID Length'''
|  The length of the StreetPass consoleID field, which is also always the same value.
|  08
|-
|-
|  -0x08
|  -0x08
Line 97: Line 103:
|}
|}


===== Protocol Version =====
===== StreetPass Service Tag =====


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.
This field indicates that the following data is of type StreetPass services. It is the same across all devices.


===== StreetPass Service Length =====
===== StreetPass Service Length =====
Line 113: Line 119:
   Sims 3: 00 03 65 00 30
   Sims 3: 00 03 65 00 30
   Street Fighter: 00 03 05 00 02 (FF FF FF FF FF FF)
   Street Fighter: 00 03 05 00 02 (FF FF FF FF FF FF)
  Tomodachi life: 00 08 C5 00 30 (Tested on EUR region)
  Animal crossing new leaf: 00 19 8D 00 30 (Tested on EUR region)


The first 4 bytes are the titleID of the service, the last byte seems to contain flags.
The first 4 bytes are the titleID of the service, the last byte seems to contain flags.
Line 126: Line 134:


Only the bits 2,5,6 were used.
Only the bits 2,5,6 were used.
When set, the bit n°2 indicates the presence of a followinf 6-byte field filled with 0xff.
When set, the bit n°2 indicates the presence of a following 6-byte field filled with 0xff.


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.
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.
Line 388: Line 396:
|}
|}


===== Unknown 2-byte Field =====
===== StreetPass consoleID Tag =====


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 '''f008'''.
It has remained the same across all devices thus far, '''f0'''. It identifies the StreetPass consoleID field.
 
===== StreetPass consoleID Length =====
 
Since the StreetPass consoleID length is always 0x08, this field is always '''08'''.


===== StreetPass consoleID =====
===== StreetPass consoleID =====
Line 415: Line 427:
|0||EXCHANGE||StreetPass message exchange will only happen if both consoles can store the message of the other. E.g. the inbox isn't full. Example title: StreetPass Mii Plaza
|0||EXCHANGE||StreetPass message exchange will only happen if both consoles can store the message of the other. E.g. the inbox isn't full. Example title: StreetPass Mii Plaza
|-
|-
|1||RECV_ONLY||3DS doesn't have anything in its outbox so it is only receiving messages.
|1||RECV_ONLY||3DS is only receiving messages. Some titles mark their messages with this send mode (e.g. 000AF700)
|-
|-
|2||SEND_ONLY||
|2||SEND_ONLY||3DS inbox is full so it is only sending messages.
|-
|-
|3||SEND_RECV||
|3||SEND_RECV||
Line 623: Line 635:
| u32
| u32
| transfer_id
| transfer_id
| ???
| All messages from the same transfer (That is, sending the messages) contain the same transfer id
|-
|-
| 0x20
| 0x20
Line 646: Line 658:
| 0x01
| 0x01
| u8
| u8
| flags
| recipients
| ???
| bitfield: 0x01: everyone; 0x02: friends
|-
|-
| 0x35
| 0x35