IR Services

IR Services

IR Service “ir:u” #

Command HeaderAvailable since system versionDescription
0x000100001.0.0-0Initialize
0x000200001.0.0-0Shutdown
0x000300421.0.0-0StartSendTransfer
0x000400001.0.0-0WaitSendTransfer
0x000500C21.0.0-0StartRecvTransfer
0x000600001.0.0-0WaitRecvTransfer
0x000700001.0.0-0GetRecvTransferCount
0x000800001.0.0-0GetSendState
0x000900401.0.0-0SetBitRate
0x000A00001.0.0-0GetBitRate
0x000B00401.0.0-0SetIRLEDState
0x000C00001.0.0-0GetIRLEDRecvState
0x000D00001.0.0-0GetSendFinishedEvent
0x000E00001.0.0-0GetRecvFinishedEvent
0x000F00001.0.0-0GetTransferState
0x001000001.0.0-0GetErrorStatus
0x001100401.0.0-0SetSleepModeActive
0x001200401.0.0-0SetSleepModeState

IR Service “ir:USER” #

Command HeaderAvailable since system versionDescription
0x000101822.0.0-2InitializeIrnop
0x000200002.0.0-2FinalizeIrnop
0x000300002.0.0-2ClearReceiveBuffer
0x000400002.0.0-2ClearSendBuffer
0x000500C02.0.0-2WaitConnection
0x000600402.0.0-2RequireConnection (u8 input)
0x000702C02.0.0-2AutoConnection
0x000800002.0.0-2AnyConnection
0x000900002.0.0-2Disconnect
0x000A00002.0.0-2GetReceiveEvent (writes event handle to cmdreply[3])
0x000B00002.0.0-2GetSendEvent (writes event handle to cmdreply[3])
0x000C00002.0.0-2GetConnectionStatusEvent (writes event handle to cmdreply[3])
0x000D00422.0.0-2SendIrnop (u32 size, ((Size<<14) | 2), inbufptr)
0x000E00422.0.0-2SendIrnopLarge (u32 size, ((Size<<8) | 10), inbufptr)
0x000F00402.0.0-2ReceiveIrnop
0x001000422.0.0-2ReceiveIrnopLarge
0x0011….2.0.0-2GetLatestReceiveErrorResult
0x0012….2.0.0-2GetLatestSendErrorResult
0x0013….2.0.0-2GetConnectionStatus
0x0014….2.0.0-2GetTryingToConnectStatus
0x0015….2.0.0-2GetReceiveSizeFreeAndUsed
0x0016….2.0.0-2GetSendSizeFreeAndUsed
0x0017….2.2.0-XGetConnectionRole
0x001801822.2.0-XInitializeIrnopShared
0x001900402.2.0-XReleaseReceivedData (32bit_value input)
0x001A00402.2.0-XSetOwnMachineId (u8 input)

This service was added with 2.0.0-2.

When sending data, SendIrnop is used when the size is <=0xFC, otherwise SendIrnopLarge is used.

IR Service “ir:rst” #

Command HeaderAvailable since system-versionDescription
0x000100008.0.0-18GetHandles
0x000200808.0.0-18Initialize
0x000300008.0.0-18Shutdown
0x000400008.0.0-18This writes an unknown u8 to index-word cmdreply[2], from data loaded from an I2C device register.
0x000500008.0.0-18This writes an unknown u8 from IR-module state to index-word cmdreply[2].
0x000600008.0.0-18This writes two unknown u8 fields from IR-module state to index-word cmdreply[2] and cmdreply[3].
0x000700809.0.0-20(u8 unk0, u8 unk1) This is used for calibrating the C-stick on the N3DS EXTHID.
0x000800009.0.0-20(u8 unk0, u8 unk1) ?
0x000900009.0.0-20This writes two unknown u8 fields to index-word cmdreply[2] and cmdreply[3].

This service was added with 8.0.0-18. Unlike the other IR services, this uses I2C deviceid 17(this deviceid isn’t actually handled by the 8.0.0-18 I2C module). This is for the additional New 3DS HID hardware, this HID data is stored in shared-memory. Even with 9.0.0-20 IR module still registers+handles this service on both Old3DS+New3DS.

IR Services #

Only one session(two sessions starting with 8.0.0-18) to any of these services can be open at a time, thus only one/two process(es) can use any of these services at once. These services interface with hardware services gpio::IR and i2c::IR. The i2c::IR service is used for sending/receiving data.

IRU is for regular IR comms. IRUSER uses a custom IR protocol(above the physical layer). Both of these services use IrDA-SIR. The IR hardware seems to only support IrDA-SIR, other physical protocols such as the one for TV-remotes are not supported(going by the datasheet linked here for a different IC at least).

The protocol used with IRUSER involves encryption(?) implemented in software. IRUSER is used for the Circle Pad Pro. This same IRUSER service uses the New3DS HID hardware when running on New3DS. Note that the main service for New3DS HID is ir:rst, and these two service are mutually exclusive: when one is initialized and reading data from New3DS HID, the other cannot access it.

Category:Services