Is there any way to force a re-scan of the available APs on the CC3000? If I turn off my test AP, the scan results will continue to show the AP for about a minute after it's been turned off. I would like to be able to clear out all previously seen APs and restart the scan manually so I can see the test AP 'disappear' within a couple seconds. It would also be acceptable if the scan rate could be increased so the scan results represent only APs that were seen within the last few seconds, but it's not clear how to do this using the set_scan_params function (if it's even possible).
Thanks,
Andy
Hi Andy,
We are trying to reproduce your scenario and come back with an answer. Are you using a specific sample application?
Miguel
The wlan_ioctl_get_scan_results() return the populated table inside the CC3000 of the surrounding APs.
The CC3000 populate this table according to generated scan policies.
Few terminologies explanation:
There are 2 different policies:
- Elad
- Elad Raz
CTO
www.integrity-project.com
Elad, thanks for the details. So it sounds like it is not possible to force a scan cycle. I am setting all scan params to defaults where all 16 interval array values are 2000.
wlan_ioctl_set_scan_params(1, 20, 30, 2, 0x7FF, -100, 0, 205, intervals);
Miguel, I started with the MSP430 basic wifi application but added some more commands for additional control. The init is the same, but here are my additional commands.
Connect:s = wlan_connect(WLAN_SEC_UNSEC, "PHS-37f", 7, NULL, NULL, 0);
Disconnect:s = wlan_disconnect();
Set scan params:s = wlan_ioctl_set_scan_params(1, 20, 30, 2, 0x7FF, -100, 0, 205, intervals);
Show scan results:s = wlan_ioctl_get_scan_results(0, (unsigned char *)&r);
Delete policy:wlan_ioctl_set_connection_policy(DISABLE, DISABLE, DISABLE);wlan_reboot();
Reboot:wlan_reboot();
void wlan_boot(void) { // // WLAN On API Implementation // wlan_init( CC3000_UsynchCallback, sendWLFWPatch, sendDriverPatch, sendBootLoaderPatch, ReadWlanInterruptPin, WlanInterruptEnable, WlanInterruptDisable, WriteWlanPin); // // Trigger a WLAN device // wlan_start(0); // Turn on the LED 5 to indicate that we are active and initiated WLAN successfully P3OUT |= BIT5; // // Mask out all non-required events from CC3000 // wlan_set_event_mask(HCI_EVNT_WLAN_KEEPALIVE|HCI_EVNT_WLAN_UNSOL_INIT|HCI_EVNT_WLAN_ASYNC_PING_REPORT); } void wlan_reboot(void) { wlan_stop(); P3OUT &= ~BIT5; P3OUT &= ~BIT7; DispatcherUartSendString("\r\nRestarting..."); __delay_cycles(12000000); wlan_boot(); }
While the CC3000 is connected there is no active scan triggred.
Yael
It looks like I can sort of force a scan by enabling the 'use profiles' policy and rebooting the module. If there are no stored profiles, the CC3000 appears to start scanning immediately after boot without automatically connecting to an AP. There is still an issue of it not returning all of the visible APs, but at least this looks like a way to force a scan while not being connected to an AP.