Changes

3,221 bytes added ,  21:35, 31 May 2022
no edit summary
Line 6: Line 6:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || OpenMode
+
| 0 || [[#OpenMode]]
 
|-
 
|-
| 1 || CloseMode
+
| 1 || [[#CloseMode]]
 
|-
 
|-
| 2 || GetMacAddress
+
| 2 || [[#GetMacAddress]]
 
|-
 
|-
| 3 || StartScan
+
| 3 || [[#StartScan]]
 
|-
 
|-
| 4 || StopScan
+
| 4 || [[#StopScan]]
 
|-
 
|-
| 5 || Connect
+
| 5 || [[#Connect]]
 
|-
 
|-
| 6 || CancelConnect
+
| 6 || [[#CancelConnect]]
 
|-
 
|-
| 7 || Disconnect
+
| 7 || [[#Disconnect]]
 
|-
 
|-
| 8 || GetSystemEvent
+
| 8 || [[#GetSystemEvent]]
 
|-
 
|-
 
| 9 || [[#GetConnectionStatus]]
 
| 9 || [[#GetConnectionStatus]]
 
|-
 
|-
| 10 || GetState
+
| 10 || [[#GetState]]
 
|-
 
|-
| 11 || GetScanResult
+
| 11 || [[#GetScanResult]]
 
|-
 
|-
| 12 || GetRssi
+
| 12 || [[#GetRssi]]
 
|-
 
|-
| 13 || ChangeRxAntenna
+
| 13 || [[#ChangeRxAntenna]]
 
|-
 
|-
| 14 || GetFwVersion
+
| 14 || [[#GetFwVersion]]
 
|-
 
|-
| 15 || RequestSleep
+
| 15 || [[#RequestSleep]]
 
|-
 
|-
| 16 || RequestWakeUp
+
| 16 || [[#RequestWakeUp]]
 
|-
 
|-
| 17 || ConnectWithWps
+
| 17 || [[#ConnectWithWps]]
 
|-
 
|-
 
| 18 || [3.0.0+]
 
| 18 || [3.0.0+]
Line 62: Line 62:  
| 27 || [4.0.0+]
 
| 27 || [4.0.0+]
 
|-
 
|-
| 28 || [5.0.0+] InitializeWlan
+
| 28 || [5.0.0+] [[#InitializeWlan]]
 
|-
 
|-
| 29 || [7.0.0+] FinalizeWlan
+
| 29 || [7.0.0+] [[#FinalizeWlan]]
 
|-
 
|-
 
| 30 || [8.0.0+]
 
| 30 || [8.0.0+]
Line 90: Line 90:     
[7.0.0+] Input/output for cmds 27/28 were swapped, perhaps these cmds were swapped?
 
[7.0.0+] Input/output for cmds 27/28 were swapped, perhaps these cmds were swapped?
 +
 +
== OpenMode ==
 +
No input/output.
 +
 +
Sends command message 0x6 to the state machine.
 +
 +
== CloseMode ==
 +
No input/output.
 +
 +
Sends command message 0x5 to the state machine.
 +
 +
== GetMacAddress ==
 +
No input. Returns an output [[#MacAddress]].
 +
 +
Sends command message 0x18 to the state machine.
 +
 +
== StartScan ==
 +
Takes a type-0x15 input buffer. No output.
 +
 +
Sends command messages 0xA and 0x14 to the state machine.
 +
 +
== StopScan ==
 +
No input/output.
 +
 +
Sends command message 0x16 to the state machine.
 +
 +
== Connect ==
 +
Takes an input [[#ConnectParam]]. No output.
 +
 +
Sends command messages 0xA, 0x13 and 0x20 to the state machine.
 +
 +
== CancelConnect ==
 +
No input/output.
 +
 +
Sends command message 0x23 to the state machine.
 +
 +
== Disconnect ==
 +
No input/output.
 +
 +
Sends command message 0x24 to the state machine.
 +
 +
== GetSystemEvent ==
 +
Takes an input u32 '''SystemEventType'''. Returns an output Event handle.
    
== GetConnectionStatus ==
 
== GetConnectionStatus ==
No input, returns an output 0x3C-byte struct.
+
No input. Returns an output [[#ConnectionStatus]].
   −
This copies data from state to the output struct.
+
== GetState ==
 +
No input. Returns an output [[#State]].
   −
{| class="wikitable" border="1"
+
Sends command message 0x80 to the state machine.
|-
+
 
! Offset || Size || Description
+
== GetScanResult ==
|-
+
Takes a type-0x6 output buffer containing a [[#ScanResult]]. No output.
| 0x0 || 0x4 ||
+
 
|-
+
Sends command message 0x15 to the state machine.
| 0x4 || 0x4 ||
+
 
|-
+
== GetRssi ==
| 0x8 || 0x2 || Channel
+
No input. Returns an output u32 '''Rssi'''.
|-
+
 
| 0xA || 0x6 || AccessPoint MAC address
+
Sends command message 0x2E to the state machine.
|-
+
 
| 0x10 || 0x22 || u8 SSID_len, then the SSID data.
+
== ChangeRxAntenna ==
|-
+
Takes an input u32. No output.
| 0x32 || 0x2 ||
+
 
|-
+
Sends command message 0x30 to the state machine.
| 0x34 || 0x2 ||
+
 
|-
+
== GetFwVersion ==
| 0x36 || 0x2 ||
+
Takes a type-0xA output buffer containing a [[#FwVersion]]. No output.
|-
+
 
| 0x38 || 0x2 ||
+
Sends command message 0x32 to the state machine.
|}
+
 
 +
== RequestSleep ==
 +
No input/output.
 +
 
 +
Sends command message 0x33 to the state machine.
 +
 
 +
== RequestWakeUp ==
 +
No input/output.
 +
 
 +
Sends command messages 0x1, 0x80 and 0x81 to the state machine.
 +
 
 +
== ConnectWithWps ==
 +
Takes a type-0x9 input buffer containing a [[#WpsPin]] and two input u32s '''WpsMethod''' and '''BeaconLostTimeout'''. No output.
 +
 
 +
Sends command messages 0xA, 0x13 and 0x21 to the state machine.
    
== Cmd19 ==
 
== Cmd19 ==
Line 418: Line 476:  
[7.0.0+] Cmd14 now takes an input u8.
 
[7.0.0+] Cmd14 now takes an input u8.
   −
= Notes =
+
= Ssid =
 +
This is "nn::wlan::Ssid". This is a 0x20-byte struct.
 +
 
 +
= MacAddress =
 +
This is a 0x6-byte struct with 1-byte alignment.
 +
 
 +
= ConnectParam =
 +
This is a 0x80-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x20 || [[#Ssid|Ssid]]
 +
|-
 +
| 0x20 || 0x6 || [[#MacAddress|Bssid]]
 +
|-
 +
| 0x26 || 0x2 || Reserved
 +
|-
 +
| 0x28 || 0x1 ||
 +
|-
 +
| 0x29 || 0x1 || Reserved
 +
|-
 +
| 0x2A || 0x2 || Channel
 +
|-
 +
| 0x2C || 0x4 || PrivacyMode
 +
|-
 +
| 0x30 || 0x4 || GroupPrivacyMode
 +
|-
 +
| 0x34 || 0x4 || KeyIdx
 +
|-
 +
| 0x38 || 0x40 || SecurityKey
 +
|-
 +
| 0x78 || 0x4 || Reserved
 +
|-
 +
| 0x7C || 0x4 || BeaconLostTimeout
 +
|}
 +
 
 +
= ConnectionStatus =
 +
This is a 0x3C-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 ||
 +
|-
 +
| 0x4 || 0x4 ||
 +
|-
 +
| 0x8 || 0x2 || Channel
 +
|-
 +
| 0xA || 0x6 || AccessPoint MAC address
 +
|-
 +
| 0x10 || 0x22 || u8 SSID_len, then the SSID data.
 +
|-
 +
| 0x32 || 0x2 ||
 +
|-
 +
| 0x34 || 0x2 ||
 +
|-
 +
| 0x36 || 0x2 ||
 +
|-
 +
| 0x38 || 0x2 ||
 +
|}
 +
 
 +
= ScanResult =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x4 || ScanBufferCapacity
 +
|-
 +
| 0x4 || 0x4 || BssInfoSize
 +
|-
 +
| 0x8 || 0x4 || BssInfoCount
 +
|-
 +
| 0xC || Variable || Array of [[#BssInfo]]
 +
|}
 +
 
 +
= BssInfo =
 +
This is a 0x58-byte struct.
 +
 
 +
= State =
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value
 +
! Description
 +
|-
 +
| 0 ||
 +
|-
 +
| 1 ||
 +
|-
 +
| 2 ||
 +
|-
 +
| 3 ||
 +
|-
 +
| 4 ||
 +
|-
 +
| 5 ||
 +
|-
 +
| 6 ||
 +
|-
 +
| 7 ||
 +
|-
 +
| 8 ||
 +
|-
 +
| 9 ||
 +
|-
 +
| 10 ||
 +
|-
 +
| 11 ||
 +
|-
 +
| 12 ||
 +
|-
 +
| 13 ||
 +
|-
 +
| 14 ||
 +
|-
 +
| 15 ||
 +
|-
 +
| 16 ||
 +
|-
 +
| 17 ||
 +
|-
 +
| 18 ||
 +
|-
 +
| 19 ||
 +
|}
 +
 
 +
= WpsPin =
 +
This is a 0x8-byte string.
 +
 
 +
= FwVersion =
 +
This is a 0x100-byte string.
   −
== Versions ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! System Version
 
! System Version
! Firmware string
+
! Firmware String
 
|-
 
|-
 
| [1.0.0] || 4356a3-roml/pcie-ag-msgbuf-splitrx-pktctx-keepalive-sr-proptxstatus-ampduhostreorder-dlystat-rxdesens-ntdds3-btcdyn-trfmgmt-pspretend-btafh-pktfilter-wowlpf-aoe Version: 7.35.252.58 CRC: f592f3bf Date: Tue 2016-10-04 23:54:54 PDT Ucode Ver: 1020.221 FWID: 01-5ec2fbfd
 
| [1.0.0] || 4356a3-roml/pcie-ag-msgbuf-splitrx-pktctx-keepalive-sr-proptxstatus-ampduhostreorder-dlystat-rxdesens-ntdds3-btcdyn-trfmgmt-pspretend-btafh-pktfilter-wowlpf-aoe Version: 7.35.252.58 CRC: f592f3bf Date: Tue 2016-10-04 23:54:54 PDT Ucode Ver: 1020.221 FWID: 01-5ec2fbfd