Asynchronous connection status retrieval function, retrieves the status information of the currently connected AP.
Asynchronous associated status retrieval function in the AP mode, retrieves the status information of the currently connected connected stations to the WILC1000 AP.
The result is passed to the Wi-Fi notification callback through the event M2M_WIFI_RESP_CONN_INFO. Connection information is retrieved from the structure tstrM2MConnInfo.
The result is passed to the Wi-Fi notification callback through the event M2M_WIFI_RESP_AP_ASSOC_INFO. Connection information is retrieved from the structure tstrM2MAPAssocInfo.
Request the status information of the currently connected stations to the WILC1000 AP. The result is passed to the Wi-Fi notification callback with the event M2M_WIFI_RESP_AP_ASSOC_INFO.
- Precondition
- A Wi-Fi notification callback of type tpfAppWifiCb MUST be implemented and registered at startup. Registering the callback is done through passing it to the intialization m2m_wifi_init function.
- The event M2M_WIFI_RESP_AP_ASSOC_INFO must be handled in the callback to receive the requested connection info.
- Warning
- Calling this function is valid ONLY in the AP mode. Otherwise, the WILC SW shall ignore the request silently.
- See Also
- tpfAppWifiCb m2m_wifi_init M2M_WIFI_RESP_AP_ASSOC_INFO tstrM2MAPAssocInfo
- Returns
- The function returns M2M_SUCCESS for successful operations and a negative value otherwise.
Example
The code snippet shows an example of how wi-fi connection information is retrieved .
#include "m2m_wifi.h"
#include "m2m_types.h"
void wifi_event_cb(
uint8 u8WiFiEvent,
void * pvMsg)
{
switch(u8WiFiEvent)
{
{
printk(
"AP Assoc list received[%d]\n",pstrAssocInfo->
u8NoConnSta);
{
}
}
break;
{
if(pstrConnectState->u8CurrState)
{
}
break;
default:
break;
}
}
{
{
strcpy(strM2MAPConfig.au8PSK,"1234567890");
strcpy(strM2MAPConfig.
au8SSID,
"WILC1000_AP");
while(1)
{
}
}
}
References hif_send(), M2M_REQ_GRP_WIFI, M2M_SUCCESS, M2M_WIFI_REQ_AP_ASSOC_INFO, and NULL.
Referenced by os_m2m_wifi_ap_get_assoc_info().
Request the status information of the currently connected Wi-Fi AP. The result is passed to the Wi-Fi notification callback with the event M2M_WIFI_RESP_CONN_INFO.
Asynchronous API for retrieving the WINC connection status.
Asynchronous API for retrieving the WINC IC's connection status.
- Precondition
- A Wi-Fi notification callback of type tpfAppWifiCb MUST be implemented and registered at startup. Registering the callback is done through passing it to the intialization m2m_wifi_init function.
- The event M2M_WIFI_RESP_CONN_INFO must be handled in the callback to receive the requested connection info.
- Warning
- Calling this function is valid ONLY in the STA CONNECTED state. Otherwise, the WILC SW shall ignore the request silently.
- See Also
- tpfAppWifiCb m2m_wifi_init M2M_WIFI_RESP_CONN_INFO tstrM2MConnInfo
- Returns
- The function returns M2M_SUCCESS for successful operations and a negative value otherwise.
Example
The code snippet shows an example of how wi-fi connection information is retrieved .
#include "m2m_wifi.h"
#include "m2m_types.h"
void wifi_event_cb(
uint8 u8WiFiEvent,
void * pvMsg)
{
switch(u8WiFiEvent)
{
{
printf("CONNECTED AP INFO\n");
printf(
"SSID : %s\n",pstrConnInfo->
acSSID);
printf(
"SEC TYPE : %d\n",pstrConnInfo->
u8SecType);
printf(
"Signal Strength : %d\n", pstrConnInfo->
s8RSSI);
printf("Local IP Address : %d.%d.%d.%d\n",
}
break;
default:
break;
}
}
{
{
while(1)
{
}
}
}
Asynchronous connection status retrieval function, retrieves the status information of the
currently connected AP.
The result is passed to the Wi-Fi notification callback through the event
@ref M2M_WIFI_RESP_CONN_INFO. Connection information is retrieved from
the structure @ref tstrM2MConnInfo.
Connection Information retrieved:
-Connection Security
-Connection RSSI
-Remote MAC address
-Remote IP address
In case the WINC is operating in station mode, the SSID of the AP is also retrieved.
- Precondition
- A Wi-Fi notification callback of type tpfAppWifiCb MUST be implemented and registered at startup. Registering the callback is done through passing it to the initialization m2m_wifi_init function.
- The event M2M_WIFI_RESP_CONN_INFO must be handled in the callback to receive the requested connection info.
- Warning
- In case the WINC is operating in AP mode, the SSID field will be returned as a NULL string.
- Returns
- The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
- See Also
- M2M_WIFI_RESP_CONN_INFO, tstrM2MConnInfo
Example
The code snippet shows an example of how wi-fi connection information is retrieved .
#include "m2m_wifi.h"
#include "m2m_types.h"
void wifi_event_cb(
uint8 u8WiFiEvent,
void * pvMsg)
{
switch(u8WiFiEvent)
{
{
printf("CONNECTED AP INFO\n");
printf(
"SSID : %s\n",pstrConnInfo->
acSSID);
printf(
"SEC TYPE : %d\n",pstrConnInfo->
u8SecType);
printf(
"Signal Strength : %d\n", pstrConnInfo->
s8RSSI);
printf("Local IP Address : %d.%d.%d.%d\n",
}
break;
{
}
break;
default:
break;
}
}
{
{
while(1)
{
}
}
}
Requests the connection status from the WINC including information regarding any access
point to which it is currently connected, or any non-AP station that is connected to the WINC.
All information will be returned to the application via the Wi-Fi notification callback through
the event @ref M2M_WIFI_RESP_CONN_INFO.
The connection info can be retrieved using the structure @ref tstrM2MConnInfo which contains:
- Connection Security
- Connection RSSI
- Remote MAC address
- Remote IP address
- SSID of the network (in cases where the WINC is in non-AP mode)
- Precondition
- A Wi-Fi notification callback of type tpfAppWifiCb MUST be implemented and registered at startup. Registering the callback is done through passing it to the initialization m2m_wifi_init function.
- The event M2M_WIFI_RESP_CONN_INFO must be handled in the callback to receive the requested connection info.
- Warning
- In case the WINC is operating in AP mode or P2P mode, the SSID field will be returned as a NULL string.
- Returns
- The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
- See Also
- M2M_WIFI_RESP_CONN_INFO, tstrM2MConnInfo
Example
The code snippet shows an example of how wi-fi connection information is retrieved .
#include "m2m_wifi.h"
#include "m2m_types.h"
void wifi_event_cb(
uint8 u8WiFiEvent,
void * pvMsg)
{
switch(u8WiFiEvent)
{
{
printf("CONNECTED AP INFO\n");
printf(
"SSID : %s\n",pstrConnInfo->
acSSID);
printf(
"SEC TYPE : %d\n",pstrConnInfo->
u8SecType);
printf(
"Signal Strength : %d\n", pstrConnInfo->
s8RSSI);
printf("Local IP Address : %d.%d.%d.%d\n",
}
break;
{
}
break;
default:
break;
}
}
{
{
while(1)
{
}
}
}