Morse Micro IoT SDK  2.9.7
mm_app_common.h File Reference

Detailed Description

Morse Micro application helper routines for initializing/de-initializing the Wireless LAN interface and IP configuration.

Application helper routines for Wireless LAN interface

This file contains routines for loading the required WLAN and IP parameters (e.g., SSID, password, and IP address) from the Morse Micro Persistent Configuration Store, initializing the WLAN interface and network stack.

Parameters of interest are listed in the table below. These can be set in the config.hjson file for your project and then programmed to the config store either using the Platform IO UI or through the command line. See the config.hjson for advanced parameters.

Parameter Name Description
wlan.country_code 2 character country code specifying the regulatory domain to use
wlan.ssid The SSID of the network
wlan.security Security type of the network (sae, owe, or open)
wlan.password The password of your network if security type is sae
ip.dhcp_enabled For static IPv4 addresses set to false, for IPv4 DHCP set to true
ip.ip_addr IPv4 address to use if ip.dhcp_enabled is false
ip.netmask IPv4 Netmask to use if ip.dhcp_enabled is false
ip.gateway IP address of gateway to use if ip.dhcp_enabled is false
ip6.ip_addr IPv6 address to use if ip6.autoconfig is false
ip6.autoconfig For IPv6 static address set to false, for IPv6 autoconfig set to true

To set the parameters in config store from the command line, follow the Programming the config store from a host PC instructions.

Definition in file mm_app_common.h.

Go to the source code of this file.

Functions

void app_wlan_init (void)
 Initializes the WLAN interface (and dependencies) using settings specified in the config store. More...
 
void app_wlan_start (void)
 Starts the WLAN interface and connects to Wi-Fi using settings specified in the config store. More...
 
void app_wlan_stop (void)
 Disconnects from Wi-Fi and de-initializes the WLAN interface.
 
void app_print_version_info (void)
 Prints various version information. More...
 

Function Documentation

◆ app_print_version_info()

void app_print_version_info ( void  )

Prints various version information.

Note
This is invoked implicitly by app_wlan_init().

◆ app_wlan_init()

void app_wlan_init ( void  )

Initializes the WLAN interface (and dependencies) using settings specified in the config store.

If no settings are found, the defaults are used.

Note
This will invoke mbedtls_platform_threading_init() if MBEDTLS_THREADING_ALT is enabled.
Warning
This must be called only once.

◆ app_wlan_start()

void app_wlan_start ( void  )

Starts the WLAN interface and connects to Wi-Fi using settings specified in the config store.

If no settings are found, the defaults are used.