Difference between revisions of "CECD Services"

From 3dbrew
Jump to navigation Jump to search
(Remove redundant information, game-side CecMessageData)
(cecd:ndm)
 
(32 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
[[Category:Services]]
 
[[Category:Services]]
 +
 +
Streetpass stuff.
 +
 
= CECD Service "cecd:u" =
 
= CECD Service "cecd:u" =
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 7: Line 10:
 
|-
 
|-
 
| 0x000100C2
 
| 0x000100C2
| ?
+
| [[CECDU:OpenRawFile|OpenRawFile]]
 +
|-
 +
| 0x00020042
 +
| [[CECDU:ReadRawFile|ReadRawFile]]
 
|-
 
|-
 
| 0x00030104
 
| 0x00030104
| ?
+
| [[CECDU:ReadMessage|ReadMessage]]
 +
|-
 +
| 0x00040106
 +
| [[CECDU:ReadMessageWithHMAC|ReadMessageWithHMAC]]
 +
|-
 +
| 0x00050042
 +
| [[CECDU:WriteRawFile|WriteRawFile]]
 +
|-
 +
| 0x00060104
 +
| [[CECDU:WriteMessage|WriteMessage]]
 
|-
 
|-
 
| 0x00070106
 
| 0x00070106
| ? (16*length+10 of CecMessage buffer in cmdbuff[9] (always 16*8+10), CecMessage* in cmdbuf[10])
+
| [[CECDU:WriteMessageWithHMAC|WriteMessageWithHMAC]]
 
|-
 
|-
 
| 0x00080102
 
| 0x00080102
| ?
+
| [[CECDU:Delete|Delete]]
 
|-
 
|-
 
| 0x000900C2
 
| 0x000900C2
| ? (16*length+10 of CecMessage buffer in cmdbuff[4] (always 16*8+10), CecMessage* in cmdbuf[5])
+
| ? (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])
 
|-
 
|-
 
| 0x000A00C4
 
| 0x000A00C4
| ?
+
| [[CECDU:GetSystemInfo|GetSystemInfo]]
 
|-
 
|-
 
| 0x000B0040
 
| 0x000B0040
| ?
+
| RunCommand
 
|-
 
|-
 
| 0x000C0040
 
| 0x000C0040
| ?
+
| RunCommandAlt (seems to be the same as RunCommand besides some extra checks)
 
|-
 
|-
 
| 0x000D0082
 
| 0x000D0082
| ?
+
| GetCecInfoBuffer
 
|-
 
|-
 
| 0x000E0000
 
| 0x000E0000
| ? (returns some kind of enum value in cmdbuf[2])
+
| GetCecStateAbbreviated (returns CecStateAbbreviated in cmdbuf[2])
 
|-
 
|-
 
| 0x000F0000
 
| 0x000F0000
| ? (returns some kind of synchronizable handle in cmdbuf[3])
+
| GetCecInfoEventHandle (returns event handle in cmdbuf[3])
 
|-
 
|-
 
| 0x00100000
 
| 0x00100000
| ?
+
| GetChangeStateEventHandle (returns event handle in cmdbuf[3])
 
|-
 
|-
 
| 0x00110104
 
| 0x00110104
| SetSendingData? (cmdbuf[3]: CecMessageType type, cmdbuf[5]: 0x20, cmdbuf[6]: u8* data_buf, cmdbuf[7]: u32 16*data_size+10)
+
| [[CECDU:OpenAndWrite|OpenAndWrite]]
 
|-
 
|-
 
| 0x00120104
 
| 0x00120104
 +
| [[CECDU:OpenAndRead|OpenAndRead]]
 +
|-
 +
| 0x001E0082
 +
| GetEventLog
 +
|-
 +
| 0x001F0000
 +
| GetEventLogStart
 +
|-
 +
| 0x0020....
 +
| ?
 +
|-
 +
| 0x0021....
 
| ?
 
| ?
 
|-
 
|-
 
|}
 
|}
  
