Difference between revisions of "NFC Services"

From 3dbrew
Jump to navigation Jump to search
Line 81: Line 81:
 
|}
 
|}
  
The commands under this section are for "nfc:u" and "nfc:m".
+
The commands under this section are for "nfc:u" and "nfc:m". The command headers were changed with [[9.3.0-21|9.3.0-X]], which means pre-[[9.3.0-21|9.3.0-X]] NFC user-process software will not work with >=[[9.3.0-21|9.3.0-X]](official retail software for these didn't exist before [[9.3.0-21|9.3.0-X]]).
  
 
=NFC user service "nfc:u"=
 
=NFC user service "nfc:u"=
This is the NFC service used by regular applications. This was first seen in the Super Smash Bros eShop demo(only in the exheader, the demo doesn't actually use it), at that time no system-module was available for NFC on CDN.
+
This is the NFC service used by regular applications.
  
At the time of writing, there is no titles using this service yet.
+
This was first seen in the Super Smash Bros eShop demo(only in the exheader, the demo doesn't actually use it), at that time no system-module was available for NFC on CDN. The first regular application to use this service was Super Smash Bros, with the v1.0.5 game-update.
  
 
=NFC service "nfc:r"=
 
=NFC service "nfc:r"=

Revision as of 21:44, 1 March 2015

The New3DS NFC module was added with 8.1.0-0_New3DS. The Old3DS NFC module was added with 9.3.0-X.

On New3DS NFC module uses the NFC hardware via the i2c::NFC and gpio:NFC services. On Old3DS NFC module communicates with a NFC peripheral via IR with the IRUSER service.

A total of 6 sessions can be open simultaneously for all of these services combined.

NFC services

Command Header Description
0x00010000 Initialize
0x00020000 Shutdown
0x00030000 GetNFCState. This writes an output u8 to cmdreply[2]: 0 = not initialized, 1 = just initialized, 5 = data transfer ready, ...
0x00040000 This writes an output handle to cmdreply[3].
0x00050000 This writes an output handle to cmdreply[3].
0x00060040 (u8 input)
0x00070000 The user process must setup the output-buffer hdr+ptr data @ TLS+0x180 when using this. cmdreply[2] = actual output data size?
0x00080100 (<0x10-bytes starting at cmdreq[1]>)
0x00090000
0x000A0000 The user process must setup the output-buffer hdr+ptr data @ TLS+0x180 when using this.
0x000B0042 (u32 size, ((Size<<14) | 2), inbufptr)
0x000C0044 (u32 size, 0x20, <procid set by kernel>, ((Size<<14) | 0x402), inbufptr)
0x000D0040 (u16 in)
0x000E0000
0x000F00C2 (u32 unk0, u32 unk1, u32 unk2, ((Size<<14) | 0x802), inbufptr)
0x00100040 (u32 in)
0x00110040 (u32 in)
0x00120040 (u32 in)
0x00130000 Writes an output u32 to cmdreply[2].
0x00140000 This writes an output 0x30-byte struct starting at cmdreply[2].
0x00150000 This writes an output 0x2C-byte struct starting at cmdreply[2].
0x00160000
0x00170000

The commands under this section are for "nfc:u" and "nfc:m". The command headers were changed with 9.3.0-X, which means pre-9.3.0-X NFC user-process software will not work with >=9.3.0-X(official retail software for these didn't exist before 9.3.0-X).

NFC user service "nfc:u"

This is the NFC service used by regular applications.

This was first seen in the Super Smash Bros eShop demo(only in the exheader, the demo doesn't actually use it), at that time no system-module was available for NFC on CDN. The first regular application to use this service was Super Smash Bros, with the v1.0.5 game-update.

NFC service "nfc:r"

NFC service "nfc:p"

This service is used by the mint library-applet, starting with 9.3.0-21. This service was added to the mint service-access-control list with 9.0.0-20.

NFC service "nfc:s"

NFC development service "nfc:dev"

This service seems to be intended for use only on dev-units(or at least some of the command(s)).

NFC management service "nfc:m"

Command Header Description
0x04010000 This writes two output words to cmdreply[2].

This service has all of the commands listed under "NFC services", in addition to the command(s) listed under this section.

This is used by the amiibo Settings applet.

NFC module savedata

  • "/nfp_backup.dat" Going by the filename this seems to contain data backed up from amiibo.