Other Parts Discussed in Thread: CC3220MOD, CC3200, CC3100, CC3220SF
Hi,
My customer uses CC3220MOD and found unexpected behavior of sl_WlanGetNetworkList().
Let’s say there are 3 APs in the area. All APs are now ON (active).
So sl_WlanGetNetworkList() returns a list with these 3 APs. It’s fine.
Then one AP is turned off, but sl_WlanGetNetworkList() still returns the list with all 3 APs.
Customer expects one AP is removed from the list then it should be 2 APs.
Note that sl_WlanPolicySet() is called just before sl_WlanGetNetworkList(), so active scan should be done to update the list.
The code sequence is below;
─────────────────────────────────────
policyOpt = SL_CONNECTION_POLICY(0, 0, 0, 0, 0);
lRetVal = sl_WlanPolicySet(SL_POLICY_CONNECTION , policyOpt, NULL, 0);
ASSERT_ON_ERROR(lRetVal);
policyOpt = SL_SCAN_POLICY(1);
lRetVal = sl_WlanPolicySet(SL_POLICY_SCAN , policyOpt,
(unsigned char *)(IntervalVal), sizeof(IntervalVal));
ASSERT_ON_ERROR(lRetVal);
Task_sleep(1000);
listnum = sl_WlanGetNetworkList(index, numOfEntries, netEntries);
ASSERT_ON_ERROR(listnum);
policyOpt = SL_SCAN_POLICY(0);
sl_WlanPolicySet(SL_POLICY_SCAN , policyOpt,
(unsigned char *)(IntervalVal), sizeof(IntervalVal));
ASSERT_ON_ERROR(lRetVal);
─────────────────────────────────────
In case 2 APs are active at first, then the 3rd AP is newly activated, sl_WlanGetNetworkList() is properly updated from 2 to 3.
What needs to be done to remove the AP from the list?
Thanks and regards,
KoT