=== CecMessage ===
+
=== CecDataPathType ===
 +
{| class="wikitable" border="1"
 +
! Name
 +
! Value
 +
! Notes
 +
|-
 +
| CEC_PATH_MBOX_LIST || 1
 +
| data:/CEC/MBoxList____
 +
|-
 +
| CEC_PATH_MBOX_INFO || 2
 +
| data:/CEC/<id>/MBoxInfo____
 +
|-
 +
| CEC_PATH_INBOX_INFO || 3
 +
| data:/CEC/<id>/InBox___/BoxInfo_____
 +
|-
 +
| CEC_PATH_OUTBOX_INFO  || 4
 +
| data:/CEC/<id>/OutBox__/BoxInfo_____
 +
|-
 +
| CEC_PATH_OUTBOX_INDEX  || 5
 +
| data:/CEC/<id>/OutBox__/OBIndex_____
 +
|-
 +
| CEC_PATH_INBOX_MSG  || 6
 +
| data:/CEC/<id>/InBox___/_<message_id>
 +
|-
 +
| CEC_PATH_OUTBOX_MSG  || 7
 +
| data:/CEC/<id>/OutBox__/_<message_id>
 +
|-
 +
| CEC_PATH_ROOT_DIR  || 10
 +
| data:/CEC
 +
|-
 +
| CEC_PATH_MBOX_DIR  || 11
 +
| data:/CEC/<id>
 +
|-
 +
| CEC_PATH_INBOX_DIR  || 12
 +
| data:/CEC/<id>/InBox___
 +
|-
 +
| CEC_PATH_OUTBOX_DIR  || 13
 +
| data:/CEC/<id>/OutBox__
 +
|-
 +
| || 101 thru 199 (inclusive)
 +
| data:/CEC/<id>/MBoxData.0<i-100>
 +
|-
 +
| CECMESSAGE_BOX_ICON  || 101
 +
| data:/CEC/<id>/MBoxData.001
 +
|-
 +
| CECMESSAGE_BOX_TITLE  || 110
 +
| data:/CEC/<id>/MBoxData.010
 +
|}
 +
 
 +
=== CecCommand ===
 +
{| class="wikitable" border="1"
 +
!  Name
 +
!  Value
 +
!  Notes
 +
|-
 +
| CEC_COMMAND_NONE
 +
| 0
 +
|
 +
|-
 +
| CEC_COMMAND_START
 +
| 1
 +
|
 +
|-
 +
| CEC_COMMAND_RESET_START
 +
| 2
 +
|
 +
|-
 +
| CEC_COMMAND_READYSCAN
 +
| 3
 +
|
 +
|-
 +
| CEC_COMMAND_READYSCANWAIT
 +
| 4
 +
|
 +
|-
 +
| CEC_COMMAND_STARTSCAN
 +
| 5
 +
|
 +
|-
 +
| CEC_COMMAND_RESCAN
 +
| 6
 +
|
 +
|-
 +
| CEC_COMMAND_NDM_RESUME
 +
| 7
 +
|
 +
|-
 +
| CEC_COMMAND_NDM_SUSPEND
 +
| 8
 +
|
 +
|-
 +
| CEC_COMMAND_NDM_SUSPEND_IMMEDIATE
 +
| 9
 +
|
 +
|-
 +
| CEC_COMMAND_STOPWAIT
 +
| 0xA
 +
|
 +
|-
 +
| CEC_COMMAND_STOP
 +
| 0xB
 +
|
 +
|-
 +
| CEC_COMMAND_STOP_FORCE
 +
| 0xC
 +
|
 +
|-
 +
| CEC_COMMAND_STOP_FORCE_WAIT
 +
| 0xD
 +
|
 +
|-
 +
| CEC_COMMAND_RESET_FILTER
 +
| 0xE
 +
|
 +
|-
 +
| CEC_COMMAND_DAEMON_STOP
 +
| 0xF
 +
|
 +
|-
 +
| CEC_COMMAND_DAEMON_START
 +
| 0x10
 +
|
 +
|-
 +
| CEC_COMMAND_EXIT
 +
| 0x11
 +
|
 +
|-
 +
| CEC_COMMAND_OVER_BOSS
 +
| 0x12
 +
|
 +
|-
 +
| CEC_COMMAND_OVER_BOSS_FORCE
 +
| 0x13
 +
|
 +
|-
 +
| CEC_COMMAND_OVER_BOSS_FORCE_WAIT
 +
| 0x14
 +
|
 +
|-
 +
| CEC_COMMAND_END
 +
| 0x15
 +
|
 +
|-
 +
|}
 +
 
 +
