![]() |
Morse Micro IoT SDK
2.6.4-esp32
|
Data Structures | |
| struct | mmwlan_version |
| Structure for retrieving version information from the mmwlan subsystem. More... | |
| struct | mmwlan_bcf_metadata |
| Board configuration file (BCF) metadata. More... | |
| struct | mmwlan_scan_config |
| Scan configuration data structure. More... | |
| struct | mmwlan_twt_config_args |
| Structure for storing Target Wake Time (TWT) configuration arguments. More... | |
| struct | mmwlan_boot_args |
| Arguments data structure for mmwlan_boot(). More... | |
| struct | mmwlan_scan_result |
| Result of the scan request. More... | |
| struct | mmwlan_sta_args |
| Arguments data structure for mmwlan_sta_enable(). More... | |
| struct | mmwlan_scan_args |
| Structure to hold scan arguments. More... | |
| struct | mmwlan_scan_req |
| Structure to hold arguments specific to a given instance of a scan. More... | |
Typedefs | |
| typedef void(* | mmwlan_scan_rx_cb_t) (const struct mmwlan_scan_result *result, void *arg) |
| mmwlan scan rx callback function prototype. More... | |
| typedef void(* | mmwlan_sta_status_cb_t) (enum mmwlan_sta_state sta_state) |
| STA status callback function prototype. More... | |
| typedef void(* | mmwlan_scan_complete_cb_t) (enum mmwlan_scan_state scan_state, void *arg) |
| mmwlan scan complete callback function prototype. More... | |
Enumerations | |
| enum | mmwlan_sta_state { MMWLAN_STA_DISABLED , MMWLAN_STA_CONNECTING , MMWLAN_STA_CONNECTED } |
| Enumeration of states in STA mode. More... | |
| enum | mmwlan_station_type { MMWLAN_STA_TYPE_SENSOR = 0x01 , MMWLAN_STA_TYPE_NON_SENSOR = 0x02 } |
| Enumeration of S1G non-AP STA types. More... | |
| enum | mmwlan_scan_state { MMWLAN_SCAN_SUCCESSFUL , MMWLAN_SCAN_TERMINATED , MMWLAN_SCAN_RUNNING } |
| Enumeration of states in Scan mode. More... | |
Functions | |
| enum mmwlan_status | mmwlan_get_version (struct mmwlan_version *version) |
| Retrieve version information from morselib and the connected Morse transceiver. More... | |
| enum mmwlan_status | mmwlan_get_bcf_metadata (struct mmwlan_bcf_metadata *metadata) |
| Read the metadata from the board configuration file (BCF)r. More... | |
| enum mmwlan_status | mmwlan_override_max_tx_power (uint16_t tx_power_dbm) |
| Override the maximum TX power. More... | |
| enum mmwlan_status | mmwlan_set_rts_threshold (unsigned rts_threshold) |
| Set the RTS threshold. More... | |
| enum mmwlan_status | mmwlan_set_sgi_enabled (bool sgi_enabled) |
| Sets whether or not Short Guard Interval (SGI) support is enabled. More... | |
| enum mmwlan_status | mmwlan_set_subbands_enabled (bool subbands_enabled) |
| Sets whether or not sub-band support is enabled for transmit. More... | |
| enum mmwlan_status | mmwlan_set_power_save_mode (enum mmwlan_ps_mode mode) |
| Sets whether or not the 802.11 power save is enabled. More... | |
| enum mmwlan_status | mmwlan_set_ampdu_enabled (bool ampdu_enabled) |
| Sets whether or not Aggregated MAC Protocol Data Unit (A-MPDU) support is enabled. More... | |
| enum mmwlan_status | mmwlan_set_fragment_threshold (unsigned fragment_threshold) |
| Set the Fragmentation threshold. More... | |
| enum mmwlan_status | mmwlan_set_scan_config (const struct mmwlan_scan_config *config) |
| Update the scan configuration with the given settings. More... | |
| enum mmwlan_status | mmwlan_twt_add_configuration (const struct mmwlan_twt_config_args *twt_config_args) |
| Add configurations for Target Wake Time (TWT). More... | |
| enum mmwlan_status | mmwlan_boot (const struct mmwlan_boot_args *args) |
| Boot the Morse Micro transceiver and leave it in an idle state. More... | |
| enum mmwlan_status | mmwlan_shutdown (void) |
| Perform a clean shutdown of the Morse Micro transceiver, including cleanly disconnecting from a connected AP, if necessary. More... | |
| enum mmwlan_status | mmwlan_sta_enable (const struct mmwlan_sta_args *args, mmwlan_sta_status_cb_t sta_status_cb) |
| Enable station mode. More... | |
| enum mmwlan_status | mmwlan_sta_disable (void) |
| Disable station mode. More... | |
| enum mmwlan_sta_state | mmwlan_get_sta_state (void) |
| Gets the current WLAN STA state. More... | |
| enum mmwlan_status | mmwlan_scan_request (const struct mmwlan_scan_req *scan_req) |
| Request a scan. More... | |
| enum mmwlan_status | mmwlan_scan_abort (void) |
| Abort in progress or pending scans. More... | |
| enum mmwlan_status | mmwlan_get_mac_addr (uint8_t *mac_addr) |
| Gets the MAC address of this device. More... | |
| uint16_t | mmwlan_get_aid (void) |
| Gets the station's AID. More... | |
| enum mmwlan_status | mmwlan_get_bssid (uint8_t *bssid) |
| Gets the BSSID of the AP to which the STA is associated. More... | |
| int32_t | mmwlan_get_rssi (void) |
| Gets the RSSI measured from the AP. More... | |
| #define MMWLAN_BCF_BOARD_DESC_MAXLEN (31) |
| #define MMWLAN_BCF_BUILD_VERSION_MAXLEN (31) |
| #define MMWLAN_BOOT_ARGS_INIT { 0 } |
| #define MMWLAN_FW_VERSION_MAXLEN (32) |
| #define MMWLAN_MINIMUM_FRAGMENT_THRESHOLD (256) |
Minimum value of fragmentation threshold that can be set with mmwlan_set_fragment_threshold().
| #define MMWLAN_MORSELIB_VERSION_MAXLEN (32) |
| #define MMWLAN_SCAN_ARGS_INIT { MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS, NULL, 0, { 0 }, 0 } |
Initializer for mmwlan_scan_args.
For example:
| #define MMWLAN_SCAN_CONFIG_INIT { MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS } |
Initializer for mmwlan_scan_config.
| #define MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS (105) |
Default value for mmwlan_scan_args.dwell_time_ms.
Note that reducing the dwell time below this value may impact scan reliability.
| #define MMWLAN_SCAN_MIN_DWELL_TIME_MS (15) |
Minimum value for mmwlan_scan_args.dwell_time_ms.
| #define MMWLAN_SCAN_REQ_INIT { NULL, NULL, NULL, MMWLAN_SCAN_ARGS_INIT } |
Initializer for mmwlan_scan_req.
For example:
| #define MMWLAN_STA_ARGS_INIT |
Initializer for mmwlan_sta_args.
| #define MMWLAN_TWT_CONFIG_ARGS_INIT |
Initializer for mmwlan_twt_config_args.
For example:
| typedef void(* mmwlan_scan_complete_cb_t) (enum mmwlan_scan_state scan_state, void *arg) |
| typedef void(* mmwlan_scan_rx_cb_t) (const struct mmwlan_scan_result *result, void *arg) |
| typedef void(* mmwlan_sta_status_cb_t) (enum mmwlan_sta_state sta_state) |
| enum mmwlan_scan_state |
Enumeration of states in Scan mode.
| enum mmwlan_sta_state |
| enum mmwlan_station_type |
| enum mmwlan_status mmwlan_boot | ( | const struct mmwlan_boot_args * | args | ) |
Boot the Morse Micro transceiver and leave it in an idle state.
| args | Boot arguments. May be NULL, in which case default values will be used. |
| uint16_t mmwlan_get_aid | ( | void | ) |
Gets the station's AID.
| enum mmwlan_status mmwlan_get_bcf_metadata | ( | struct mmwlan_bcf_metadata * | metadata | ) |
Read the metadata from the board configuration file (BCF)r.
| metadata | Pointer to a metadata data structure to be filled out on success. |
MMWLAN_SUCCESS on success else an error code. | enum mmwlan_status mmwlan_get_bssid | ( | uint8_t * | bssid | ) |
Gets the BSSID of the AP to which the STA is associated.
| bssid | Buffer to receive the BSSID. Length must be MMWLAN_MAC_ADDR_LEN. Will be set to 00:00:00:00:00:00 if the station is not currently associated. |
| enum mmwlan_status mmwlan_get_mac_addr | ( | uint8_t * | mac_addr | ) |
Gets the MAC address of this device.
The MAC address address comes from one of the following sources, in descending priority order:
mmhal_read_mac_addr() 02:01:XX:XX:XX:XXmmhal_read_mac_addr()) then the transceiver must have been booted at least once before this function is invoked.| mac_addr | Buffer to receive the MAC address. Length must be MMWLAN_MAC_ADDR_LEN. |
| int32_t mmwlan_get_rssi | ( | void | ) |
Gets the RSSI measured from the AP.
When power save is enabled, this will only be updated when traffic is received from the AP.
| enum mmwlan_sta_state mmwlan_get_sta_state | ( | void | ) |
Gets the current WLAN STA state.
| enum mmwlan_status mmwlan_get_version | ( | struct mmwlan_version * | version | ) |
Retrieve version information from morselib and the connected Morse transceiver.
| version | The data structure to fill out with version information. |
fw_version field of version will be set to a zero length string.MMWLAN_SUCCESS on success else an error code. | enum mmwlan_status mmwlan_override_max_tx_power | ( | uint16_t | tx_power_dbm | ) |
Override the maximum TX power.
If no override is specified then the maximum TX power used will be the maximum TX power allowed for the channel in the current regulatory domain.
| tx_power_dbm | The maximum TX power override to set (in dBm). Set to zero to disable the override. |
| enum mmwlan_status mmwlan_scan_abort | ( | void | ) |
Abort in progress or pending scans.
The scan callback will be called back with result code MMWLAN_SCAN_TERMINATED for all aborted scans.
| enum mmwlan_status mmwlan_scan_request | ( | const struct mmwlan_scan_req * | scan_req | ) |
Request a scan.
If the transceiver is not already powered on, it will be powered on before the scan is initiated. The power on procedure will block this function. The transceiver will remain powered on after scan completion and must be shutdown by invoking mmwlan_shutdown().
| scan_req | Scan request instance. See mmwlan_scan_req. |
| enum mmwlan_status mmwlan_set_ampdu_enabled | ( | bool | ampdu_enabled | ) |
Sets whether or not Aggregated MAC Protocol Data Unit (A-MPDU) support is enabled.
This defaults to enabled, if not set otherwise.
| ampdu_enabled | Boolean value indicating whether AMPDU support should be enabled. |
| enum mmwlan_status mmwlan_set_fragment_threshold | ( | unsigned | fragment_threshold | ) |
Set the Fragmentation threshold.
Maximum length of the frame, beyond which packets must be fragmented into two or more frames.
| fragment_threshold | The fragmentation threshold (in octets) to set, or zero to disable the fragmentation threshold. Minimum value (if not zero) is given by MMWLAN_MINIMUM_FRAGMENT_THRESHOLD. |
| enum mmwlan_status mmwlan_set_power_save_mode | ( | enum mmwlan_ps_mode | mode | ) |
Sets whether or not the 802.11 power save is enabled.
Defaults to MMWLAN_PS_ENABLED
| mode | enum indicating which 802.11 power save mode to use. |
| enum mmwlan_status mmwlan_set_rts_threshold | ( | unsigned | rts_threshold | ) |
Set the RTS threshold.
When packets larger than the RTS threshold are transmitted they are protected by an RTS/CTS exchange.
| rts_threshold | The RTS threshold (in octets) to set, or 0 to disable. |
| enum mmwlan_status mmwlan_set_scan_config | ( | const struct mmwlan_scan_config * | config | ) |
Update the scan configuration with the given settings.
| config | The new configuration to set. |
| enum mmwlan_status mmwlan_set_sgi_enabled | ( | bool | sgi_enabled | ) |
Sets whether or not Short Guard Interval (SGI) support is enabled.
Defaults to enabled if not set otherwise.
| sgi_enabled | Boolean value indicating whether SGI support should be enabled. |
| enum mmwlan_status mmwlan_set_subbands_enabled | ( | bool | subbands_enabled | ) |
Sets whether or not sub-band support is enabled for transmit.
Defaults to enabled if not set otherwise.
| subbands_enabled | Boolean value indicating whether sub-band support should be enabled. |
| enum mmwlan_status mmwlan_shutdown | ( | void | ) |
Perform a clean shutdown of the Morse Micro transceiver, including cleanly disconnecting from a connected AP, if necessary.
Has no effect if the transceiver is already shutdown.
| enum mmwlan_status mmwlan_sta_disable | ( | void | ) |
Disable station mode.
This will disconnect 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 shut down the transceiver.
| enum mmwlan_status mmwlan_sta_enable | ( | const struct mmwlan_sta_args * | args, |
| mmwlan_sta_status_cb_t | sta_status_cb | ||
| ) |
Enable station mode.
This will power on the transceiver then initiate connection to the given Access Point. If station mode is already enabled when this function is invoked then it will disconnect from (if already connected) and initiate connection to the given AP.
sta_status_cb) must not block and MMWLAN API functions may not be invoked from the callback.| args | STA arguments (e.g., SSID, etc.). See mmwlan_sta_args. |
| sta_status_cb | Optional callback to be invoked on STA state changes. May be NULL. |
| enum mmwlan_status mmwlan_twt_add_configuration | ( | const struct mmwlan_twt_config_args * | twt_config_args | ) |
Add configurations for Target Wake Time (TWT).
| twt_config_args | TWT configuration arguments mmwlan_twt_config_args. |