Friend Services: Difference between revisions

TimmSkiller (talk | contribs)
No edit summary
TimmSkiller (talk | contribs)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Services]]
[[Category:Services]]
= Friend Service "frd:u" =
= Friend User Service "frd:u" =
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 169: Line 169:
|}
|}


= "frd:n" =
= Friend Network Daemon Service "frd:n" =
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 176: Line 176:
|-
|-
| 0x00010000
| 0x00010000
| GetHandleOfNdmStatusChangedEvent
| [[FRDN:GetHandleOfNdmStatusChangedEvent|GetHandleOfNdmStatusChangedEvent]]
|-
|-
| 0x00020000
| 0x00020000
| Resume
| [[FRDN:Resume|Resume]]
|-
|-
| 0x00030040
| 0x00030040
| SuspendAsync
| [[FRDN:SuspendAsync|SuspendAsync]]
|-
|-
| 0x00040000
| 0x00040000
| QueryStatus
| [[FRDN:QueryStatus|QueryStatus]]
|}
|}


= "frd:a" =
= Friend Admin Service "frd:a" =


This contains a similar (probably the same) command handler from 0x0001.... to 0x002F.... as them in frd:u. In addition, it also contains
Includes all the commands in [[Friend_Services#Friend_User_Service_.22frd:u.22|frd:u]], and, in addition:


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 201: Line 201:
|-
|-
| 0x04020040
| 0x04020040
| ?
| [[FRDA:DeleteLocalAccount|DeleteLocalAccount]]
|-
|-
| 0x04030040
| 0x04030040
| [[FRDA:SetLocalAccountId|SetLocalAccountId]]
| [[FRDA:LoadLocalAccount|LoadLocalAccount]]
|-
|-
| 0x04040000
| 0x04040000
| ?
| [[FRDA:UnloadLocalAccount|UnloadLocalAccount]]
|-
|-
| 0x04050000
| 0x04050000
| Used in creating the user Mii. No cmdbuff parameters.
| [[FRDA:SaveLocalAccountData|SaveLocalAccountData]]
|-
|-
| 0x04060042
| 0x04060042
Line 216: Line 216:
|-
|-
| 0x04070D80
| 0x04070D80
| AddFriendOffline
| [[FRDA:AddFriendOffline|AddFriendOffline]]
|-
|-
| 0x040802C0
| 0x040802C0
| ?
| [[FRDA:UpdateFriendScreenName|UpdateFriendScreenName]]
|-
|-
| 0x04090100
| 0x04090100
Line 225: Line 225:
|-
|-
| 0x040A0100
| 0x040A0100
| UpdatePlayingGame
| [[FRDA:UpdatePlayingGame|UpdatePlayingGame]]
|-
|-
| 0x040B00C0
| 0x040B00C0
| UpdatePreferences
| [[FRDA:UpdatePreference|UpdatePreference]]
|-  
|-  
| 0x040C0800
| 0x040C0800
Line 234: Line 234:
|-
|-
| 0x040D0100
| 0x040D0100
| UpdateFavoriteGame
| [[FRDA:UpdateFavoriteGame|UpdateFavoriteGame]]
|-
|-
| 0x040E0040
| 0x040E0040
| UpdateNcPrincipalId
| [[FRDA:SetNcPrincipalId|SetNcPrincipalId]]
|-
|-
| 0x040F...
| 0x040F0240
| UpdateComment
| [[FRDA:UpdateComment|UpdateComment]]
|-
|-
| 0x04100000
| 0x04100000
| ?
| [[FRDA:IncrementMoveCount|IncrementMoveCount]]
|}
|}
=Save Data=
See [[FRD_Savegame|FRD Savegame]].


=HTTPS Requests=
=HTTPS Requests=
Line 327: Line 331:
| 0x14
| 0x14
| u8 ApplicationArg[20]
| u8 ApplicationArg[20]
|}
==Preference==
{| class="wikitable" border="1"
|-
! Offset !! Size !! Description
|-
| 0x0 || 0x1 || bool IsPublicMode, whether or not the online status is shown
|-
| 0x1 || 0x1 || bool IsShowGameMode, whether or not the currently played game is shown
|-
| 0x2 || 0x1 || bool IsShowPlayedMode, whether or not the play history is shown
|}
|}


