This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc3000 on Board MSP430f5438

Hi

i have a question about the connection between cc3000 and the router.

Based on the Basic_Application code i used Hyperterminal to send the commando : 01 is Smartconfig and it is ok.

03 menas Socket open, and i dont know if it is ok. When i tried  sending a self-defined data (UDP) to the PC, i find that there is no Ip-address. and shortly after i type 04 sendingcommand it is showd "Done". But after 04 i still need to type my data informations, Ip Address and so on.  I dont know if CC3000 already connected with my Router or not yet ?  I have checked the code and i think the ucRxBuffer dosent recieve the data from Hyperterminal rightly. Downside i show a cutshot for Hyperterminal. Thanks for your answer.

Best regards,

Shagar

  • Hi Shagar,

    By the look of it, it looks like the CC3000 is not connected to the AP. The default application should print CC3000's acquired IP address after connecting to the AP.  Can you please put breakpoints inside CC3000_UsynchCallback for events HCI_EVNT_WLAN_UNSOL_CONNECT and HCI_EVNT_WLAN_UNSOL_DHCP ? These breakpoints should be exercised for a successful connection. This should give you a clear idea whether the CC3000 was connected to the AP. Post this, try to open the socket.


    Thanks & Regards,
    Raghavendra

  • Thank you for your answer and i have some questions below, i have tried already for 2 weeks but goes not well :

    1. Must i use DHCP for CC3000 ? The code of MSP4305438a is not supported for DHCP. My professor suggests me to use static IP address(through command 08 IP configure, the ip i have defined it by my self), i have tried but not ok. 

    2. the use of function"CC3000_UsynchCallback"  i cant find. Only in basic_wifi_application.c it is used as a param in Wlan_init() and then i can use the Events or ? For test i lighted a LED for test of the event HCI_EVENT_WLAN_UNSOL_CONNECT, but no lighted, that means Connection is not builded. And in the function there is no DHCP Event because the code is not supported for it but i can add it.

    3. could you tell me the order of the operations ? First Smartconfig, then Socket Open, but not IP config or Wlan_connect ? CC3000 connects to Wlan at first or gets IP address at first ?

    4. And in the While Loop there is a timer for test of EVENTs every 500ms, is the Timer neccessary ?

    This is the code i  have downloaded from TI and could you have a look at it ?

    thank you very much for your answer,

    best regards,

    shaguar

    4113.swrc241.zip

  • Hi,

    - I would suggest you to use DHCP. Use netapp_dhcp and set the configurations for DHCP.

    - Use the manual wlan_connect API first and if this works then proceed to use SmartConfig.

    - The sequence of operations should be:

    • Connect CC3000 to an AP using wlan_connect
    • Obtain the Connection event
    • Obtain the DHCP event
    • Open the socket

    - The 500ms delay is with the older implementation. I think there may be a mismatch in the host driver and the Service pack version. I would suggest you to use the SDK from 1.12 release, and use either the 1.28 or 1.26 service pack. More details can be found here: http://processors.wiki.ti.com/index.php/CC3000_Release_Notes#Release_Versions

    - The callback CC3000_UsynchCallback should be defined to track the unsolicited events at the application. Please check the Basic Wifi Application from the above mentioned release.

    Thanks & Regards,
    Raghavendra

  • hi , Raghavendra, 

    thanks for help. Today i try to use the function wlan_connect(). the code is followed:

    wlan_ioctl_set_connection_policy(0,0,0); // this function deletes the policy because i have used Smartconfig.

    wlan_ioctl_del_profile(255); // then i delete all profile, i only use one-time connection.

    wlan_stop();  // i reset it and put a delay after it

    delay() ;

    wlan_start(0) ; // init the wlan hardware. The Wlan_init is already used in main function.

    delay() ;

    wlan_connect(WLAN_SEC_WPA, self_defined, 5, NULL,NULL,0) ; // here, how can i know if my router uses AES?And what is "AES Key"? i just used NULL and 0 for AES. If i use TKIP(an other Encrypt), what should i set ?

    while(ulCC3000Connected != 1) ; // wait util the EVENT_CONNECTION comes and the variable is seted.

    LED(on) ;

    there is no respone, LED not lighted, but, in a few seconds(6 or 7 seconds) there is a"DIsconnection Event" comes. i take it and use LED to indicate the state. And on the Display of my router it is showed that one device was login here.

    Now my problem is : i cant connect cc3000 to the AP(myrouter). And it is not important if i use DHCP or not, because i must wait for the EVENT_CONNECTION and then i give the parameter to DHCP Server. Is that right ?

    and if i use DHCP, i just put   netapp_dhcp(0, 0, 0, (unsigned long *)pucDNS); after while(ulCC3000Connected != 1) ? If i understand wrongly, please give me some suggestions,

    Thank you and best Regards,

    Shaguar