• 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® » Connecting to a secure network
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Connecting to a secure network

Connecting to a secure network

This question is answered
Alexander Khaustov
Posted by Alexander Khaustov
on Jul 23 2012 10:29 AM
Prodigy190 points

Please, describe the required values for parameters of wlan_add_profile:

[in] ulPairwiseCipher_Or_Key
[in] ulGroupCipher_TxKeyLen
[in] ulKeyMgmt
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Alexander Khaustov
    Posted by Alexander Khaustov
    on Jul 23 2012 12:11 PM
    Prodigy190 points

    I'm unable to connect CC3000 explicitly (without first time config) to any network type but the open one. Here's the code for WPA2:

    wlan_ioctl_set_connection_policy(0, 0, 0);
    res = wlan_ioctl_del_profile(0);
    Delay(500);
    res = wlan_add_profile(WLAN_SEC_WPA2, "HTC-avk", 7, 0, 0, 0, 0, 0, "1234567890", 10);

    wlan_ioctl_set_connection_policy(0, 1, 1);

    Hence the question on the parameters

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alexander Khaustov
    Posted by Alexander Khaustov
    on Jul 24 2012 13:28 PM
    Prodigy190 points

    Tried magic numbers from this thread: http://e2e.ti.com/support/low_power_rf/f/851/p/180859/672551.aspx

    I.e.

    res = wlan_add_profile(WLAN_SEC_WPA2, "HTC-avk", 7, 0, 0, 0x18, 0x1e, 0x2, "1234567890", 10);
    wlan_ioctl_set_connection_policy(0, 0, 1);

    Unfortunately that didn't help, cc3000 still doesn't connect to the AP

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • //--Kelvin--\\
    Posted by //--Kelvin--\\
    on Jul 24 2012 14:39 PM
    Intellectual1335 points

    Hi Alexander,

    Can you please try to use the command as follows, and see if that helps.  I think the decimal 10 value may be causing some issues. The function is probably trying to read it as if it is hexadecimal 0x10.

    res = wlan_add_profile(WLAN_SEC_WPA2, "HTC-avk", 7, 0, 0, 0x18, 0x1e, 0x2, "1234567890", 0x0a);

    Kelvin

    Please click the Verify Answer button on this post if it answers your question.  Thank You.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alexander Khaustov
    Posted by Alexander Khaustov
    on Jul 24 2012 20:28 PM
    Prodigy190 points

    Tried that. Still isn't connecting

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alexander Khaustov
    Posted by Alexander Khaustov
    on Jul 24 2012 20:32 PM
    Prodigy190 points

    Also tried shorter password "12345678", length 8. That didn't help either

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alon Srednizki
    Posted by Alon Srednizki
    on Aug 01 2012 09:54 AM
    Expert3285 points

    Hi Alexander,

    Can you please describe which AP are you using, and what is the Authentication method and the encryption method?
    In addition, what pre shared key did you set in the AP?

    Thanks,
    Alon.S

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Alexander Khaustov
    Posted by Alexander Khaustov
    on Aug 01 2012 13:40 PM
    Prodigy190 points

    I've tried two APs: one is on HTC WildfireS (android phone), the other was D-Link DIR-300.

    The passwords for the HTC router were configured as written in the messages above: 1234567890 for several experiments, then, after Kelvin's message, for further experiments I've set up both router and tiwi-sl for password 12345678

    The security used in router setup in HTC is described as WPA2(AES). There's also WPA(TKIP) which I did also try with the same result (meaning here, of course simultaneous setup of the router and tiwi-sl)

    I'd like to add  that I've managed to connect to the same network (wpa2) using wlan_connect.

    Implementing the workaround of simulating profile in mcu timer routine via using 

    res = wlan_ioctl_statusget(); // doesn't work
    if (res == STATUS_CONNECTING || wlanState == WLAN_CONNECTED)
    return;
     res = wlan_ioctl_set_connection_policy(0, 0, 0);
    Delay(250); // close to 2.5 seconds
    res = wlan_connect(WLAN_SEC_WPA2, "HTC-avk", 7, 0, "1234567890", 10);

    didn't work perfectly either because wlan_ioctl_statusget() always returns zero. Even in between the wlan_connect call and CC3000_AsyncCallback coming with the HCI_EVNT_WLAN_UNSOL_CONNECT event. 

    The code above nevertheless sometimes works but not always

    Another strange thing is the tiwi-sl MAC which appeared on HTC as 00-12-55-55-55-55 and the device title was something like Device-5555

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tony Philipsson
    Posted by Tony Philipsson
    on Aug 02 2012 09:49 AM
    Verified Answer
    Verified by Aaron L
    Intellectual760 points

    This always work for me.

    wlan_ioctl_set_connection_policy(DISABLE, DISABLE, DISABLE);
    __delay_cycles(8000);          
    wlan_connect(WLAN_SEC_WPA, "Mast VP", 7,  NULL, "0295658811", 10);

     

    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