Microchip® Advanced Software Framework

main21.c File Reference

WINC1500 security connection with WPA/WPA2 enterprise.

Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "main.h"
#include <string.h>
#include "driver/include/m2m_wifi.h"
#include "driver/source/nmasic.h"

Macros

#define STRING_EOL   "\r\n"
 
#define STRING_HEADER
 

Functions

static void configure_console (void)
 Configure UART console. More...
 
int main (void)
 Main application function. More...
 
static void wifi_cb (uint8_t u8MsgType, void *pvMsg)
 Callback to get the Wi-Fi status update. More...
 

Variables

static struct usart_module cdc_uart_module
 UART module for debug. More...
 
static CONST tstr1xAuthCredentials gstrCred1x = { MAIN_WLAN_802_1X_USR_NAME, MAIN_WLAN_802_1X_PWD}
 credential parameter for 802.1x More...
 

#define STRING_EOL   "\r\n"
#define STRING_HEADER
Value:
"-- WINC1500 security connection with WPA/WPA2 enterprise example --"STRING_EOL \
"-- "BOARD_NAME " --"STRING_EOL \
"-- Compiled: "__DATE__ " "__TIME__ " --"STRING_EOL
#define STRING_EOL
Definition: main21.c:109
#define BOARD_NAME
Name string macro.
Definition: saml21_xplained_pro.h:65

Referenced by main().

int main ( void  )

Main application function.

Application entry point. Initialize system, UART and board specific settings. Connect AP using Security mode WPA/WPA2 enterprise

Returns
program return value.

References configure_console(), gstrCred1x, M2M_SUCCESS, M2M_WIFI_CH_ALL, m2m_wifi_connect(), m2m_wifi_handle_events(), m2m_wifi_init(), M2M_WIFI_SEC_802_1X, MAIN_WLAN_802_1X_USR_NAME, MAIN_WLAN_DEVICE_NAME, nm_bsp_init(), NULL, tstrWifiInitParam::pfAppWifiCb, STRING_HEADER, system_init(), and wifi_cb().

static void wifi_cb ( uint8_t  u8MsgType,
void *  pvMsg 
)
static

Callback to get the Wi-Fi status update.

Parameters
[in]u8MsgTypetype of Wi-Fi notification. Possible types are:
[in]pvMsgA pointer to a buffer containing the notification parameters (if any). It should be casted to the correct data type corresponding to the notification type.

References M2M_WIFI_CONNECTED, M2M_WIFI_DISCONNECTED, M2M_WIFI_REQ_DHCP_CONF, m2m_wifi_request_dhcp_client(), M2M_WIFI_RESP_CON_STATE_CHANGED, tstrM2MIPConfig::u32DNS, tstrM2MIPConfig::u32Gateway, tstrM2MIPConfig::u32StaticIP, tstrM2MIPConfig::u32SubnetMask, tstrM2mWifiStateChanged::u8CurrState, and tstrM2mWifiStateChanged::u8ErrCode.

Referenced by main().

struct usart_module cdc_uart_module
static

UART module for debug.

Referenced by configure_console().

credential parameter for 802.1x

Referenced by main().