SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The soft-roaming feature lets the user enable the device to automatically switch from one network to another if the estimated link quality of the second network is higher. Switching from one network to the other is performed by disconnecting from the first network and only then connecting to the new network.
The soft-roaming feature is based on an internal RSSI trigger that initiates a background scan when needed. The possible configuration of the soft-roaming feature is identical to the RSSI trigger attributes.The feature is enabled when the Host defines an RSSI trigger with index 1. The device switches to the new network only after the completion of the background scan, and only if the new network has higher RSSI.
Each trigger initiates a single background scan. If the user would like to run scan cycles until a better network is found, the type of the trigger should be set to level, and in this case the pacing attribute defines the intervals between scans.
The feature is supported only on part of the devices. For more information, refer to Table 2-1.
Example:
SlWlanRegisterLinkQualityEvents_t RegisterLinkQuality;
RegisterLinkQuality.Enable = 1;
/* trigger Id 1 is used for soft roaming trigger id 0 is for the host app usage.*/
RegisterLinkQuality.TriggerId = 1;
RegisterLinkQuality.Metric = SL_WLAN_METRIC_EVENT_RSSI_BEACON;
RegisterLinkQuality.Direction = SL_WLAN_RSSI_EVENT_DIR_LOW;
/* recommend for the Threshold -75 since in rssi -85 the device will disconnect */
RegisterLinkQuality.Threshold = -75;
/* defines the sensitivity of the trigger*/
RegisterLinkQuality.Hysteresis = 3;
/* type=level and pacing=15,000 means that when the threshold is crossed*/
/* the background scan will be held every 15 mili */
/* if the type is set to SL_WLAN_RX_QUALITY_EVENT_EDGE, background scan will held only once when the threshold is crossed.*/
RegisterLinkQuality.Type = SL_WLAN_RX_QUALITY_EVENT_LEVEL;/* SL_WLAN_RX_QUALITY_EVENT_EDGE;*/
RegisterLinkQuality.Pacing = 15000;
return(sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_REGISTER_LINK_QUALITY_EVENT,
sizeof(SlWlanRegisterLinkQualityEvents_t), (_u8 *)&RegisterLinkQuality));
Soft roaming is enabled only if FAST connection policy is disabled.