Line 573: |
Line 573: |
| These were added with [9.0.0+]. | | These were added with [9.0.0+]. |
| | | |
− | lp2p:app is used by [[Mario Kart Live: Home Circuit]]. | + | lp2p:app is used by [[Mario Kart Live: Home Circuit]]. lp2p:sys is used by [[Album_Applet|LibraryAppletPhotoViewer]] with [11.0.0+]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 677: |
Line 677: |
| | | |
| The [[#GetRole|role]] must be non-zero. The error from [[#GetNetworkInterfaceLastError]] will be returned if it's set. | | The [[#GetRole|role]] must be non-zero. The error from [[#GetNetworkInterfaceLastError]] will be returned if it's set. |
| + | |
| + | [11.0.0+] [[#GroupInfo]]+0x8A must be value 2, otherwise an error is returned. |
| | | |
| This sends an Action frame to the specified [[#GroupId]], with the specified destination [[#MacAddress_2|MacAddress]] (can be a broadcast address). | | This sends an Action frame to the specified [[#GroupId]], with the specified destination [[#MacAddress_2|MacAddress]] (can be a broadcast address). |
Line 1,215: |
Line 1,217: |
| | 0x3F || 0x1 || s8 Flags count. Must be <=0x3F. | | | 0x3F || 0x1 || s8 Flags count. Must be <=0x3F. |
| |- | | |- |
− | | 0x40 || 0x40 || Array of s8 with the above count. Each entry value must be <=0x3F. Each entry is an array index used to load a set of flags from a global array with the specified index. global_flags are also masked with flags loaded from here. | + | | 0x40 || 0x40 || Array of s8 with the above count. Each entry value must be <=0x3F. Each entry is an array index used to load a set of flags from a global array with the specified index. global_flags are also masked with flags loaded from here. User-processes use entryval=1 as the default, with [11.0.0+] entryval=0 can be used for standard WPA2-PSK (see +0x8A). |
| |- | | |- |
| | 0x80 || 0x1 || SupportedPlatform. Must match value 1. 0 is PlatformIdNX, 1 is PlatformIdFuji. | | | 0x80 || 0x1 || SupportedPlatform. Must match value 1. 0 is PlatformIdNX, 1 is PlatformIdFuji. |
Line 1,233: |
Line 1,235: |
| | 0x89 || 0x1 || PerformanceRequirement. | | | 0x89 || 0x1 || PerformanceRequirement. |
| |- | | |- |
− | | 0x8A || 0x1 || Security type, used during key derivation. 0 = use defaults, 1 = plaintext, 2 = encrypted. | + | | 0x8A || 0x1 || Security type, used during key derivation. 0 = use defaults, 1 = plaintext, 2 = encrypted. [11.0.0+] 3: Standard WPA2-PSK. |
| |- | | |- |
| | 0x8B || 0x1 || StaticAesKeyIndex. s8, used as the array-index for selecting the KeySource used with [[SPL_services#GenerateAesKek|GenerateAesKek]] during key derivation. Should be 1-2, otherwise GenerateAesKek is skipped and zeros are used for the AccessKey instead. | | | 0x8B || 0x1 || StaticAesKeyIndex. s8, used as the array-index for selecting the KeySource used with [[SPL_services#GenerateAesKek|GenerateAesKek]] during key derivation. Should be 1-2, otherwise GenerateAesKek is skipped and zeros are used for the AccessKey instead. |
Line 1,243: |
Line 1,245: |
| | 0x8F || 0x1 || If zero, a default value of 0x20 is used. | | | 0x8F || 0x1 || If zero, a default value of 0x20 is used. |
| |- | | |- |
− | | 0x1C0 || 0x1 || PresharedKeyBinarySize. Must be 0x20 during key derivation. | + | | 0x1C0 || 0x1 || PresharedKeyBinarySize. Must be 0x20 for PresharedKeyBinary. [11.0.0+] With WPA2-PSK, this must be value 1. |
| |- | | |- |
− | | 0x1C1 || 0x20 || PresharedKey. Used during key derivation. | + | | 0x1C1 || 0x3F ([9.0.0-10.2.0] 0x20) || PresharedKey. Used during key derivation. [11.0.0+] With WPA2-PSK, this is the passphrase string. |
| |} | | |} |
| | | |
− | loaded_flags are first loaded from elsewhere, then masked with the above flags when available. loaded_flags are used when +0x8A is 0. global_flags are loaded from global data. These flags are only used with [[#CreateGroup]]/[[#Join]]. Flags: | + | loaded_flags are first loaded from elsewhere, then masked with the above flags when available. loaded_flags are used when +0x8A is 0. global_flags are loaded from global data. These flags are only used with [[#CreateGroup]]/[[#Join]]. Flags (note that the following was updated with [11.0.0+], and differs from below): |
| * Bit2 clear: | | * Bit2 clear: |
| ** global_flags must be non-zero, and loaded_flags bit1 must be set. | | ** global_flags must be non-zero, and loaded_flags bit1 must be set. |
Line 1,501: |
Line 1,503: |
| | | |
| == lp2p == | | == lp2p == |
− | This is used for communicating with accessories over local wifi - in particular, [[Mario Kart Live: Home Circuit]] uses this. | + | This is used for communicating with accessories (external devices on [11.0.0+]) over local wifi. [[Mario Kart Live: Home Circuit]] uses this. [11.0.0+] [[Album_Applet|LibraryAppletPhotoViewer]] uses this. |
| | | |
| A beacon is broadcasted. | | A beacon is broadcasted. |
Line 1,509: |
Line 1,511: |
| Communication uses sockets with standard Data frames and the above Action frames. Switch consoles presumably only use the Action frames to communicate with each other? | | Communication uses sockets with standard Data frames and the above Action frames. Switch consoles presumably only use the Action frames to communicate with each other? |
| | | |
− | The key derived by ldn-sysmodule is used directly as the static CCMP key for all data-frames (CCMP / MIC is standard). | + | The key derived by ldn-sysmodule is used directly as the static CCMP key for all data-frames (CCMP / MIC is standard). However, with [[#GroupInfo]]+0x8A value 3, standard WPA2-PSK is used instead. |
− | | |
− | This uses infrastructure-mode (AccessPoint), and DHCP is used. The group-owner is the AccessPoint. Note that the probe response includes the same Nintendo tags included with the beacon. Once connected, the group-owner sends the same Epigram-vendor Action frame(s) described in [[#ldn]].
| |
| | | |
− | It's unknown whether any custom authentication is used.
| + | This uses infrastructure-mode (AccessPoint), and DHCP is used. The group-owner is the AccessPoint. Note that the probe response includes the same Nintendo tags included with the beacon. Once connected, the group-owner sends the same Epigram-vendor Action frame(s) described in [[#ldn]]. At this point socket communication can begin, including DHCP usage. |
| | | |
− | The DHCP server thread is started by the "nn.lp2p.StateMachine" thread eventually during group [[#CreateGroup|creation]]. The DHCP Offer option values are the following, at least when connecting with encryption disabled from a Linux machine: | + | The DHCP server thread is started by the "nn.lp2p.StateMachine" thread eventually during group [[#CreateGroup|creation]]. The DHCP Offer option values are the following: |
| * "Subnet Mask: 255.255.255.0" | | * "Subnet Mask: 255.255.255.0" |
| * "DHCP Server Identifier: {...}" | | * "DHCP Server Identifier: {...}" |
Line 1,527: |
Line 1,527: |
| | | |
| === Beacon === | | === Beacon === |
− | The SSID in the beacon is hidden (all-zero with the same length as the original SSID). The beacon contains two custom Nintendo tags with OUI <code>00:22:aa</code>. The beacon is identical to ldn, except for the following (besides SSID length difference and the lp2p-only Nintendo tags): | + | The SSID in the beacon can optionally be [[#GroupInfo|hidden]] (all-zero with the same length as the original SSID). The beacon contains two custom Nintendo tags with OUI <code>00:22:aa</code>. These Nintendo tags are not used when standard WPA2-PSK is being used. The beacon is identical to ldn, except for the following (besides SSID length difference and the lp2p-only Nintendo tags): |
| * "Tag: Traffic Indication Map (TIM)": "DTIM count" for lp2p is 1, with ldn it's 0. | | * "Tag: Traffic Indication Map (TIM)": "DTIM count" for lp2p is 1, with ldn it's 0. |
| * "Tag: HT Capabilities (802.11n D1.10)": "HT Short GI for 20MHz" is set to "Not supported", for ldn it's "Supported". | | * "Tag: HT Capabilities (802.11n D1.10)": "HT Short GI for 20MHz" is set to "Not supported", for ldn it's "Supported". |