=== CecStateAbbreviated ===
 +
{| class="wikitable" border="1"
 +
!  Name
 +
!  Value
 +
!  Notes
 +
|-
 +
| CEC_STATE_ABBREV_IDLE
 +
| 1
 +
| Corresponds to CEC_STATE_IDLE
 +
|-
 +
| CEC_STATE_ABBREV_INACTIVE
 +
| 2
 +
| Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS
 +
|-
 +
| CEC_STATE_ABBREV_SCANNING
 +
| 3
 +
| Corresponds to CEC_STATE_SCANNING
 +
|-
 +
| CEC_STATE_ABBREV_WLREADY?
 +
| 4
 +
| Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true
 +
|-
 +
| CEC_STATE_ABBREV_OTHER
 +
| 5
 +
| Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here
 +
|}
 +
 
 +
=== CecMessageId ===
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
!  Type
 
!  Type
Line 60: Line 259:
 
|}
 
|}
  
=== CecMessageType ===
+
= CECD Service "cecd:s" =
 +
 
 +
This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
! Name
 
! Value
 
! Notes
 
 
|-
 
|-
 +
!  Command Header
 +
!  Description
 +
|-
 +
| 0x0401....
 +
| ?
 +
|-
 +
| 0x04020002
 +
| ?
 +
|-
 +
| 0x040A....
 +
| ?
 +
|-
 +
| 0x040B....
 +
| ?
 +
|-
 +
| 0x040C0042
 +
| ?
 +
|-
 +
| 0x040D0082
 +
| ?
 +
|-
 +
| 0x040E....
 +
| ?
 +
|-
 +
| 0x040F....
 +
| ?
 +
|-
 +
| 0x0410....
 +
| ?
 +
|-
 +
| 0x04110042
 +
| ?
 +
|-
 +
| 0x041200C2
 +
| ?
 +
|-
 +
| 0x0413....
 +
| ?
 +
|-
 +
| 0x0414....
 +
| ?
 +
|-
 +
| 0x0415....
 +
| ?
 +
|-
 +
| 0x04160002
 +
| ?
 +
|-
 +
| 0x0417....
 
| ?
 
| ?
| 0x2
 
| Corresponds to some 0x60-byte data
 
 
|-
 
|-
| CECMESSAGE_BOX_ICON
+
|}
| 0x65
+
 
| Corresponds to the StreetPass "box" icon
+
= CECD Service "cecd:ndm" =
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Command Header
 +
!  Description
 +
|-
 +
| 0x00010000
 +
| Initialize
 +
|-
 +
| 0x00020000
 +
| Deinitialize
 +
|-
 +
| 0x00030000
 +
| ResumeDaemon
 +
|-
 +
| 0x00040040
 +
| SuspendDaemon(bool immediately)
 +
|-
 +
| 0x00050000
 +
| QueryStatus
 +
|-
 +
| 0x00060042
 +
| GetNZoneInfo
 +
|-
 +
| 0x00070042
 +
| SetNZoneSSIDList
 
|-
 
|-
| CECMESSAGE_BOX_TITLE
+
| 0x00080042
| 0x6E
+
| SetNZoneMacFilter
| Corresponds to the StreetPass "box" title
 
 
|-
 
|-
 
|}
 
|}

Latest revision as of 22:23, 20 July 2020


Streetpass stuff.

CECD Service "cecd:u"[edit]

Command Header Description
0x000100C2 OpenRawFile
0x00020042 ReadRawFile
0x00030104 ReadMessage
0x00040106 ReadMessageWithHMAC
0x00050042 WriteRawFile
0x00060104 WriteMessage
0x00070106 WriteMessageWithHMAC
0x00080102 Delete
0x000900C2 ? (16*length+10 of CecMessageId buffer in cmdbuff[4] (always 16*8+10), CecMessageId* in cmdbuf[5])
0x000A00C4 GetSystemInfo
0x000B0040 RunCommand
0x000C0040 RunCommandAlt (seems to be the same as RunCommand besides some extra checks)
0x000D0082 GetCecInfoBuffer
0x000E0000 GetCecStateAbbreviated (returns CecStateAbbreviated in cmdbuf[2])
0x000F0000 GetCecInfoEventHandle (returns event handle in cmdbuf[3])
0x00100000 GetChangeStateEventHandle (returns event handle in cmdbuf[3])
0x00110104 OpenAndWrite
0x00120104 OpenAndRead
0x001E0082 GetEventLog
0x001F0000 GetEventLogStart
0x0020.... ?
0x0021.... ?

