µC/TCP-IP supports only wireless devices which include an integrated wireless supplicant (i.e., the client-side software that performs scan and login requests). This kind of hardware requires you to send management command commands to the device to accomplish some operation such as scan, join, set MAC address, etc. Some of these management command commands may take a while to be completed. For those command commands most of the wireless device devices return the command result via a management frame which must be received like a packet. So, the Wireless Manager must provide mechanisms to send management commands, and then return once the management command is completed.
The Wireless Manager API should be implemented as follows:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
const NET_WIFI_MGR_API NetWiFiMgr_API_Generic = {
&NetWiFiMgr_Init, (1)
&NetWiFiMgr_Start, (2)
&NetWiFiMgr_Stop, (3)
&NetWiFiMgr_AP_Scan, (4)
&NetWiFiMgr_AP_Join, (5)
&NetWiFiMgr_AP_Leave, (6)
&NetWiFiMgr_IO_Ctrl, (7)
&NetWiFiMgr_Mgmt, (8)
&NetWiFiMgr_Signal (9)
}; |
Panel | ||
---|---|---|
| ||
(1) Wireless Manager initialization function pointer (2) Wireless Manager start function pointer (3) Wireless Manager stop function pointer (4) Wireless Manager access point scan pointer (5) Wireless Manager access point join pointer (6) Wireless Manager access point leave pointer (7) Wireless Manager IO control pointer (8) Wireless Manager device driver management pointer (9) Wireless Manager signal response signal pointer |
μC/TCP-IP provides code that is compatible with most wireless device devices that embed the wireless supplicant. However, extended functionality must be implemented on a per wireless device basis. If additional functionality is required, it may be necessary to create an application specific Wireless Manager.
Note: It is the Wireless Manager developers’ responsibility to ensure that all of the functions listed within the API are properly implemented and that the order of the functions within the API structure is correct.
This The sections that follow describe the interactions between the device driver and the Wireless Manager layer provided with µC/TCP-IP.
Panel | ||
---|---|---|
| ||
Panel | ||
---|---|---|
| ||
(1) All management functionality present in the Wireless Manager API uses a simple state machine context to be set and updated by the device driver. The state machine context contains some fields used by the state machine to know what should be done after the call. Essentially, the state machine is implemented in (2) (3) If no response is needed to complete the command then the (4) When the response of the management command is received (5) The device driver can also use the Wireless Manager to send management commands defined within the driver during start and stop of the interface especially when a response is needed to complete the management command such as updating the wireless device firmware. Note that it’s not possible to use the Wireless Manager during initialization since receiving packets and managing frames cannot be done before the initialization is completed. (6) When data ready ISR occurs and the interface is signalled, the function (7) (8) Once the data is read and the frame type set by the device driver then the buffer is passed to the wireless interface layer to be processed. (9) (10) If the data received is a packet then the 802x layer is called to process the packet as it’s should done for an Ethernet packet. (11) If the data received is a management frame then (12) When the data is a management response previously initialized then the Wireless Manager must be signalled by using the Wireless Manager API. |