• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » SimpleLink™ Wi-Fi® » CC3000 Force Re-scan
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

CC3000 Force Re-scan

This question is answered
Andy8086940
Posted by Andy8086940
on May 01 2012 13:07 PM
Intellectual530 points

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

cc3000 ap CC3000 WiFi Driver
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Miguel
    Posted by Miguel
    on May 01 2012 22:42 PM
    Genius11565 points

    Hi Andy,

         We are trying to reproduce your scenario and come back with an answer. Are you using a specific sample application?

    Miguel

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on May 02 2012 02:52 AM
    Expert1580 points

    Hi Andy,

    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: 

    • Dwell time - The amount of time the CC3000 sends probe request and listen to probe response/beacons per channel. It's important that this time will be long enough for the STA to hear all the APs on that channel. Advise to use defaults
    • Channels mask - There are up to 13 channel, However in some countries regulatory domains prevent you from usage of a channel
    • Scan cycle - Going for all supported channels and allocating the information for that. Calculated time: num of channel*dwell time
    • Interval - The amount of time between scan-cycle. 

    There are 2 different policies:

    • While the CC3000 is not connected to any AP.
      In that case the CC3000 issues a "scan cycle" wait "interval time[cycle number]" The last entry in the list will be repeated until a connection. 
      The purpose of that is to try to connect very fast to an AP, and if there are non, increase the interval to save TX power.
    • While the CC3000 is connected. In that case only a single interval is being used. Not sure exactly which one. (Igor?) 

    - Elad

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andy8086940
    Posted by Andy8086940
    on May 02 2012 11:10 AM
    Intellectual530 points

    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();
    }
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Yael Oz
    Posted by Yael Oz
    on May 02 2012 11:13 AM
    Expert3585 points

    Hi Andy,

    While the CC3000 is connected there is no active scan triggred.

    Yael

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andy8086940
    Posted by Andy8086940
    on May 03 2012 16:30 PM
    Verified Answer
    Verified by Aaron L
    Intellectual530 points

    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.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use