AP Example Application.
- Note
- It is assumed that you have followed the steps in the Getting Started guide and are therefore familiar with how to build, flash, and monitor an application using the MM-IoT-SDK framework.
Definition in file ap_mode.c.
#include <string.h>
#include "mmconfig.h"
#include "mmosal.h"
#include "mmutils.h"
#include "mm_app_common.h"
#include "mm_app_loadconfig.h"
Go to the source code of this file.
◆ _STRINGIFY
| #define _STRINGIFY |
( |
|
x | ) |
#x |
◆ AP_SSID
| #define AP_SSID MorseMicroIoT |
SSID of the AP.
(Do not quote; it will be stringified.)
Definition at line 51 of file ap_mode.c.
◆ MAX_STAS
◆ OP_CLASS
| #define OP_CLASS (71) /* US, 8 MHz */ |
Operating Class to use for AP.
This together with S1G_CHANNEL must correspond to a channel in the regulatory database.
Definition at line 83 of file ap_mode.c.
◆ PMF_MODE
◆ PRIMARY_1MHZ_CHANNEL_INDEX
| #define PRIMARY_1MHZ_CHANNEL_INDEX (0) |
Primary 1 MHz Channel Index to use for AP.
Definition at line 108 of file ap_mode.c.
◆ PRIMARY_BW_MHZ
| #define PRIMARY_BW_MHZ (0) |
Primary Bandwidth to use for AP.
Valid values:
Definition at line 103 of file ap_mode.c.
◆ S1G_CHANNEL
| #define S1G_CHANNEL (44) /* US, 8 MHz */ |
S1G Channel to use for AP.
This together with OP_CLASS must correspond to a channel in the regulatory database.
Definition at line 91 of file ap_mode.c.
◆ SAE_PASSPHRASE
| #define SAE_PASSPHRASE 12345678 |
Passphrase of the AP (ignored if security type is not SAE).
(Do not quote; it will be stringified.)
Definition at line 57 of file ap_mode.c.
◆ SECURITY_TYPE
◆ STATIC_GATEWAY
| #define STATIC_GATEWAY "192.168.1.1" |
Statically configured gateway address.
Definition at line 36 of file ap_mode.c.
◆ STATIC_LOCAL_IP
| #define STATIC_LOCAL_IP "192.168.1.1" |
Statically configured IP address.
Definition at line 32 of file ap_mode.c.
◆ STATIC_NETMASK
| #define STATIC_NETMASK "255.255.255.0" |
Statically configured netmask.
Definition at line 40 of file ap_mode.c.
◆ STRINGIFY
Convert the content of the given macro to a string.
Definition at line 122 of file ap_mode.c.
◆ app_init()
Main entry point to the application.
This will be invoked in a thread once operating system and hardware initialization has completed. It may return, but it does not have to.
Definition at line 399 of file ap_mode.c.
◆ handle_ap_sta_status()
Handler for AP STA Status callback.
- Parameters
-
| sta_status | STA status information. |
| arg | Opaque argument that was provided when the callback was registered. |
Definition at line 133 of file ap_mode.c.
◆ link_status_callback()
Link status callback.
- Parameters
-
| link_status | Current link status |
Definition at line 379 of file ap_mode.c.
◆ load_ap_mmipal_init_args()
Loads the provided structure with initialization parameters read from config store.
If a specific parameter is not found then default values are used. Use this function to load defaults before calling mmipal_init().
- Note
- This is a AP specific implementation.
- Parameters
-
Definition at line 155 of file ap_mode.c.
◆ load_mmwlan_ap_args()
Loads the provided structure with initialization parameters read from config store.
If a specific parameter is not found then default values are used. Use this function to load defaults before calling mmwlan_ap_enable().
- Parameters
-
Definition at line 179 of file ap_mode.c.
◆ load_mmwlan_settings_ap()
| static void load_mmwlan_settings_ap |
( |
void |
| ) |
|
|
static |
Loads various WLAN AP specific settings from config store and applies them.
Definition at line 323 of file ap_mode.c.
◆ opaque_argument_value
| uint32_t opaque_argument_value |
A throw away variable for checking that the opaque argument is correct.
Definition at line 125 of file ap_mode.c.