Morse Micro IoT SDK  2.11.2
WLAN Control API for Access Point (AP) mode

Detailed Description

API for configuration and control of Access Point (AP) mode.

Warning
ALPHA NOTICE: This is an alpha API that is under development. It is not intended for production use and breaking changes may be introduced in future releases

Data Structures

struct  mmwlan_ap_sta_status
 Data structure for communicating STA status information for stations connected to an AP. More...
 
struct  mmwlan_ap_args
 Arguments data structure for mmwlan_ap_enable(). More...
 

Macros

#define MMWLAN_DEFAULT_AP_BEACON_INTERVAL_TUS   (100)
 Default Beacon Interval in AP mode (in TUs). More...
 
#define MMWLAN_DEFAULT_AP_DTIM_PERIOD   (1)
 Default DTIM period in AP mode. More...
 
#define MMWLAN_DEFAULT_AP_MAX_STAS   (4)
 Default limit of connected stations. More...
 
#define MMWLAN_AP_MAX_STAS_LIMIT   (20)
 Maximum limit of connected stations. More...
 
#define MMWLAN_AP_ARGS_INIT
 Initializer for mmwlan_ap_args. More...
 

Typedefs

typedef void(* mmwlan_ap_sta_status_cb_t) (const struct mmwlan_ap_sta_status *sta_status, void *arg)
 Type definition for callback to be invoked on change in status of a connected STA. More...
 

Enumerations

enum  mmwlan_ap_sta_state { MMWLAN_AP_STA_UNKNOWN , MMWLAN_AP_STA_AUTHENTICATED , MMWLAN_AP_STA_ASSOCIATED , MMWLAN_AP_STA_AUTHORIZED }
 Enumeration of STA states. More...
 

Functions

enum mmwlan_status mmwlan_ap_get_sta_status (const uint8_t *sta_addr, struct mmwlan_ap_sta_status *sta_status)
 Gets the STA status of the STA with the given MAC address. More...
 
enum mmwlan_status mmwlan_ap_enable (const struct mmwlan_ap_args *args)
 Enable AP mode. More...
 
enum mmwlan_status mmwlan_ap_disable (void)
 Disable AP mode. More...
 
static enum mmwlan_status mmwlan_ap_get_bssid (uint8_t *bssid)
 Gets the BSSID address of the AP, if it is active. More...
 

Macro Definition Documentation

◆ MMWLAN_AP_ARGS_INIT

#define MMWLAN_AP_ARGS_INIT
Value:
{ \
.ssid = { 0 }, \
.ssid_len = 0, \
.bssid = { 0 }, \
.security_type = MMWLAN_OPEN, \
.passphrase = { 0 }, \
.passphrase_len = 0, \
.pmf_mode = MMWLAN_PMF_REQUIRED, \
.sae_owe_ec_groups = { 0 }, \
.op_class = 0, \
.s1g_chan_num = 0, \
.beacon_interval_tus = 0, \
.dtim_period = 0, \
.pri_bw_mhz = 0, \
.pri_1mhz_chan_idx = 0, \
.sta_status_cb = NULL, \
.sta_status_cb_arg = NULL, \
.max_stas = 0, \
.async_start = false, \
}
@ MMWLAN_PMF_REQUIRED
Protected management frames must be used.
Definition: mmwlan.h:132
@ MMWLAN_OPEN
Open (no security)
Definition: mmwlan.h:121

Initializer for mmwlan_ap_args.

See also
mmwlan_ap_args

Definition at line 1878 of file mmwlan.h.

◆ MMWLAN_AP_MAX_STAS_LIMIT

#define MMWLAN_AP_MAX_STAS_LIMIT   (20)

Maximum limit of connected stations.

Definition at line 1702 of file mmwlan.h.

◆ MMWLAN_DEFAULT_AP_BEACON_INTERVAL_TUS

#define MMWLAN_DEFAULT_AP_BEACON_INTERVAL_TUS   (100)

Default Beacon Interval in AP mode (in TUs).

Definition at line 1693 of file mmwlan.h.

