Here are listed all the functions that implement the Wifi Provisioning APIs.
Functions | |
sint8 | m2m_wifi_start_provision_mode (tstrM2MAPConfig *pstrM2MAPConfig, char *pcHttpServerDomainName, uint8 bEnableHttpRedirect) |
Asynchronous API for control of Wi-Fi provisioning functionality. More... | |
sint8 | m2m_wifi_start_provision_mode_ext (tstrM2MAPModeConfig *pstrAPModeConfig, char *pcHttpServerDomainName, uint8 bEnableHttpRedirect) |
Asynchronous API for control of Wi-Fi provisioning functionality with extended options. More... | |
sint8 | m2m_wifi_stop_provision_mode (void) |
Synchronous API for terminating provisioning mode on the WINC IC. More... | |
NMI_API sint8 m2m_wifi_start_provision_mode | ( | tstrM2MAPConfig * | pstrAPConfig, |
char * | pcHttpServerDomainName, | ||
uint8 | bEnableHttpRedirect | ||
) |
Asynchronous API for control of Wi-Fi provisioning functionality.
Asynchronous Wi-Fi provisioning function, which starts the WINC HTTP PROVISIONING mode. The function triggers the WINC to activate the Wi-Fi AP (HOTSPOT) mode with the passed configuration parameters and then starts the HTTP Provision WEB Server. Provisioning status is returned in an event @ref M2M_WIFI_RESP_PROVISION_INFO.
[in] | pstrAPConfig | AP configuration parameters as defined in tstrM2MAPConfig configuration structure. If a NULL value is passed in, the call will result in a negative error M2M_ERR_FAIL. |
[in] | pcHttpServerDomainName | Domain name of the HTTP Provision WEB server which others will use to load the provisioning Home page. The domain name can have one of the following 3 forms:
|
Forms 1 and 2 are equivalent, they will both start a plain http server, while form 3 will start a secure HTTP provisioning Session (HTTP over SSL connection).
[in] | bEnableHttpRedirect | A flag to enable/disable the HTTP redirect feature. If Secure provisioning is enabled (i.e. the server domain name uses "https" prefix) this flag is ignored (no meaning for redirect in HTTPS). Possible values are:
|
The example demonstrates a code snippet for how provisioning is triggered and the response event received accordingly.
References tstrM2MAPConfigExt::au8DefRouterIP, tstrM2MAPConfig::au8DHCPServerIP, tstrM2MAPConfigExt::au8DNSServerIP, tstrM2MAPConfigExt::au8SubnetMask, m2m_memcpy(), m2m_wifi_start_provision_mode_ext(), tstrM2MAPModeConfig::strApConfig, and tstrM2MAPModeConfig::strApConfigExt.
Referenced by main().
NMI_API sint8 m2m_wifi_start_provision_mode_ext | ( | tstrM2MAPModeConfig * | pstrAPModeConfig, |
char * | pcHttpServerDomainName, | ||
uint8 | bEnableHttpRedirect | ||
) |
Asynchronous API for control of Wi-Fi provisioning functionality with extended options.
Asynchronous Wi-Fi provisioning function, which starts the WINC HTTP PROVISIONING mode. The function triggers the WINC to activate the Wi-Fi AP (HOTSPOT) mode with the passed configuration parameters and then starts the HTTP Provision WEB Server. Provisioning status is returned in an event @ref M2M_WIFI_RESP_PROVISION_INFO.
[in] | pstrAPModeConfig | AP configuration parameters as defined in tstrM2MAPModeConfig configuration structure. A NULL value passed in, will result in a negative error M2M_ERR_FAIL. |
[in] | pcHttpServerDomainName | Domain name of the HTTP Provision WEB server which others will use to load the provisioning Home page. The domain name can have one of the following 3 forms:
|
The forms 1 and 2 are equivalent, they both will start a plain http server, while form 3 will start a secure HTTP provisioning Session (HTTP over SSL connection).
[in] | bEnableHttpRedirect | A flag to enable/disable the HTTP redirect feature. If Secure provisioning is enabled (i.e. the server domain name uses "https" prefix) this flag is ignored (no meaning for redirect in HTTPS). Possible values are:
|
The example demonstrates a code snippet for how provisioning is triggered and the response event received accordingly.
References tstrM2MProvisionModeConfig::acHttpServerDomainName, gu8scanInProgress, hif_send(), M2M_ERR, M2M_ERR_FAIL, m2m_memcpy(), M2M_REQ_DATA_PKT, M2M_REQ_GROUP_WIFI, m2m_strlen(), M2M_SUCCESS, m2m_validate_ap_parameters(), M2M_WIFI_REQ_START_PROVISION_MODE, NULL, tstrM2MAPModeConfig::strApConfig, tstrM2MProvisionModeConfig::strApConfig, tstrM2MAPModeConfig::strApConfigExt, tstrM2MProvisionModeConfig::strApConfigExt, and tstrM2MProvisionModeConfig::u8EnableRedirect.
Referenced by m2m_wifi_start_provision_mode().
sint8 m2m_wifi_stop_provision_mode | ( | void | ) |
Synchronous API for terminating provisioning mode on the WINC IC.
This function will terminate any currently active provisioning mode on the WINC IC, returning the IC to idle.
References hif_send(), M2M_REQ_GROUP_WIFI, M2M_WIFI_REQ_STOP_PROVISION_MODE, and NULL.