WiFi Provisioning Declarations.
Copyright (c) 2019 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "ble_manager.h"
#include "wifi_provisioning.h"
#include "common/include/nm_common.h"
Functions | |
void | ble_app_connected_update (at_ble_handle_t connection_handle) |
void | ble_app_disconnected_update (at_ble_handle_t connection_handle) |
void | ble_app_paired_update (at_ble_handle_t paired_handle) |
void | initialise_provisioning_app (void) |
void | provision_app_ble_disconnect (void) |
uint8_t | provisioning_app_processing (void) |
uint8_t | retrieve_credentials (credentials *cred) |
void | send_scan_result (tstrM2mWifiscanResult *sr, uint8_t remain) |
at_ble_status_t | start_provisioning_app (void) |
at_ble_status_t | wifi_provision_app_credentials_update (credentials *c) |
at_ble_status_t | wifi_provision_app_scanning_handler (void) |
void | wifi_state_update (uint8_t) |
void ble_app_connected_update | ( | at_ble_handle_t | connection_handle | ) |
References ble_connected(), LOCAL_STATE_CONNECTED, PROVAPP_PRINTF, and set_local_state().
Referenced by initialise_provisioning_app().
void ble_app_disconnected_update | ( | at_ble_handle_t | connection_handle | ) |
References ble_disconnected(), LOCAL_STATE_IDLE, PROVAPP_PRINTF, and set_local_state().
Referenced by initialise_provisioning_app().
void ble_app_paired_update | ( | at_ble_handle_t | paired_handle | ) |
Referenced by initialise_provisioning_app().
void initialise_provisioning_app | ( | void | ) |
References ble_app_connected_update(), ble_app_disconnected_update(), ble_app_paired_update(), LED_CLEAR, led_state, local_state, LOCAL_STATE_IDLE, register_ble_connected_event_cb(), register_ble_disconnected_event_cb(), register_ble_paired_event_cb(), register_wifi_provision_credentials_handler(), register_wifi_provision_scanning_handler(), wifi_provision_app_credentials_update(), and wifi_provision_app_scanning_handler().
Referenced by app_ble_wifi_provisioning().
void provision_app_ble_disconnect | ( | void | ) |
References disconnect_ble(), LOCAL_STATE_IDLE, and set_local_state().
Referenced by app_ble_wifi_provisioning().
uint8_t provisioning_app_processing | ( | void | ) |
References LED_CLEAR, led_clear(), led_flash(), LED_FLASHING_FAST, LED_FLASHING_MEDIUM, led_state, local_state, LOCAL_STATE_CONNECTED, LOCAL_STATE_IDLE, LOCAL_STATE_NOT_CONNECTED, and wifi_provision_processing().
Referenced by app_ble_wifi_provisioning().
uint8_t retrieve_credentials | ( | credentials * | cred | ) |
References tstrM2mWifiWepParams::au8WepKey, CREDENTIALS_NOT_VALID, CREDENTIALS_VALID, M2M_WIFI_SEC_WEP, M2M_WIFI_WEP_KEY_INDEX_1, credentials::passphrase, credentials::passphrase_length, credentials::sec_type, credentials::ssid, credentials::ssid_length, tstrM2mWifiWepParams::u8KeyIndx, tstrM2mWifiWepParams::u8KeySz, WEP_104_KEY_STRING_SIZE, WEP_40_KEY_STRING_SIZE, WIFI_PROVISION_MAX_PASS_LENGTH, and WIFI_PROVISION_MAX_SSID_LENGTH.
Referenced by app_ble_wifi_provisioning(), and wifi_provision_app_credentials_update().
void send_scan_result | ( | tstrM2mWifiscanResult * | sr, |
uint8_t | remain | ||
) |
References tstrM2mWifiscanResult::au8SSID, wifi_provision_scanlist::num_valid, _scanitem::rssi, tstrM2mWifiscanResult::s8rssi, wifi_provision_scanlist::scandetails, _scanitem::sec_type, _scanitem::ssid, tstrM2mWifiscanResult::u8AuthType, WIFI_PROVISION_MAX_AP_NUM, and wifi_provision_scanlist_receive().
Referenced by app_wifi_handle_event().
at_ble_status_t start_provisioning_app | ( | void | ) |
References ble_is_connected(), LOCAL_STATE_CONNECTED, LOCAL_STATE_NOT_CONNECTED, provision_start(), and set_local_state().
Referenced by app_ble_wifi_provisioning().
at_ble_status_t wifi_provision_app_credentials_update | ( | credentials * | c | ) |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, CREDENTIALS_VALID, LOCAL_STATE_IDLE, credentials::passphrase, credentials::passphrase_length, PROVAPP_PRINTF, retrieve_credentials(), credentials::sec_type, set_local_state(), credentials::ssid, credentials::ssid_length, WIFI_PROVISION_MAX_PASS_LENGTH, and WIFI_PROVISION_MAX_SSID_LENGTH.
Referenced by initialise_provisioning_app().
at_ble_status_t wifi_provision_app_scanning_handler | ( | void | ) |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, M2M_SUCCESS, M2M_WIFI_CH_ALL, and m2m_wifi_request_scan().
Referenced by initialise_provisioning_app().
void wifi_state_update | ( | uint8_t | ) |
References inform_wifi_connection_state().
Referenced by app_ble_wifi_provisioning().