Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
m2m_wifi_disconnect

Synchronous wi-fi disconnection function, requesting a Wi-Fi disconnect from the currently connected AP.

Functions

NMI_API sint8 m2m_wifi_disconnect (void)
 Synchronous API to request disconnection from a network. More...
 

NMI_API sint8 m2m_wifi_disconnect ( void  )

Synchronous API to request disconnection from a network.

Precondition
Disconnection must be made to a successfully connected AP. If the WILC is not in the connected state, a call to this function will hold insignificant.
Warning
This function must be called in station mode only.
See Also
m2m_wifi_connect m2m_wifi_default_connect
Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.
Request a Wi-Fi disconnect from the currently connected AP.
After the disconnect is complete the driver should receive a response of @ref M2M_WIFI_RESP_CON_STATE_CHANGED based on the states defined
in @ref tenuM2mConnState, successful disconnection is defined by @ref M2M_WIFI_DISCONNECTED .
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
Precondition
Disconnection request must be made to a successfully connected AP. If the WINC is not in the connected state, a call to this function will hold insignificant.
Warning
This function must be called in station mode only.
See Also
m2m_wifi_connect_open m2m_wifi_connect_wep m2m_wifi_connect_psk m2m_wifi_connect_1x_mschap2 m2m_wifi_connect_1x_tls m2m_wifi_default_connect
Request a Wi-Fi disconnect from the currently connected AP.
The connection status will be indicated to the application via a @ref M2M_WIFI_RESP_CON_STATE_CHANGED event.
The status will be one of those defined in @ref tenuM2mConnState, with @ref M2M_WIFI_DISCONNECTED indicating
a successful disconnection.
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
Precondition
Disconnection request must be made to a successfully connected AP. If the WINC is not in the connected state, a call to this function will hold insignificant.
Warning
This function must be called in station mode only.
See Also
m2m_wifi_connect m2m_wifi_connect_sc m2m_wifi_default_connect m2m_wifi_connect_open m2m_wifi_connect_wep m2m_wifi_connect_psk m2m_wifi_connect_1x_mschap2 m2m_wifi_connect_1x_tls