Line 1,193: |
Line 1,193: |
| This is "nn::lp2p::GroupInfo". This is a 0x200-byte struct. | | This is "nn::lp2p::GroupInfo". This is a 0x200-byte struct. |
| | | |
− | [[Mario Kart Live: Home Circuit|mklive]] sets the SSID to a string generated from random data, the key-data is also set to random data. | + | [[Mario Kart Live: Home Circuit|mklive]] sets the SSID to a string generated from random data, the PresharedKey is also set to random data. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 1,205: |
Line 1,205: |
| | 0x10 || 0x8 || LocalCommunicationId. When zero, the value from control.nacp is loaded. Used during key derivation. | | | 0x10 || 0x8 || LocalCommunicationId. When zero, the value from control.nacp is loaded. Used during key derivation. |
| |- | | |- |
− | | 0x18 || 0x6 || "GROUP ID (BSSID)" [[#GroupId]]. When zero, the default is used. The default should be used here: an error is thrown if the data here doesn't match the output from [[WLAN_services|wlan:lcl]] cmd2. | + | | 0x18 || 0x6 || [[#GroupId]] ("GROUP ID (BSSID)"). When zero, the default is used. The default should be used here: an error is thrown if the data here doesn't match the output from [[WLAN_services|wlan:lcl]] cmd2. |
| |- | | |- |
− | | 0x1E || 0x21 || "GROUP NAME (SSID)" NUL-terminated string. If the SSID is invalid, a new SSID is generated, however in this case the original SSID must contain a '-' character. | + | | 0x1E || 0x21 || ServiceName ("GROUP NAME (SSID)"). NUL-terminated string. If the SSID is invalid, a new SSID is generated, however in this case the original SSID must contain a '-' character. |
| |- | | |- |
− | | 0x3F || 0x1 || s8 Flags_mask count. | + | | 0x3F || 0x1 || s8 Flags_mask count. Must be <=0x3F. |
| |- | | |- |
| | 0x40 || {above count} || Array of s8 with the above count. Each entry is an array index used to load a set of flags from a global array with the specified index. loaded_flags below is masked with the flags loaded here. global_flags are also masked with flags loaded from here. | | | 0x40 || {above count} || Array of s8 with the above count. Each entry is an array index used to load a set of flags from a global array with the specified index. loaded_flags below is masked with the flags loaded here. global_flags are also masked with flags loaded from here. |
| |- | | |- |
− | | 0x81 || 0x1 || s8, Must be <=0x8. During group creation this is passed to [[WLAN_services|wlan:lcl]] cmd40, when this is value 0 a default of value 1 is passed. During group-creation when the below +0x88 field is not value 0x2, the passed [[BTM_services#SetWlanMode|WlanMode]] is <code>x81_field_val > 3</code>. | + | | 0x80 || 0x1 || SupportedPlatform. 0 is PlatformIdNX, 1 is PlatformIdFuji. |
| |- | | |- |
− | | 0x84 || 0x2 || Wifi frequency: 24 = 2.4GHz, 50 = 5.0GHz. | + | | 0x81 || 0x1 || MemberCountMax. s8, Must be <=0x8. During group creation this is passed to [[WLAN_services|wlan:lcl]] cmd40, when this is value 0 a default of value 1 is passed. During group-creation when the below +0x88 field is not value 0x2, the passed [[BTM_services#SetWlanMode|WlanMode]] is <code>x81_field_val > 3</code>. |
| |- | | |- |
− | | 0x86 || 0x2 || "CHANNEL" s16. 0 = use default, otherwise this must be one of the following depending on the frequency field: | + | | 0x82 || 0x1 || |
| + | |- |
| + | | 0x84 || 0x2 || Frequency. Wifi channel frequency: 24 = 2.4GHz, 50 = 5.0GHz. |
| + | |- |
| + | | 0x86 || 0x2 || Channel ("CHANNEL"). Wifi channel number. 0 = use default, otherwise this must be one of the following depending on the frequency field: |
| * 24: 1, 6, 11. | | * 24: 1, 6, 11. |
| * 50: 36, 40, 44, 48. | | * 50: 36, 40, 44, 48. |
| |- | | |- |
− | | 0x88 || 0x1 || Used during group-creation to determine the [[BTM_services#SetWlanMode|WlanMode]] to use. When this is value 0x2, mode=3 is used, otherwise it's determined via the +0x81 field. | + | | 0x88 || 0x1 || NetworkMode. Used during group-creation to determine the [[BTM_services#SetWlanMode|WlanMode]] to use. When this is value 0x2, mode=3 is used, otherwise it's determined via the +0x81 field. |
| |- | | |- |
− | | 0x89 || 0x1 || | + | | 0x89 || 0x1 || PerformanceRequirement. |
| |- | | |- |
| | 0x8A || 0x1 || Security type. 0 = use defaults, 1 = plaintext, 2 = encrypted. | | | 0x8A || 0x1 || Security type. 0 = use defaults, 1 = plaintext, 2 = encrypted. |
| |- | | |- |
− | | 0x8B || 0x1 || s8 KeyId. 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. |
| + | |- |
| + | | 0x8D || 0x1 || Priority. Wifi channel priority. |
| |- | | |- |
− | | 0x8E || 0x1 || Bool flag, controls whether the SSID is hidden. | + | | 0x8E || 0x1 || StealthEnabled. Bool flag, controls whether the SSID is hidden. |
| |- | | |- |
| | 0x8F || 0x1 || If zero, a default value of 0x20 is used. | | | 0x8F || 0x1 || If zero, a default value of 0x20 is used. |
Line 1,237: |
Line 1,243: |
| | 0x110 || {above count} || Array of s8 with the above count for total entries. The flags are loaded by: <nowiki>"loaded_flags |= BIT(s8_entryvalue)"</nowiki>, with each entry. Afterwards, loaded_flags is masked with 0x7. loaded_flags must be non-zero. | | | 0x110 || {above count} || Array of s8 with the above count for total entries. The flags are loaded by: <nowiki>"loaded_flags |= BIT(s8_entryvalue)"</nowiki>, with each entry. Afterwards, loaded_flags is masked with 0x7. loaded_flags must be non-zero. |
| |- | | |- |
− | | 0x1C0 || 0x1 || Key data size. Must be 0x20. | + | | 0x1C0 || 0x1 || PresharedKeyBinarySize. Must be 0x20. |
| |- | | |- |
− | | 0x1C1 || 0x20 || Key data. | + | | 0x1C1 || 0x20 || PresharedKey. |
| |} | | |} |
| | | |