CecDataPathType[edit]

Name Value Notes
CEC_PATH_MBOX_LIST 1 data:/CEC/MBoxList____
CEC_PATH_MBOX_INFO 2 data:/CEC/<id>/MBoxInfo____
CEC_PATH_INBOX_INFO 3 data:/CEC/<id>/InBox___/BoxInfo_____
CEC_PATH_OUTBOX_INFO 4 data:/CEC/<id>/OutBox__/BoxInfo_____
CEC_PATH_OUTBOX_INDEX 5 data:/CEC/<id>/OutBox__/OBIndex_____
CEC_PATH_INBOX_MSG 6 data:/CEC/<id>/InBox___/_<message_id>
CEC_PATH_OUTBOX_MSG 7 data:/CEC/<id>/OutBox__/_<message_id>
CEC_PATH_ROOT_DIR 10 data:/CEC
CEC_PATH_MBOX_DIR 11 data:/CEC/<id>
CEC_PATH_INBOX_DIR 12 data:/CEC/<id>/InBox___
CEC_PATH_OUTBOX_DIR 13 data:/CEC/<id>/OutBox__
101 thru 199 (inclusive) data:/CEC/<id>/MBoxData.0<i-100>
CECMESSAGE_BOX_ICON 101 data:/CEC/<id>/MBoxData.001
CECMESSAGE_BOX_TITLE 110 data:/CEC/<id>/MBoxData.010

CecCommand[edit]

Name Value Notes
CEC_COMMAND_NONE 0
CEC_COMMAND_START 1
CEC_COMMAND_RESET_START 2
CEC_COMMAND_READYSCAN 3
CEC_COMMAND_READYSCANWAIT 4
CEC_COMMAND_STARTSCAN 5
CEC_COMMAND_RESCAN 6
CEC_COMMAND_NDM_RESUME 7
CEC_COMMAND_NDM_SUSPEND 8
CEC_COMMAND_NDM_SUSPEND_IMMEDIATE 9
CEC_COMMAND_STOPWAIT 0xA
CEC_COMMAND_STOP 0xB
CEC_COMMAND_STOP_FORCE 0xC
CEC_COMMAND_STOP_FORCE_WAIT 0xD
CEC_COMMAND_RESET_FILTER 0xE
CEC_COMMAND_DAEMON_STOP 0xF
CEC_COMMAND_DAEMON_START 0x10
CEC_COMMAND_EXIT 0x11
CEC_COMMAND_OVER_BOSS 0x12
CEC_COMMAND_OVER_BOSS_FORCE 0x13
CEC_COMMAND_OVER_BOSS_FORCE_WAIT 0x14
CEC_COMMAND_END 0x15

CecStateAbbreviated[edit]

Name Value Notes
CEC_STATE_ABBREV_IDLE 1 Corresponds to CEC_STATE_IDLE
CEC_STATE_ABBREV_INACTIVE 2 Corresponds to CEC_STATEs *FINISH*, *POST, and OVER_BOSS
CEC_STATE_ABBREV_SCANNING 3 Corresponds to CEC_STATE_SCANNING
CEC_STATE_ABBREV_WLREADY? 4 Corresponds to CEC_STATE_WIRELESS_READY when some unknown bool is true
CEC_STATE_ABBREV_OTHER 5 Corresponds to CEC_STATEs besides *FINISH*, *POST, and OVER_BOSS and those listed here

CecMessageId[edit]

Type Field
char[8] data

CECD Service "cecd:s"[edit]

This contains a similar (probably the same) command handler from 0x0001.... to 0x0021.... as them in cecd:u. In addition, it also contains

Command Header Description
0x0401.... ?
0x04020002 ?
0x040A.... ?
0x040B.... ?
0x040C0042 ?
0x040D0082 ?
0x040E.... ?
0x040F.... ?
0x0410.... ?
0x04110042 ?
0x041200C2 ?
0x0413.... ?
0x0414.... ?
0x0415.... ?
0x04160002 ?
0x0417.... ?

CECD Service "cecd:ndm"[edit]

Command Header Description
0x00010000 Initialize
0x00020000 Deinitialize
0x00030000 ResumeDaemon
0x00040040 SuspendDaemon(bool immediately)
0x00050000 QueryStatus
0x00060042 GetNZoneInfo
0x00070042 SetNZoneSSIDList
0x00080042 SetNZoneMacFilter