Line 492: Line 508:
! Offset !! Size !! Description
! Offset !! Size !! Description
|-
|-
| 0x0 || 0x4 || [[Friend_Services#NASC_Result|NASC Login Result]]
| 0x0 || 0x4 || [[Friend_Services#NASC_Result|NASC SVCLOC Result]]
|-
|-
| 0x4 || 0x4 || HTTP Status Code
| 0x4 || 0x4 || HTTP Status Code
Line 527: Line 543:
| 0x4A || 0x1 || u8, [[Mii#Mii_format|Mii Character Set]]
| 0x4A || 0x1 || u8, [[Mii#Mii_format|Mii Character Set]]
|-
|-
| 0x4B || 0x70 || [[Friend_Services#Mii_Data|Friend Mii Data]] wrapped using [[APT:Wrap]]
| 0x4B || 0x70 || [[Friend_Services#Mii_Data|Friend Mii Data]] wrapped using [[APT:Wrap]] (Unwrapped size: 0x60)
|-
|-
| 0xBB || 0x16 || 10-Character UTF-16 Screen Name (10 characters + null termination)
| 0xBB || 0x16 || 10-Character UTF-16 Screen Name (10 characters + null termination)
Line 557: Line 573:
|}
|}


==Decrypted ApproachContext Payload==
{| class="wikitable" border="1"
|-
! Offset !! Size !! Description
|-
| 0x0 || 0x1 || (u8) unknown, initialized to 1 internally, set to 1 when the PS encryption command succeeds, otherwise 0. Must be 1 when decrypting, otherwise error 0xE0E0C4E9 is returned
|-
| 0x1 || 0x1 || (u8) unknown, always set to 0
|-
| 0x2 || 0x1 || (u8) unknown, initialized to 2 internally, always set to either 1 when the PS encryption command succeeds, or otherwise 0. Must be 1 when decrypting, otherwise error 0xE0E0C4E9 is returned
|-
| 0x3 || 0x1 || (u8) unknown, always set to 0
|-
| 0x4 || 0x1 || bool, Has Mii
|-
| 0x5 || 0x1 || bool, Profanity Flag
|-
| 0x6 || 0x1 || u8, [[Mii#Mii_format|Mii Character Set]]
|-
| 0x7 || 0x1 || padding
|-
| 0x8 || 0x10 || [[Friend_Services#FriendKey|FriendKey]] of the console that created this approach context
|-
| 0x18 || 0x48 || [[Friend_Services#FriendProfile|FriendProfile]] of the console that created this approach context
|-
| 0x60 || 0x60 || [[Friend_Services#Mii_Data|Friend Mii Data]] of the console that created this approach context
|-
| 0xC0 || 0x16 || 10-Character UTF-16 Screen Name (10 characters + null termination)
|-
| 0xD6 || 0x12A || unused
|}


= Notification Events =
= Notification Events =
Line 568: Line 616:


==Notification Event Types==
==Notification Event Types==
The following event types are accessible to all frd:u and frd:a sessions:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value
! Value !! Description
! Description
|-
| 1 || The console went online.
|-
| 2 || The console went offline.
|-
| 3 || A friend is now present (went online).
|-
|-
| 1
| 4 || A friend changed their presence, and the current system's JoinGameID is the same as their new or old JoinGameID.
| The console went online.
|-
|-
| 2
| 5 || A friend changed their Mii.
| The console went offline.
|-
|-
| 3
| 6 || A friend changed their [[Friend_Services#Profile|Profile]].
| A friend is now present (went online).
|-
|-
| 5
| 7 || A friend is no longer present (went offline).
| A friend changed their Mii.
|-
|-
| 6
| 8 || A friend has added you back as a friend (if you had added them before as a "provisionally registered" friend).
| A friend changed their [[Friend_Services#Profile|Profile]].
|-
|-
| 7
| 9 || A friend sent you an invitation, and the current system's JoinGameID matches that of the friend.
| A friend is no longer present (went offline).
|}
 
The following values, while signaled internally normally, are not exposed to sessions in any way:
{| class="wikitable" border="1"
|-
|-
| 8
! Value !! Description
| A friend has added you back as a friend (if you had added them before as a "provisionally registered" friend).
|-
|-
| 9
| 145
| A friend sent you a **joinable** game invitation(?) (only signaled when the console's JoinGameID matches that of the friend).
| A friend changed their game mode description.
|-
|-
| 146
| 146
Line 602: Line 653:
| 147
| 147
| A friend changed their personal message.
| A friend changed their personal message.
|-
| 148
| A friend changed their presence, but their JoinGameID does not match that of the system.
|-
|-
| 149
| 149
| A friend sent you an invitation. (signaled regardless of whether the console's JoinGameID matches that of the friend)
| A friend sent you an invitation, but their JoinGameID does not match that of the system.
|}
|}


Line 708: Line 762:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Value
! Value !! 0 !! 1 !! 2 !! 3 !! 4 !! 5 !! 6 !! 7 !! 8 !! 9 !! 10 !! 11 !! 12 !! 13 !! 14 !! 15 !! 16 !! 17 !! 18 !! 19 !! 20 !! 21 !! 22 !! 23 !! 24 !! 25 !! >=26
! Server Type Letter
|-
| 0
| L
|-
| 1
| C
|-
| 2
| S
|-
| 3
| D
|-
| 4
| I
|-
| 5
| T
|-
| 6
| U (fallback to default value)
|-
| 7
| J
|-
| 8
| X
|-
| 9
| A
|-
| 10
| B
|-
| 11
| C
|-
| 12
| D
|-
| 13
| E
|-
| 14
| F
|-
| 15
| G
|-
| 16
| H
|-
| 17
| I
|-
| 18
| J
|-
| 19
| K
|-
| 20
| L
|-
| 21
| M
|-
| 22
| N
|-
| 23
| O
|-
| 24
| P
|-
| 25
| Q
|-
|-
| >=26
! Letter
| U
| L || C || S || D || I || T || U (fallback to default value) || J || X || A || B || C || D || E || F || G || H || I || J || K || L || M || N || O || P || Q || U
|}
|}