◆ MMWLAN_DEFAULT_AP_DTIM_PERIOD

#define MMWLAN_DEFAULT_AP_DTIM_PERIOD   (1)

Default DTIM period in AP mode.

Definition at line 1696 of file mmwlan.h.

◆ MMWLAN_DEFAULT_AP_MAX_STAS

#define MMWLAN_DEFAULT_AP_MAX_STAS   (4)

Default limit of connected stations.

Definition at line 1699 of file mmwlan.h.

Typedef Documentation

◆ mmwlan_ap_sta_status_cb_t

typedef void(* mmwlan_ap_sta_status_cb_t) (const struct mmwlan_ap_sta_status *sta_status, void *arg)

Type definition for callback to be invoked on change in status of a connected STA.

Warning
ALPHA NOTICE: This is an alpha API that is under development; breaking changes may be introduced in future releases.
Parameters
sta_statusThe STA status information.
argOpaque argument that was provided when the callback was registered.

Definition at line 1747 of file mmwlan.h.

Enumeration Type Documentation

◆ mmwlan_ap_sta_state

Enumeration of STA states.

Warning
ALPHA NOTICE: This is an alpha API that is under development; breaking changes may be introduced in future releases.
Enumerator
MMWLAN_AP_STA_UNKNOWN 

The STA is not known.

MMWLAN_AP_STA_AUTHENTICATED 

The STA is authenticated but not associated.

MMWLAN_AP_STA_ASSOCIATED 

The STA is associated but not yet authorized for data transmission.

MMWLAN_AP_STA_AUTHORIZED 

The STA is fully connected and authorized for data transmission.

Definition at line 1710 of file mmwlan.h.

Function Documentation

◆ mmwlan_ap_disable()

enum mmwlan_status mmwlan_ap_disable ( void  )

Disable AP mode.

Warning
ALPHA NOTICE: This is an alpha API that is under development; breaking changes may be introduced in future releases.

This will disconnect any stations from the AP. It will also shut down the transceiver if nothing else is holding it open. Note that if the transceiver was booted by mmwlan_boot() then this function will not shut down the transceiver.

Returns
MMWLAN_SUCCESS if successful and the transceiver was also shut down, MMWLAN_SHUTDOWN_BLOCKED if successful and the transceiver was not shut down, else an appropriate error code.

◆ mmwlan_ap_enable()

enum mmwlan_status mmwlan_ap_enable ( const struct mmwlan_ap_args args)

Enable AP mode.

Warning
ALPHA NOTICE: This is an alpha API that is under development; breaking changes may be introduced in future releases.

This will power on the transceiver, if it is not already running, then start Access Point mode.

Warning
Channel list must be set before enabling AP mode. See mmwlan_set_channel_list().
OWE security is not currently supported for AP mode.
Parameters
argsArguments (e.g., SSID, etc.). See mmwlan_ap_args.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_ap_get_bssid()

static enum mmwlan_status mmwlan_ap_get_bssid ( uint8_t *  bssid)
inlinestatic

Gets the BSSID address of the AP, if it is active.

Warning
ALPHA NOTICE: This is an alpha API that is under development; breaking changes may be introduced in future releases.
Parameters
bssidThe BSSID of the AP. Length must be MMWLAN_MAC_ADDR_LEN.
Returns
MMWLAN_SUCCESS on success, MMWLAN_UNAVAILABLE if AP mode is not active.

Definition at line 1944 of file mmwlan.h.

◆ mmwlan_ap_get_sta_status()

enum mmwlan_status mmwlan_ap_get_sta_status ( const uint8_t *  sta_addr,
struct mmwlan_ap_sta_status sta_status 
)

Gets the STA status of the STA with the given MAC address.

Warning
ALPHA NOTICE: This is an alpha API that is under development; breaking changes may be introduced in future releases.
Parameters
[in]sta_addrAddress of the STA to get the status of.
[out]sta_statusSTA status structure to be filled out by this function. May be NULL.
Returns
MMWLAN_SUCCESS on success, MMWLAN_NOT_FOUND if no STA record was found matching the given MAC address, or another error code as appropriate.