5.7 Simple Roaming
In v19.6.1, the WINC roam occurs on link-loss detection with the existing AP, which is determined by tracking beacons and sending NULL frame keep-alive packets. ISO/OSI Layer 2 roaming occurs when the WINC roams from one AP to another AP, both of which are inside the same IP subnet. Layer 3 roaming occurs when the WINC roams from one AP to another AP which are in different subnets, whereby the WINC attempts to obtain a new IP address within the new subnet via DHCP. As a result of layer 3 roaming, any existing network connections is broken, and the upper layer protocols handle this IP address change if a continuous connection is required in layers 4 and above.
Roaming algorithm is internal to WINC firmware. The Host MCU can enable or
disable the roaming functionality using the API's
m2m_wifi_enable_roaming
and
m2m_wifi_disable_roaming
. The roaming must be called after the WINC
initialization.
When roaming is enabled, if the WINC successfully roamed to a new AP, then
the M2M_WIFI_RESP_CON_STATE_CHANGED
message with state as
M2M_WIFI_ROAMED
is sent to host MCU. If the WINC is not able to
find a new AP, then M2M_WIFI_RESP_CON_STATE_CHANGED
message with state
as M2M_WIFI_DISCONNECTED
is sent to the host MCU.
The API call m2m_wifi_enable_roaming()
sets the ATWINC15x0 to detect link-loss, and when link loss is
detected with the existing access point, the following roaming steps are performed.
- A precautionary de-authentication frame is sent to the old AP.
- Scanning is performed to determine if there is an AP within the same ESS as the previous AP in the vicinity.
- If an AP is found, authentication and re-association messages are exchanged with the new AP, followed by a normal 4-way security handshake in the case of WPA/WPA2, or an EAPOL exchange in the case of 802.1x Enterprise security.
- A DHCP request is sent to the new AP to attempt to retain the same IP address. A
notification event is sent to the host MCU of type
M2M_WIFI_RESP_CON_STATE_CHANGE
with the state ofM2M_WIFI_ROAMED
. Additionally, anM2M_WIFI_REQ_DHCP_CONF
event conveying either the same or a new IP address is sent to the host MCU. - If there is any problem with the connection, or DHCP fails, then a de-authentication
message is sent to the AP, and an
M2M_WIFI_RESP_CON_STATE_CHANGED
event is sent to the host MCU with the state set asM2M_WIFI_DISCONNECTED
.
The bEnableDhcp
parameter enables control of whether or not
a DHCP request is sent after roaming to a new AP. The API call
m2m_wifi_disable_roaming
is used to disable roaming.