framework/src/st_things/things_stack/utils/things_network.c
//--------------------------------------------------------------------------------
/**
 * Function definition for connect things network to home ap network.
 */
Function definition for connect things network to home ap network.
Function definition for connect things network to home ap network .
bool things_network_connect_home_ap(void)
{
	wifi_manager_result_e result = WIFI_MANAGER_SUCCESS;
	wifi_manager_ap_config_s *connect_config = things_network_get_homeap_config();
	if (connect_config == NULL || connect_config->ssid == NULL) {
		return false;
	}
	THINGS_LOG_V(TAG, "Try_connect_home_ap [ssid : %s]", connect_config->ssid);
	result = wifi_manager_connect_ap(connect_config);
	if (result != WIFI_MANAGER_SUCCESS) {
		THINGS_LOG_E(TAG, "Failed to connect WiFi [Error Code : %d]", result);
		return false;
	}
	return true;
}
bool things_network_connect_home_ap ( void ) { wifi_manager_result_e result = WIFI_MANAGER_SUCCESS ; wifi_manager_ap_config_s * connect_config = things_network_get_homeap_config ( ) ; if ( connect_config == NULL || connect_config -> ssid == NULL ) { return false ; } THINGS_LOG_V ( TAG , " " , connect_config -> ssid ) ; result = wifi_manager_connect_ap ( connect_config ) ; if ( result != WIFI_MANAGER_SUCCESS ) { THINGS_LOG_E ( TAG , " " , result ) ; return false ; } return true ; }
Function definition for connect things network to home ap network.
Function definition for connect things network to home ap network .
// Initialize the WiFi manager result with success. // Get home access point information. // Print the home ap ssid. // Call wifi manager api to connect home ap.