WINC3400 enterprise security connection with TLS.
Copyright (c) 2019 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"
#include "spi_flash/include/spi_flash.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... | |
#define STRING_EOL "\r\n" |
#define STRING_HEADER |
Referenced by main().
|
static |
Configure UART console.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_CHAR_LENGTH, CONF_UART_PARITY, CONF_UART_STOP_BITS, CONSOLE_UART_ID, stdio_serial_init(), and sysclk_enable_peripheral_clock().
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
References board_init(), tstrAuth1xTls::bPrependDomain, tstrAuth1xTls::bUnencryptedUserName, certificate, configure_console(), tstrNetworkId::enuChannel, exponent, M2M_SUCCESS, M2M_WIFI_CH_ALL, m2m_wifi_connect_1x_tls(), m2m_wifi_handle_events(), m2m_wifi_init(), MAIN_WLAN_802_1X_USR_NAME, MAIN_WLAN_SSID, modulus, nm_bsp_init(), NULL, tstrWifiInitParam::pfAppWifiCb, tstrNetworkId::pu8Bssid, tstrAuth1xTls::pu8Certificate, tstrAuth1xTls::pu8Domain, tstrAuth1xTls::pu8PrivateKey_Exp, tstrAuth1xTls::pu8PrivateKey_Mod, tstrNetworkId::pu8Ssid, tstrAuth1xTls::pu8UserName, STRING_HEADER, sysclk_init(), tstrAuth1xTls::u16CertificateLen, tstrAuth1xTls::u16PrivateKeyLen, tstrAuth1xTls::u16UserNameLen, tstrNetworkId::u8SsidLen, wifi_cb(), and WIFI_CRED_SAVE_ENCRYPTED.
|
static |
Callback to get the Wi-Fi status update.
[in] | u8MsgType | type of Wi-Fi notification. Possible types are: |
[in] | pvMsg | A 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, and tstrM2mWifiStateChanged::u8CurrState.
Referenced by main().